16.12.2010, 17:20
Quote:
|
Hello again! OK, i have a question about DCMD thinks... For example on this script:
pawn Код:
![]() |
pawn Код:
dcmd_setcash(playerid, params[])
{
new nome_playerid[30],nome_id[30]; GetPlayerName(playerid, nome_playerid, 30); GetPlayerName(playerid, nome_id, 30);
new id, tmp[256], tmp2[256], Index; new string[128]; new cash;
tmp = strtok(params,Index); new string3[128]; new string4[128];
tmp2 = strtok(params,Index);
id = strval(tmp);
cash = strval(tmp2);
format(string,sizeof(string),"Level minimo requerido й 3. O seu й %d, embora", PlayerInfo[playerid][Level]);
if(PlayerInfo[playerid][Level] < 3) return SendClientMessage(playerid, VERMELHO, string);
if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return SendClientMessage(playerid, VERMELHO, "USAGE: /setcash <ID>");
if(!IsPlayerConnected(id)) SendClientMessage(playerid, VERMELHO, "Player selecionado estб offline");
format(string3,sizeof(string3),"Vocк mudou o dinheiro de %s para %d", nome_id, cash);
format(string4,sizeof(string4),"ADMIN %s setou seu dinheiro para %d", nome_playerid, cash);
ResetPlayerMoney(id) && GivePlayerMoney(id, cash) && SendClientMessage(playerid, AZUL, string3) && SendClientMessage(id, AZUL, string4);
return 1;
}



