Facebook

HomeHome🇫🇷 Forum & Support Français🇬🇧 English Forum & SupportWikiLa liste des ServeursTop50ShopTo do ListMemberlistUsergroupsRegisterLog inOriginahl-Scripts
Share | 
 

 Brouillon PlayerSelectSpawn

View previous topic View next topic Go down 
AuthorMessage
Nordahl

avatar

SteamID64 : 76561198033784269
Posts : 2536

PostSubject: Re: Brouillon PlayerSelectSpawn   Tue 23 Feb - 16:43

function GM:PlayerDeath( ply, wep, killer )
timer.Remove("playerstat"..ply:EntIndex())
if zgame=="2" and gtcomence==1 then
gtzsdp(ply)
elseif zgame=="3" and gtcomence==1 then
if ply:GetNWInt("zclan")==1 then
gtzsdp(ply)
end
end
ply.nextspawn=CurTime() + plyrespawni
ply:SetAmmo(0, "shotgunshell")
ply:SetAmmo(0, "fiftyae")
ply:SetAmmo(0, "ninemmgerman")
ply:SetAmmo(0, "ninemmshort")
ply:SetAmmo(0, "sevensixtwoshort")
ply:SetAmmo(0, "sevensixtwobyfiftyone")
ply:SetAmmo(0, "fivefivesix")
ply:SetAmmo(0, "tenmmauto")
ply:SetNWInt("zdadea",1)
ply:SetNWInt("zslot1",0)
ply:SetNWInt("zslot2",0)
ply.chargeduj=0
ply:SetNWInt("toolsoin",0)
ply.skstareg=0
ply.skstaspeed=0
ply.skstapn=0
ply.skplywood=0
ply.skplyfix=0
ply.skingskill=0
ply.skskmed=0
ply.skmzh=0
ply.skmza=0
ply.skmsta=0
ply.skprecision=0
ply.skrecul=0
ply.skrelosp=0
ply.skveng=0
ply.expstareg=0
ply.expstapn=0
ply.expstaspeed=0
ply.expveng=0
ply:SetNWInt("zmatch",0)
ply:SetNWInt("pfuel",0)
ply:SetNWInt("bakpck1",0)
ply:SetNWInt("bakpck2",0)
ply:SetNWInt("bakpck4",0)
ply:SetNWInt("bakpckmm",0)
ply:SetNWInt("hose",0)
ply:SetNWInt("pencil",0)
ply:SetNWInt("cpaper",0)
ply:SetNWInt("montre",0)
ply:SetNWInt("zthermo",0)
ply:SetNWInt("zhex",0)
if zgame=="0" then
if killer:GetClass()=="zmodnpc_szombies" then
ply:ConCommand("fontenf 1 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
elseif killer:GetClass()=="zmodnpc_fzombies" then
ply:ConCommand("fontenf 2 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
elseif ply.FEte==1 then
ply:ConCommand("fontenf 3 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
elseif ply.FHiV==1 then
ply:ConCommand("fontenf 4 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
elseif ply.deadinf==1 then
ply:ConCommand("fontenf 5 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
elseif killer:IsPlayer() and killer!=ply  then
ply:ConCommand("fontenf 6 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
else
ply:ConCommand("fontenf 7 "..plyrespawni.." "..CurTime()-ply:GetNWInt("commencetemps"))
end
elseif zgame=="2" then
ply:ConCommand("fontenfcs")
elseif zgame=="3" then
ply:ConCommand("fontenfvirus")
elseif zgame=="4" or zgame=="5" then
ply:ConCommand("fontenfctf")
end
rsnewrecord(ply)
ply.ts=0
ply:SetNWInt("saignem",0)
ply.loginf=0
ply.actdouleur=0
ply.deadinf=0
ply.FEte=0
ply.FHiV=0
ply.hemor=0
if zgame=="0" then
ply.zombtt=ply:GetNWInt("kills")+ply.zombtt
ply:SetNWInt("kills",0)
ply:SetFrags(0)
ply:SetNWInt("fragpvp",0)
elseif zgame=="2" then
end
ply:SetNWInt("zcont",0)
ply:SetNWInt("commencetemps",-1)
ply:SetNWInt("junk_pile",0)
ply:SetNWInt("wood",0)
ply:SetNWInt("paper",0)
ply:SetNWInt("metal",0)
ply:SetNWInt("cloth",0)
ply:SetNWInt("splank",0)
ply:SetNWInt("lplank",0)
ply:SetNWInt("rope",0)
ply:SetNWInt("nail",0)
ply:SetNWInt("pipe",0)
ply:SetNWInt("mplate",0)
ply:SetNWInt("powdera",0)
ply:SetNWInt("powderb",0)
ply:SetNWInt("powderc",0)
ply:SetNWInt("powderaa",0)
ply:SetNWInt("powderbb",0)
ply:SetNWInt("powdercc",0)
ply:SetNWInt("powderab",0)
ply:SetNWInt("powderac",0)
ply:SetNWInt("powderbc",0)
ply:SetNWInt("jerrycan",0)

ply:SetNWInt("rubanad",0)
ply:SetNWInt("cleamollete",0)
ply:SetNWInt("zflaski",0)
ply:SetNWInt("zbotloi",0)
ply:SetNWInt("zbino",0)
ply:SetNWInt("zcompass",0)
ply:SetNWInt("ztalki",0)

ply:SetNWInt("hg",0)
ply:SetNWInt("canopener",0)
ply:SetNWInt("zhammer",0)
ply:SetNWInt("zaxe",0)
ply:SetNWInt("fg",0)
ply:SetNWInt("zhf",0)
ply:SetNWInt("sw1",0)
ply:SetNWInt("cnote",0)

if killer:GetClass()=="zmodnpc_szombies" then
if ply.Male==true then
ply:EmitSound("vo/npc/male01/pain09.wav",60,100)
else
ply:EmitSound("vo/npc/female01/pain09.wav",60,100)
end
mymsgall( ply:Nick().." killed by Zombies.\n" )
return
end

if killer:GetClass()=="zmodnpc_fzombies" then
if ply.Male==true then
ply:EmitSound("vo/npc/male01/pain09.wav",60,100)
else
ply:EmitSound("vo/npc/female01/pain09.wav",60,100)
end
mymsgall( ply:Nick().." killed by Infected.\n" )
return
end
if ply.mortnotice==1 then
ply.mortnotice=0
return
end

---------------------------------------------
    if ( !IsValid( wep ) && IsValid( killer ) ) then
        wep = killer
    end
    if ( wep && wep == killer && (wep:IsPlayer() || wep:IsNPC()) ) then
        wep = wep:GetActiveWeapon()
        if ( !IsValid( wep ) ) then wep = killer end
    end
   
    if (killer == ply) then
        mymsgall( killer:Nick().." suicided!\n" )
    return end
    if ( killer:IsPlayer() ) then
        mymsgall( killer:Nick().." killed "..ply:Nick().." using "..wep:GetClass().."\n" )
    return end
   
    mymsgall( ply:Nick().." was killed by "..killer:GetClass().."\n" )
end


util.AddNetworkString( "recoipkp" )
function mymsgall(a)
net.Start("recoipkp")
net.WriteString(a)
net.Broadcast()
end

function GM:PlayerDeathThink(ply)
if zgame=="0" then
ply:PrintMessage(HUD_PRINTCENTER,math.Round(ply.nextspawn-CurTime()))
end
return false
end

function GM:DoPlayerDeath(ply, attacker, dmginfo)
    ply:CreateRagdoll()
    ply:AddDeaths(1)
    if (attacker:IsValid() && attacker:IsPlayer()) then
        if (attacker==ply) then
        else
            if zgame=="2" or zgame=="4" or zgame=="5" then
           
            if attacker:GetNWInt("zclan")==ply:GetNWInt("zclan")then
            attacker:AddFrags(1)
            else
        attacker:SetNWInt("advertue",attacker:GetNWInt("advertue")+1)
        attacker:SetNWInt("nollar",attacker:GetNWInt("nollar")+200)
            end
            elseif zgame=="3" then
            if attacker:GetNWInt("zclan")==ply:GetNWInt("zclan")then
            attacker:AddFrags(1)
            else
            attacker:SetNWInt("advertue",attacker:GetNWInt("advertue")+1)
            end
            else
            if gmpve=="1" then
            attacker:AddFrags(1)
            elseif gmpve=="2" then
            attacker:SetNWInt("fragpvp",attacker:GetNWInt("fragpvp")+1)
            end
            end
        end
    end

if ply:InVehicle()then
if ply.viewgun1 then
ply.viewgun1:Remove()
ply.viewgun1=nil
end
if ply.viewswgun1 then
ply.viewswgun1:Remove()
ply.viewswgun1=nil
end
if ply:GetNWInt("zslot1")==1 then
ply.viewmelax:Remove()ply.viewmelax=nil
elseif ply:GetNWInt("zslot1")==2 then
ply.viewmelha:Remove()ply.viewmelha=nil
elseif ply:GetNWInt("zslot1")==3 then
ply.toolssoinv:Remove()ply.toolssoinv=nil
elseif ply:GetNWInt("zslot1")==4 then
ply.toolflare:Remove()ply.toolflare=nil
end
if ply:GetNWInt("zslot2")==1 then
ply.viewmelax:Remove()ply.viewmelax=nil
elseif ply:GetNWInt("zslot2")==2 then
ply.viewmelha:Remove()ply.viewmelha=nil
elseif ply:GetNWInt("zslot2")==3 then
ply.toolssoinv:Remove()ply.toolssoinv=nil
elseif ply:GetNWInt("zslot2")==4 then
ply.toolflare:Remove()ply.toolflare=nil
end

if ply.kevlarv then
ply:SetNWInt("plkevlar",0)
ply.kevlarv:Remove()
ply.kevlarv=nil
end
if ply.bac_1v then
ply.bac_1v:Remove()
ply.bac_1v=nil
end
if ply.bac_2v then
ply.bac_2v:Remove()
ply.bac_2v=nil
end
if ply.bac_3v then
ply.bac_3v:Remove()
ply.bac_3v=nil
end
if ply.bac_4v then
ply.bac_4v:Remove()
ply.bac_4v=nil
end

return end
fk92(ply)
Spe88(ply)
fb89(ply)
fb90(ply)
fb91(ply)
if ply:GetNWInt("zhfv")==1 then
ply:SetNWInt("zhfv",0)
ply.zhfmdl:Remove()
ply.zhfmdl=nil
end
if(ply:GetNWInt("hg")==1 or ply:GetNWInt("hg")==10)then
Spe70(ply)
elseif(ply:GetNWInt("hg")==2 or ply:GetNWInt("hg")==20)then
Spe71(ply)
elseif(ply:GetNWInt("hg")==3 or ply:GetNWInt("hg")==30)then
Spe72(ply)
elseif(ply:GetNWInt("hg")==4 or ply:GetNWInt("hg")==40)then
Spe73(ply)
end
if(ply:GetNWInt("sw1")==1 or ply:GetNWInt("sw1")==10)then
Spe74(ply)
elseif(ply:GetNWInt("sw1")==2 or ply:GetNWInt("sw1")==20)then
Spe75(ply)
elseif(ply:GetNWInt("sw1")==3 or ply:GetNWInt("sw1")==30)then
Spe76(ply)
elseif(ply:GetNWInt("sw1")==4 or ply:GetNWInt("sw1")==40)then
Spe77(ply)
elseif(ply:GetNWInt("sw1")==5 or ply:GetNWInt("sw1")==50)then
Spe78(ply)
elseif(ply:GetNWInt("sw1")==6 or ply:GetNWInt("sw1")==60)then
Spe79(ply)
elseif(ply:GetNWInt("sw1")==7 or ply:GetNWInt("sw1")==70)then
Spe80(ply)
elseif(ply:GetNWInt("sw1")==8 or ply:GetNWInt("sw1")==80)then
Spe81(ply)
elseif(ply:GetNWInt("sw1")==9 or ply:GetNWInt("sw1")==90)then
Spe82(ply)
end
if(ply:GetNWInt("canopener")> 0)then
local ent801=ents.Create("canopener")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
end

if ply:GetNWInt("zslot1")==1 then
ply.viewmelax:Remove()ply.viewmelax=nil
local ent801=ents.Create("zaxe")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
elseif ply:GetNWInt("zslot1")==2 then
ply.viewmelha:Remove()ply.viewmelha=nil
local ent801=ents.Create("zhammer")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
elseif ply:GetNWInt("zslot1")==3 then
ply.toolssoinv:Remove()ply.toolssoinv=nil
local ent801=ents.Create("toolssoin")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
elseif ply:GetNWInt("zslot1")==4 then
ply.toolflare:Remove()ply.toolflare=nil
end

if ply:GetNWInt("zslot2")==1 then
ply.viewmelax:Remove()ply.viewmelax=nil
local ent801=ents.Create("zaxe")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
elseif ply:GetNWInt("zslot2")==2 then
ply.viewmelha:Remove()ply.viewmelha=nil
local ent801=ents.Create("zhammer")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
elseif ply:GetNWInt("zslot2")==3 then
ply.toolssoinv:Remove()ply.toolssoinv=nil
local ent801=ents.Create("toolssoin")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
elseif ply:GetNWInt("zslot2")==4 then
ply.toolflare:Remove()ply.toolflare=nil
end
if(ply:GetAmmoCount("ninemmgerman")>=1)then
local ent801=ents.Create("zmod_ammo_9mm")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("ninemmgerman")
end
if(ply:GetAmmoCount("shotgunshell")>=1)then
local ent801=ents.Create("zmod_ammo_shotgun")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("shotgunshell")
end
if(ply:GetAmmoCount("fiftyae")>=1)then
local ent801=ents.Create("zmod_ammo_50ae")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("fiftyae")
end
if(ply:GetAmmoCount("tenmmauto")>=1)then
local ent801=ents.Create("zmod_ammo_10auto")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("tenmmauto")
end
if(ply:GetAmmoCount("fivefivesix")>=1)then
local ent801=ents.Create("zmod_ammo_556nato")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("fivefivesix")
end
if(ply:GetAmmoCount("sevensixtwobyfiftyone")>=1)then
local ent801=ents.Create("zmod_ammo_762nato")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("sevensixtwobyfiftyone")
end
if(ply:GetAmmoCount("sevensixtwoshort")>=1)then
local ent801=ents.Create("zmod_ammo_762smm")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("sevensixtwoshort")
end
if(ply:GetAmmoCount("ninemmshort")>=1)then
local ent801=ents.Create("zmod_ammo_9smm")
ent801:SetPos(ply:GetPos()+Vector(0,0,50))
ent801:Spawn()
ent801.clip=ply:GetAmmoCount("ninemmshort")
end
end
Back to top Go down
https://scriptfodder.com/users/view/76561198033784269
 
Brouillon PlayerSelectSpawn
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Zworld Afterlife Zombie Survival Horror :: 🇫🇷 Forum Français :: 
Aide, Support & Requête
 :: 🔧 Support Zworld :: 📓 Bug / Glitch / Erreur LUA
-
Jump to:  
http://projectzomboid.fr/news/news.phphttps://www.online.net/frhttp://zworld-afterlife.fr/https://originahl-scripts.com/gmod-scripts