How to do this code when you add kills reads... -
How to do this code when you add kills reads "You add x kills a player PlayerName "?
Код:
if(strcmp(cmd, "/setkill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setkill [Playerid/PartOfName] [kills]");
return 1;
}
new playa;
new kills1;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
kills1 = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(playa))
{
if(playa!= INVALID_PLAYER_ID)
{
PlayerInfo[playa][pKills] = kills1;
SetPlayerScore(playa, PlayerInfo[playa][pKills]);
}
}
}
}
return 1;
}