25.03.2012, 13:33
pawn Код:
//zcmd
CMD:sortear(playerid, params[])
{
new Quantia;
if(sscanf(params, "d",Quantia))
return SendClientMessage(playerid, -1, "/sortear [quantia]");
new VBString[64],VBNome[MAX_PLAYER_NAME],VBRand;
VBRand = random(GetMaxPlayers());
GetPlayerName(VBRand, VBNome, MAX_PLAYER_NAME);
GivePlayerMoney(VBRand,Quantia);
format(VBString,sizeof VBString,"%s foi sorteado e ganhou %d.",VBNome,Quantia);
SendClientMessageToAll(-1,BornString);
return true;
}