SA-MP Forums Archive
/kick in STRCMP [+REP] - 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: /kick in STRCMP [+REP] (/showthread.php?tid=596424)



/kick in STRCMP [+REP] - [SU]Spartan - 17.12.2015

Hey guys,
I am not experienced at using target ids yet so I'd like to make a /kick [id] [reason] command using STRCMP But I don't really know how to,Who ever helps me gets REP+


Re: /kick in STRCMP [+REP] - Vince - 17.12.2015

Mind blown. Using strcmp/strtok is actually more complicated than using ZCMD and sscanf.


Re: /kick in STRCMP [+REP] - [SU]Spartan - 17.12.2015

I know but I have made all my script in STRCMP I can't change it now please.


Re: /kick in STRCMP [+REP] - SickAttack - 17.12.2015

https://sampwiki.blast.hk/wiki/Creating_Commands
https://sampwiki.blast.hk/wiki/Strtok

Second link has a kick command.

REP THE WIKI!!!


Re: /kick in STRCMP [+REP] - PrO.GameR - 17.12.2015

Quote:
Originally Posted by [SU]Spartan
Посмотреть сообщение
I know but I have made all my script in STRCMP I can't change it now please.
Yes you can
If you have +20k line code for all the basic systems without anything interesting or mappings, you are doing it wrong, each basic system wouldn't take more than 2k lines, unique or advanced systems on the other hand are a different story, and I'm 100% sure that no one would/could create an advanced systems without learning optimized ways like having sscanf or ZCMD

So yeah, stop being lazy, try to learn because best person that can help you is yourself.


Re: /kick in STRCMP [+REP] - xXRevolverXx - 18.12.2015

the callback:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{


and the code:

Код:
if(strcmp(cmdtext, "/kickme", true) == 0)
    {
        // Kicks the player who executed this command
        Kick(playerid);
        return 1;
    }
    return 0;
}


Hope i helped, Pm me if you'd like to know anything or any help.