SA-MP Forums Archive
How to make commands and where? - 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)
+--- Thread: How to make commands and where? (/showthread.php?tid=461343)



How to make commands and where? - MAFIAWARS - 01.09.2013

Hello! Everyone is telling me to make commands via zcmd. Ok I downloaded it. Can any one tell me now what I have to do to create commands and where should I start it from?

Regards:

Begineer


Re: How to make commands and where? - DamonD - 01.09.2013

You should start by reading [https://sampwiki.blast.hk/].


Re: How to make commands and where? - Konstantinos - 01.09.2013

Is this thread about how to use ZCMD? If so, then search! ****** it: "samp zcmd tutorials" and you're going to find many results.


Re: How to make commands and where? - MAFIAWARS - 01.09.2013

Just tell me under which text i create commands
For Example:
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}

Under it or where I start to make commands??

CMD: "kick" where do I start working from?


Re: How to make commands and where? - Konstantinos - 01.09.2013

Quote:
Originally Posted by MAFIAWARS
Посмотреть сообщение
Just tell me under which text i create commands
For Example:


Under it or where I start to make commands??

CMD: "kick" where do I start working from?
Don't be lazy. If you read atleast a tutorial, all of your questions will be solved.

PS: This is where I learned how to use ZCMD + sscanf: https://sampforum.blast.hk/showthread.php?tid=280476


Re: How to make commands and where? - SampGaming - 01.09.2013

Well find this and it basically gives you the format..

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}




Re: How to make commands and where? - Konstantinos - 01.09.2013

Quote:
Originally Posted by SampGaming
Посмотреть сообщение
Well find this and it basically gives you the format..
He wants to use ZCMD, not the strcmp..

Don't use this callback at all, remove it.

Commands from ZCMD needs to be out of any callback.


Re: How to make commands and where? - MAFIAWARS - 01.09.2013

Just telllllllllllllll me Where to start??
From where I write to start CMD: heal etc.?


Re: How to make commands and where? - doreto - 01.09.2013

Everywhere you want but need to be OUTSIDE any callback (if you want you can write them at bottom or top of your fs/gm)


Re: How to make commands and where? - MAFIAWARS - 01.09.2013

Thanks doreto, But can you give me an Example?

Just post here a command of /heal