01.05.2011, 00:23
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/dargrana", true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xB4B5B7FF,"USO: /dargrana [ID] [dinheiro]" );
new giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xB4B5B7FF,"USO: /dargrana [ID] [dinheiro]" );
new grana = strval(tmp);
if(grana < 1 && grana > 100000) return SendClientMessage(playerid, 0xC2A2DAAA," Os valores devem estar entre R$ 1 e R$ 100.000");
AddReal(giveplayerid,grana);
}
return 1;
}