15.04.2013, 15:42
pawn Код:
if(strcmp(cmd, "/darcash", true) ==0 || strcmp(cmd, "/scash", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1342)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darcash [id] [Quantidade]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darcash [id] [Quantidade]");
return 1;
}
level = strval(tmp);
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(string, sizeof string, "Vocк Deu %d De Cash para %s", level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof string, "Vocк ganhou %d De Cash do admin Por{FF34B3}%s", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, 256, "AdmCmd: O Admin [%s] estб dando [%d] De CASH para [%s].",sendername,level,giveplayer);
ABroadCast(COLOR_LIGHTRED,string,1);
getdate(year, month, day);
gettime(hour,minute,second);
PlayerInfo[para1][pCashP] = level;
}
}
}
return 1;
}