[HELP] Simple Kick as Rcon and Specific Job
#1

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!

Reply
#2

Search for sscanf/strtok
Reply
#3

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
Reply
#4

You don't know what "search" means?
Reply
#5

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
Reply
#6

Use a combination of strtok/sscanf and ReturnUser
Reply
#7

I'm newbie, I can't make full commands
Reply
#8

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!");
Reply
#9

Thanks, it's working!

Thanks all of you guyz.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)