I made a thread a couple of weeks back about a command where the Mayor can fire players.
The responses helped me a lot in developing it, but I can’t seem to get the ply:IsCP() thing to work.
[LUA] local function cmdFirePlayer(client, arguments)
if (client:Team() == TEAM_MAYOR) then
if (arguments and arguments != “”) then
for k, v in pairs( player.GetAll() ) do
if (string.find(v:Nick(),arguments)) then
Notify(v, 1, 4, “You have been fired from your job.”)
AddChatCommand("/fire", cmdFirePlayer); [/lua]