SA-MP Forums Archive
ATENTION: Need your help right now! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ATENTION: Need your help right now! (/showthread.php?tid=111247)



ATENTION: Need your help right now! - Headyheadster - 30.11.2009

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 ?!!


Re: ATENTION: Need your help right now! - Danny_Costelo - 30.11.2009

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


Re: ATENTION: Need your help right now! - Enzo_Ferrari_V12 - 03.12.2009

Ditto


Re: ATENTION: Need your help right now! - Backwardsman97 - 03.12.2009

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