Posts: 789
Threads: 76
Joined: Nov 2011
Reputation:
0
I would need the code snippets of /kick, /warn, /ban and /pm and /complain.
I am sure there are something with your code which is fixable, but you need to show it before we can fix anything.
Posts: 789
Threads: 76
Joined: Nov 2011
Reputation:
0
Show me the line where it says: "There are multimple players online with that name, or noone at all, please narrow your search"
Posts: 789
Threads: 76
Joined: Nov 2011
Reputation:
0
Copy the whole /kick code for me, and i will have a look.
Posts: 55
Threads: 6
Joined: Jul 2012
Reputation:
0
dcmd_kick(playerid, params[])
{
if(UserStats[playerid][Admin] >= 1)
{
new id, string[70],reason[156];
reason = "No Reason Given";
if(sscanf(params,"uS(No Reason Given)[156]",id,reason)) return SendClientMessage(playerid, COLOR_RED, "Admin Usage: /kick (id/name) (reason)");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, RTNUSRNoResults); // ID is not connected, send an error message
if(IsPlayerNPC(id)) return SendClientMessage(playerid, COLOR_RED, NotOnANPC);
if(UserStats[id][Admin] > UserStats[playerid][Admin]) return SendClientMessage(playerid, COLOR_RED, "Admin Usage: You cannot use this command, The person's level is higher than yours!");
else
{
format(string,sizeof(string),"**ADMIN KICK: %s (%d) (Reason: %s)",UserStats[id][Name],id,reason);
SendClientMessageToAllOthers(id,COLOR_ADMIN,string );
format(string,sizeof(string),"You Have Been Kicked By An Admin. Reason: %s.",reason);
SendClientMessage(id,COLOR_ADMIN,string);
SetPlayerInterior(id,3);
new rnd;
rnd = random(sizeof (ArrestedSpawn));
SetPlayerPos(id, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
SetPlayerFacingAngle(id, ArrestedSpawn[rnd][3]);
SetCameraBehindPlayer(id);
Kick(id);
format(string,sizeof(string),"Admin Kick %s",UserStats[id][Name]);
LogAdmin(playerid,string);
return 1;
}
}
else return SendClientMessage(playerid, COLOR_RED, "Looks like you forgot the commands! Use /commands for a list of commands.");
}
Posts: 789
Threads: 76
Joined: Nov 2011
Reputation:
0
Okay, i simply dont have any idea whats wrong. Try to use /kick [id] and check :P