Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PlayerC
- {
- score = null;
- constructor()
- {
- score = 0;
- }
- function AddScorePlayer(what)
- {
- //Check to prevent our score from going into negative since we can AddScore(-50) for example
- if(score + what >= 0)
- {
- score += what;
- }
- }
- }
- ::players <- {}
- function PlayerStart()
- {
- if(activator.GetTeam() == 3)
- {
- p = activator;
- players[p] <- Playerc();
- p.SetModel("models/player/custom_player/kuristaja/cso2/sas/sas.mdl");
- p.__KeyValueFromString("targetname", "player");
- EntFire( "playerspeed", "ModifySpeed", "1.0", 0.0, p);
- EntFire( "ammo_give", "GiveAmmo","", 0.0, p);
- EntFire( "equip_player","Use","",0.0, p);
- p.SetMaxHealth(400);
- p.SetHealth(200);
- EntFire("text","SetText","SCORE : "+score,0.0,p);
- EntFire("text_dash","Display","",0.0,p);
- EntFire("text","Display","",0.0,p);
- }
- }
- function AddScore(who, what)
- {
- players[who].AddScorePlayer(what);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement