Posts: 508
Threads: 68
Joined: Feb 2009
Reputation:
0
Hey GuyZ,
I made this topic cause my other one wasnt really responding..
Does someone have a good /kick script?
Cause i have a good one but it doesnt have a 'Reason', so does anyone have a /kick id reason script?
Please post.
Thanks
Posts: 6,340
Threads: 58
Joined: May 2009
Reputation:
0
You can find it in many admin scripts if you want just an example.
Posts: 508
Threads: 68
Joined: Feb 2009
Reputation:
0
I tried very much admin scripts and pasted it into my script but i got errors with all scripts..
Posts: 221
Threads: 19
Joined: Nov 2009
Here's Mine, I use Teams aswell as Rcon. If you need me to edit I will. Works like a charm!
Код:
if(strcmp(cmd, "/kick", true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [Player ID]");
return 1;
}
giveplayerid = strval(tmp);
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
//GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerAdmin(playerid) == 1 || (L2M[playerid]==1) || (L3M[playerid]==1) ){
if (IsPlayerAdmin(giveplayerid) == 0) {
Kick(giveplayerid);
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
SendClientMessageToAll(COLOR_WHITE,string);
format(string, sizeof(string), "RADICAL RP ADMINISTRATIVE NOTICE");
SendClientMessageToAll(COLOR_BRIGHTRED,string);
format(string, sizeof(string), "%s has been kicked from the server.",giveplayername);
SendClientMessageToAll(COLOR_BLUE,string);
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
SendClientMessageToAll(COLOR_WHITE,string);
printf("%s",string);
}else{
SendClientMessage(playerid, COLOR_RED, "Invalid player ID.");
}
}else{
SendClientMessage(playerid, COLOR_RED, "You are not authorized to use this command.");
}
return 1;
}
Posts: 6,340
Threads: 58
Joined: May 2009
Reputation:
0
The best way for you is to use zcmd + sscanf.