[HELP] Simple Kick as Rcon and Specific Job - 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] Simple Kick as Rcon and Specific Job (
/showthread.php?tid=64122)
[HELP] Simple Kick as Rcon and Specific Job -
shark - 02.02.2009
Hi,
I'm in trouble! So, I just need a little help :P
I just want a simple /kick, where the Rcon Admin and Specific Job (I already had the function to this job) could kick a player, with ID.
Код:
if(strcmp(cmd, "/kick",true) == 0) {
if(Job[playerid] == GM || IsPlayerIsAdmin(playerid)) {
SendClientMessage(playerid,COLOR_RED),"You've been kicked.");
............ continued
I know this lines are wrong, but this is an example for what I want.
So, anyone can help me?
Thanks!
Re: [HELP] Simple Kick as Rcon and Specific Job -
Mikep - 02.02.2009
Search for sscanf/strtok
Re: [HELP] Simple Kick as Rcon and Specific Job -
shark - 02.02.2009
Quote:
Originally Posted by Mikep
Search for sscanf/strtok
|
I don't get your point. What do you mean?
I did, but don't help me
Re: [HELP] Simple Kick as Rcon and Specific Job -
Mikep - 02.02.2009
You don't know what "search" means?
Re: [HELP] Simple Kick as Rcon and Specific Job -
shark - 02.02.2009
Quote:
Originally Posted by Mikep
You don't know what "search" means?
|
I know what means.
I just don't get what looking for sscanf/strtok can help me!
I know a little bit about strtok, but I never heard about sscanf.
I know it's suck for people asking full commands. But mine it's very simple, and I can't complete
Re: [HELP] Simple Kick as Rcon and Specific Job -
ICECOLDKILLAK8 - 02.02.2009
Use a combination of strtok/sscanf and ReturnUser
Re: [HELP] Simple Kick as Rcon and Specific Job -
shark - 02.02.2009
I'm newbie, I can't make full commands
Re: [HELP] Simple Kick as Rcon and Specific Job -
Nero_3D - 02.02.2009
pawn Код:
if(!strcmp("/kick", cmdtext, true, 5) && (Job[playerid] == GM || IsPlayerIsAdmin(playerid)))
if(!(cmdtext[5] || '0' <= cmdtext[6] <= '9')) return SendClientMessage(playerid, 0xFFFFFFAA, "Right Usage: /kick [playerid]");
else if(!Kick(strval(cmdtext[6]))) return SendClientMessage(playerid, 0xFFFFFFAA, "Warning: Invalid Playerid");
else return SendClientMessage(playerid, 0xFFFFFFAA, "Player successfully kicked!");
Re: [HELP] Simple Kick as Rcon and Specific Job -
shark - 02.02.2009
Thanks, it's working!
Thanks all of you guyz.