08.01.2011, 21:15
pawn Код:
dcmd_giverpp(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 3)
{
new tmp2[256], Index, player1;
tmp = strtok(params,Index)
player1 = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, red, "USAGE: /giverpp [playerid]");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
CMDMessageToAdmins(playerid,"GIVERPP");
PlayerData[player1][Rpp]++;
format(string, sizeof(string), "You have given a Roleplay Point To \"%s\"", PlayerName2(player1);
SendClientMessage(playerid,yellow,string);
if(player1 != playerid)
{
format(string,sizeof(string),"Administrator \"%s\" has given you a Roleplay Point", PlayerName2(playerid);
SendClientMessage(player1,yellow,string);
PlayerData[playerid][Rpp]++;
}
} else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
return 1;
}