player kill cop score help
#1

ok i have 2 teams citizens and police

i wanna make it like if a citizens kill a police he gains 1+ score
Код:
if(classid == 0 || classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9 || classid == 10 || classid == 11 || classid == 12)
	{
	SetPlayerTeam(playerid,1);
	GameTextForPlayer(playerid,"~b~Police",5000,1);
	}
	else
	{
	SetPlayerTeam(playerid,2);
	GameTextForPlayer(playerid,"~w~Citizen",5000,1);
	}
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason) {
     if(GetPlayerTeam(playerid) == 1 && GetPlayerTeam(killerid) == 2) {
         //score stuff here
     }
}
Reply
#3

i need a tester to see if it works now<.<

69.73.201.245:7777
Reply
#4

Код:
public OnPlayerDeath(playerid, killerid, reason) 
{
     if(GetPlayerTeam(playerid) == 1 && GetPlayerTeam(killerid) == 2) 
    {
      SetPlayerScore(killerid,GetPlayerScore(kilerid)+1);  
    }

    return 1;
}
Reply
#5

kk come bac on i added urs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)