Killstreak?
#7

Quote:
Originally Posted by BigAl
Посмотреть сообщение
How do i make this, Make this command for only a person with a 5 killstreak?
Top of script:
pawn Код:
new pKills[MAX_PLAYERS];
OnPlayerConnect (OnPlayerDisconnect to if you want):
pawn Код:
pKills[playerid] = 0;
OnPlayerDeath:
pawn Код:
pKills[killerid]++; //Add one kill to the one who killed.
pKills[playerid] = 0; //When someone dies, reset their kills.
OnPlayerCommandText:
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;
}
Reply


Messages In This Thread
Killstreak? - by BigAl - 20.11.2010, 20:19
Re: Killstreak? - by Whizion - 20.11.2010, 20:22
Re: Killstreak? - by BigAl - 20.11.2010, 20:23
Re: Killstreak? - by WillyP - 20.11.2010, 20:25
Re: Killstreak? - by [L3th4l] - 20.11.2010, 20:27
Re: Killstreak? - by Whizion - 20.11.2010, 20:28
Re: Killstreak? - by [NWA]Hannes - 20.11.2010, 20:32
Re: Killstreak? - by BigAl - 20.11.2010, 20:40
Re: Killstreak? - by WillyP - 20.11.2010, 20:47

Forum Jump:


Users browsing this thread: 5 Guest(s)