19.05.2012, 01:04
pawn Код:
CMD:setkills(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 1337)
{
new giveplayerid, kills, string[128];
if(sscanf(params, "ud", giveplayerid, kills) return SendClientMessage(playerid, -1, "USAGE: /setkills [playerid] [amount]")
if(IsPlayerConnected(giveplayerid))
{
new PName[64];
GetPlayerName(playerid, PName, sizeof(PName));
PlayerInfo[giveplayerid][Kills] = amount;
format(string, sizeof(string), "Your kills have been set to %d", amount);
SendClientMessage(giveplayerid, -1, string);
format(string, sizeof(string), "You have set %s's kills to %d", PName, amount);
SendClientMessage(playerid, -1, string);
}
}
else
{
SendClientMessage(playerid, -1, "You are not authorized to use this command!");
return 1;
}
return 1;
}
You should be able to use that for a guide for /setdeaths, if not, let me know and i'll make that to.
You can also change "1337" to whatever level you want, and "-1" to any color you want.
Hope this helps!