09.05.2012, 11:51
pawn Код:
if(strcmp(cmd, "/darhelper", true) == 0 && PlayerInfo[playerid][pAdmin] == 1340)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darhelper [id] [Numero(1-3)]");
return 1;
}
new para2;
new level2;
para2 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level2 = strval(tmp);
GetPlayerName(playerid, sendername, 256);
{
if(IsPlayerConnected(para2))
{
if(para2 != INVALID_PLAYER_ID)
{
GetPlayerName(para2, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para2][pHelper] = level2;
printf("ADMIN CMD: %s promoveu %s a level %d de helper.", sendername, giveplayer, level2);
format(string, sizeof(string), " Voce foi promovido para level %d de Helper - Por %s", level2, PlayerName(playerid));
SendClientMessage(para2, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Voce promoveu o(a) %s Para o level %d de Helper.", giveplayer,level2);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s Promoveu %s a Helper level %d ",sendername,giveplayer,level2);
}
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[BLSF]: Voce nгo esta autorizado a usar este comando!");
}
}
return 1;
}