ATENTION: Need your help right now!
#1

That command practically don't work, but why?!!

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;
}

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 ?!!
Reply
#2

Whoa, please indent that so that it can be read by a human.
Reply
#3

Ditto
Reply
#4

http://pastebin.com/m22af55e2 I didn't fix it, but at least it's indented. Hahaha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)