SA-MP Forums Archive
Wierd problem with CommandText - 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: Wierd problem with CommandText (/showthread.php?tid=81426)



Wierd problem with CommandText - Tisca - 10.06.2009

Hello guys.

I got a problem, i would like to add more than 1 command to use, i got /setskin, and it sets my skin to ID 19, but if i try to script in any other things, like /kick, etc, it wont work.

Pastebin link here : http://pastebin.com/m7d6220e5

Regards Alex.


Re: Wierd problem with CommandText - Metorea - 10.06.2009

You are not returning a value after the command. Put this:

pawn Код:
if(strcmp(cmdtext, "/kick", true ) == 0) )
    {
      // Kick
      Kick(playerid);
      return 1;
}



Re: Wierd problem with CommandText - Tisca - 10.06.2009

It dosent give me any warnings or errors anymore, but the command dosent work now.

My script looks like this now.

http://pastebin.com/m7c3370c0

Regards.


Re: Wierd problem with CommandText - dice7 - 10.06.2009

return 0; at the end, instead of 1.
Also, /kick command will kick the one who types it