SA-MP Forums Archive
OMFG THIS COMMAND! - 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: OMFG THIS COMMAND! (/showthread.php?tid=183729)



OMFG THIS COMMAND! - Thebest96 - 16.10.2010

[pawno]if (strcmp("/paytoll", cmdtext, true, 10) == 0)
{
MoveObject(paytoll1,-5.88480759,-1363.50390625,17.0, 3);
}
[/pawno]


DEFINES:

new paytoll1;

When i do /paytoll the server say: UNKNOW COMMAND PLEASE HELP!!!!!


Re: OMFG THIS COMMAND! - Mauzen - 16.10.2010

You have to return 1 at the end of every command, or the server will say it is unknown.


Respuesta: OMFG THIS COMMAND! - The_Moddler - 16.10.2010

pawn Код:
if (strcmp("/paytoll", cmdtext, true, 10) == 0)
{
    MoveObject(paytoll1,-5.88480759,-1363.50390625,17.0, 3);
    return 1;
}



Re: OMFG THIS COMMAND! - Thebest96 - 16.10.2010

Now works. LOL ty noob TOPIC but ty


Re: OMFG THIS COMMAND! - Toni - 16.10.2010

You should really learn what strcmp does and how to use it correctly...don't try to use a length for a command unless it's needed; else its completely useless, or could make the command dysfunction.

strcmp


Re: OMFG THIS COMMAND! - Thebest96 - 16.10.2010

lol i didnt see the return 1; forgeted... anyways thanks


Re: OMFG THIS COMMAND! - SkizzoTrick - 16.10.2010

-----------


Re: OMFG THIS COMMAND! - Ritchie999 - 16.10.2010

also you should do something like "GivePlayerMoney(id, -100);". I noticed its "/paytoll" but only has "Moveobject"