20.11.2010, 20:32
Quote:
How do i make this, Make this command for only a person with a 5 killstreak?
|
pawn Код:
new pKills[MAX_PLAYERS];
pawn Код:
pKills[playerid] = 0;
pawn Код:
pKills[killerid]++; //Add one kill to the one who killed.
pKills[playerid] = 0; //When someone dies, reset their kills.
pawn Код:
if(strcmp(cmdtext, "/command", true)==0)
{
if(pKills[playerid] => 5)
{
//Code here
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "You need to have a killstreak of 5 kills or more to use this command.");
}
return 1;
}