SA-MP Forums Archive
{help} /help - 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: {help} /help (/showthread.php?tid=136704)



{help} /help - MatthewGarrowo - 26.03.2010

how do i make a /help i been looking for tuts for along time i only found a couple but none on /help can anyone help


Re: {help} /help - Carlton - 26.03.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
   if(!strcmp(cmdtext, "/help", true)) {
     // Your code here.
   }
}



Re: {help} /help - MatthewGarrowo - 26.03.2010

thanks



Re: {help} /help - MatthewGarrowo - 26.03.2010

actually i dont even kno how to add these type of things can you send me a tut or show me how plz?


Re: {help} /help - Rac3r - 26.03.2010

https://sampwiki.blast.hk/wiki/OnPlayerCommandText

https://sampwiki.blast.hk/wiki/Main_Page


Re: {help} /help - Carlton - 26.03.2010

Read https://sampwiki.blast.hk/wiki/ if you don't know what to add or how to add a code inside the command.


Re: {help} /help - MatthewGarrowo - 26.03.2010

thanks


Re: {help} /help - Flake. - 26.03.2010

Quote:
Originally Posted by MatthewGarrowo
thanks
i just typed up a whole tut and its all answered meh wth
i can try
so u want to know about messages conserning
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
   if(!strcmp(cmdtext, "/help", true)) {
     // Your code here.
   }
}
you can use a number of diffrent ways to get a message out via command

you can use smth like this

pawn Код:
if(strcmp("/noob", cmdtext, true) == 0)
    {
        SendClientMessage(playerid, COLOR_GREEN, "i see your new to the server");
        return 1;
    }
this will just give a simple message to the player in main chat with is GREEN

or you can make smth like this

pawn Код:
if(strcmp("/noob", cmdtext, true) == 0)
    {
         GameTextForPlayer(killerid,"~g~ i see your new",1200,3);
        return 1;
    }
this will send a message to the player in GREEN on the screen you can change the time / Text using this part
pawn Код:
1200,3
thats in milli seconds

i hope this helps you understand you can also display textdraws through commands like this

pawn Код:
if (strcmp("/noob", cmdtext, true) == 0)
    {
     TextDrawShowForPlayer(playerid,welcome1);
    return 1;
    }
i hope this is what you mean by Understanding :P