I have this code in my gamemode :
[PHP]/*---------------------------------------------------------
Weapons & playermodels system when you start the game by phpmysql
---------------------------------------------------------*/
function GM:PlayerSpawn(ply)
self.BaseClass:PlayerSpawn(ply)
if ply:Team() == TEAM_BLUE then
ply:SetModel("models/player/barney.mdl") -- BLUE DEFAULT PLAYERMODEL eg: models/player/alien.mdl
ply:SetHealth(100) -- -- DEFAULT HEALTH,RUNSPEED AND WALKSPEED BLUE TEAM
ply:SetRunSpeed(700)
ply:SetWalkSpeed(400)
ply:Give("weapon_crowbar") --- WEAPONS FOR THE TEAM BLUE
else
ply:SetModel("models/player/police.mdl") -- RED DEFAULT PLAYERMODEL eg: models/player/predator.mdl
ply:SetHealth(100) -- -- DEFAULT HEALTH,RUNSPEED AND WALKSPEED RED TEAM
ply:SetRunSpeed(700)
ply:SetWalkSpeed(400)
ply:Give("weapon_crowbar") -- WEAPONS FOR THE TEAM RED
end
end[/PHP]Is possible to do this ? (if players got 8 points on [URL="http://img223.imageshack.us/img223/3969/csmilitia0000ct1.jpg"]scoreboard[/URL] give to him another item)
[B]if scoreboard_points == "8"{
ply:Give("weapon_pistol") -- UPGRADE DUE TO MORE POINTS IN SCOREBOARD
} [/B]
For example :
[PHP]/*---------------------------------------------------------
Weapons & playermodels system when you start the game by phpmysql
---------------------------------------------------------*/
function GM:PlayerSpawn(ply)
self.BaseClass:PlayerSpawn(ply)
if ply:Team() == TEAM_BLUE then
ply:SetModel("models/player/barney.mdl") -- BLUE DEFAULT PLAYERMODEL eg: models/player/alien.mdl
ply:SetHealth(100) -- -- DEFAULT HEALTH,RUNSPEED AND WALKSPEED BLUE TEAM
ply:SetRunSpeed(700)
ply:SetWalkSpeed(400)
ply:Give("weapon_crowbar") --- WEAPONS FOR THE TEAM BLUE
if scoreboard_points == "8"{
ply:Give("weapon_pistol") -- UPGRADE DUE TO MORE POINTS IN SCOREBOARD
}
else
ply:SetModel("models/player/police.mdl") -- RED DEFAULT PLAYERMODEL eg: models/player/predator.mdl
ply:SetHealth(100) -- -- DEFAULT HEALTH,RUNSPEED AND WALKSPEED RED TEAM
ply:SetRunSpeed(700)
ply:SetWalkSpeed(400)
ply:Give("weapon_crowbar") -- WEAPONS FOR THE TEAM RED
if scoreboard_points == "8"{
ply:Give("weapon_pistol") -- UPGRADE DUE TO MORE POINTS IN SCOREBOARD
}
end
end[/PHP]
Is this sort of what you want?
[lua]
if ( ply:Frags() == 8 ) then
ply:Give("weapon_pistol")
end
[/lua]
yeah it is, thanks. now i can make a css gamemode with classes upgrade
[B]Edit:[/B]
This is the code that i am using :
[PHP] if ( ply:Frags() == 5 ) then
ply:Give("weapon_mad_p228")
ply:Give("weapon_mad_grenade")
ply:Give("weapon_mad_flash")
end
if ( ply:Frags() == 10 ) then
ply:Give("weapon_mad_xm1014")
ply:Give("weapon_mad_ump")
end
if ( ply:Frags() == 15 ) then
ply:Give("weapon_mad_m4a1")
ply:Give("weapon_mad_awp")
end[/PHP]any way to put something like if [B]ply:Frags[/B] is between 5 and 10?
if ply:Frags > 5 and ply:Frags < 10 then
Sorry, you need to Log In to post a reply to this thread.