SA-MP Forums Archive
Gamemodes and commands? - 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: Gamemodes and commands? (/showthread.php?tid=234507)



Gamemodes and commands? - Tcoy - 03.03.2011

How do i get new commands and an rp gamemode ive been looking at tuts but i just dont get it


Re: Gamemodes and commands? - austin070 - 03.03.2011

It's easy. The simplest way to make a command is using strcmp. Here's an example.

pawn Код:
if(strcmp(cmdtext, "/hello", true, 6)== 0) //the 6 is the length of the command. /hello is 6 characters
        {
            SendClientMessageToAll(0xFFFFFFFF, "Hello everyone!"); //this makes it so if players type /hello, it sends a message to everyone saying "Hello everyone!". 0xFFFFFFFF is the color of the text, which can be changed.
            return 1;
        }
Of course there are more advanced ways to make commands. Some things like strtok and zcmd fit different kinds of commands such as a private message command.


Re: Gamemodes and commands? - grand.Theft.Otto - 04.03.2011

Making your own server takes a lot of time and is very hard work, no matter if it's a Deathmatch server to a Roleplay.

Refer to this link: http://forum.sa-mp.com/forumdisplay.php?f=71 for pages of released gamemodes that others have created and published here for newbies (like you) to use for their first time.

https://sampwiki.blast.hk/ - Wikipedia for SA-MP

https://sampwiki.blast.hk/wiki/OnPlayerCommandText - How to make a command

Reply if you need anymore help.


Re: Gamemodes and commands? - Tcoy - 04.03.2011

How do i install them?