30.11.2009, 17:42
That command practically don't work, but why?!!
example:
When i type /blablabla , it shows me a usage... but when i type /blablabla 0 5000, all commands become unknown ,server crashes...
In what can be the problem ?!!
example:
Quote:
if(strcmp(cmd,"/blablabla",true)==0) { tmp = strtok(cmdtext,idx); tmp2 = strtok(cmdtext,idx); if(IsPlayerLevel(playerid,5)) { if (!strlen(tmp)) { SendClientMessage(playerid,COLOUR_ORANGE,"Usage: /blablabla <ID> <CASH>"); return 1; } new ref[MAX_PLAYER_NAME]; GetPlayerName(strval(tmp),ref,sizeof(ref)); if(IsPlayerConnected(strval(tmp))) { if(strval(tmp2)<1000000001) { new nameh[MAX_PLAYER_NAME]; GetPlayerName(strval(tmp),nameh,sizeof(nameh)); new PFh[256]; format(PFh,sizeof(PFh),"LSDM/players/%s.ini",udb_encode(nameh)); GivePlayerMoney(strval(tmp),strval(tmp2)); CCCash[strval(tmp)]=CCCash[strval(tmp)]+strval(tmp2); //dini_IntSet(PFh,"cccash",GetPlayerMoney(strval(tmp ))); format(string,sizeof(string)," You gived %s $%s.",ref,tmp2); SendClientMessage(playerid,yellow,string); // format(string,sizeof(string)," bla %s bla $%s.",name,tmp2); format(string,sizeof(string)," Administrator %s gives you $%s.",name,tmp2); SendClientMessage(strval(tmp),yellow,string); format(string,sizeof(string)," * %s Used a command '/blabla'.",name); SendMessageToAdminEx(playerid,string); } else SendClientMessage(playerid,red,"Error: To much!"); } else SendClientMessage(playerid,red,"Error: Invalid ID!"); } else AdminError(playerid,5); return 1; } |
In what can be the problem ?!!