kick - 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 (
/showthread.php?tid=436952)
kick -
colonel-top - 13.05.2013
so im not sure about my scriptscan someone tell me if it wrong lol thx >
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/kick0",cmdtext, true) == 0)
{
Kick(playerid,0);
return 1;
}
return 0;
}
"so i want this cmdkick only id0"
Re: kick -
MP2 - 13.05.2013
Well that's definitely not the way to go about scripting commands. Look at ANY other script to see how to do this.
Re: kick -
Calabresi - 13.05.2013
EDIT: It is very
mature to support someone who wants to help with negative behaviours. Deleted.
Re: kick -
-CaRRoT - 13.05.2013
Not really - That CMD won't work.
Lemme explain why
- If you check at wiki the kick function.
You'll find that it is only usable like that -
You can't specify a certain ID - So that won't work
Inorder to get another player ID - You'll need to use SSCANF or strtok
However - SSCANF won't work with strcmp [The command processor]
So you'll have to learn strtok inorder to make CMD's that would interact with other ID's.
Notice : "playerid" means the ID of the player that used the CMD.