12.11.2012, 18:05
PHP код:
if (strcmp(cmd,"/givemoney",true) == 0)
{
if(JugadorInfo[playerid][jAdmin] >= 6)
{
new playerid2; new grana; new String[128];
tmp = strtok(cmdtext,idx);
playerid2 = strval(tmp);
if (!strlen(tmp)) return SendClientMessage(playerid,-1,"Use: /givemoney [ID/Name] [Money]");
if (!IsPlayerConnected(playerid2)) return SendClientMessage(playerid,-1,"The player is not online");
tmp = strtok(cmdtext,idx);
grana = strval(tmp);
if (!strlen(tmp)) return SendClientMessage(playerid,-1,"Use: /givemoney [ID/Name] [Money]");
GivePlayerMoney(playerid2,grana);
format(String,128,"You gave $%i for ID: %i",grana,playerid2);
SendClientMessage(playerid,-1,String);
return true;
}
else
{
SendClientMessage(playerid,0xBFBFBFAA,"You cant use this command.");
return 1;
}
}