• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Not sure if my /kick works?
#2
Code:
CMD:kick(playerid, params[]) { new target_id, reason[24], kick_string[200]; if (PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_RED, "You are not allowed to use this command!"); if (sscanf(params, "us[24]", target_id, reason)) return SCM(playerid, COLOR_RED, "Usage: /kick [playerid/name] [reason]"); if (!IsPlayerConnected(target_id) return SCM(playerid, COLOR_RED, "Player not found."); if (PlayerInfo[target_id][pAdmin] >= 1) return SCM(playerid, COLOR_RED, "You are not allowed to kick admins."); format(kick_string, 200, "%s [%i] has been kicked by %s [%i] due to %s", ReturnName(target_id), target_id, ReturnName(playerid), playerid); SendClientMessageToAll(COLOR_RED, kick_string); format(kick_string, 200, "You have been kicked from TWDZS. The Admin who kicked you is: %s", ReturnName(playerid)); SendClientMessage(target_id, COLOR_RED, kick_string); SendClientMessage(target_id, COLOR_ORANGE, "If you think this kick is unfair complain at www.domain.net"); Kick(target_id); return 1; }



This should work, but I didn't test it.
  Reply


Messages In This Thread
Not sure if my /kick works? - by CrypticSin - 2021-03-29, 09:32 PM
RE: Not sure if my /kick works? - by destiezk - 2021-04-02, 10:07 AM
RE: Not sure if my /kick works? - by Awide - 2021-04-02, 10:27 AM
RE: Not sure if my /kick works? - by ImOver - 2021-04-03, 07:48 PM
RE: Not sure if my /kick works? - by CrypticSin - 2021-04-03, 10:08 PM