30.11.2012, 10:51
pawn Код:
if(strcmp(cmd, "/givelp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (sscanf(params, "dis", targetid,number)) return SendClientMessage(playerid, red, "USAGE: /setspree [playerid] [spree]");
new exp;
exp = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4 || IsPlayerAdmin(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
PlayerInfo[i][Exp] += exp;
format(string, sizeof(string), "%s give to all players %d LP", PlayerName(playerid), exp);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You didn't have admin rights!");
}
}
return 1;
}