[SCRIPT] Kick, Ban

I just found the ■■■■■■■ ressource, it’s not enabled my default so i give you this.

add - ■■■■■■■ to AutoStartResources

■■■■■■■ / Rcon Client / Virus Scan 1 / Virus Scan 2
Commands:

status
To get server information (Id of player, IP of player & Ping)

clientkick
Usage: clientkick [playerId] [reason]
Description: to kick a player from your server

tempbanclient
Usage: tempbanclient [playerId] [reason]
Description: to ban a player from your server

Already included:

map
Usage: map [mapname]
Description: to change map of the server

gametypes
Usage: gametypes [resourcename]
Description: to change gametypes of the server

say
Usage: say [your message]
Description: to send a message from outside

tell
Usage: tell [playerId] [your message]
Description: to send a message to a specific player

start
Usage: start [resourcename]
Description: starts the specified resource

restart
Usage: restart [resourcename]
Description: restarts the specified resource

stop
Usage: stop [resourcename]
Description: stops the specified resource

refresh
Usage: refresh
Description: refresh ressources

1 Like

Thank you for the Rcon Client. Been looking for something like that.

There are also commands for resource control:

start
Usage: start [resourcename]
Description: starts the specified resource

restart
Usage: restart [resourcename]
Description: restarts the specified resource

stop
Usage: stop [resourcename]
Description: stops the specified resource

@MrStiletto i already know and i added refresh.

how do you use the kick and temp ban command?? I tried the way you have above but keep getting error…/.

@LoweDennis_LBP First thing, am the realist.
2.open rconapp(provided on this topic, I use my own but is the same.)
3.type “status”
4.it will show " print (in my case) 1id IP:XXX.xx.XXX.xx username Epps IP:XXX.xx.XXX.xx ping 2ms

  1. To ban type: "tempbanclient id reason(messege) "
  2. Hit “ENTER” OR “RETURN”
  3. Upvote if this helped you.
  4. Have a nice day.

@EPPS I do that but when I type status it only has one persons name in the list and I’ve tried it on that person like you have it type but it doesn’t work still.

hello, i tried the redhawk rcon tool and it worked so i think you have not put the ■■■■■■■ folder in the resource folder and added it in the config.
make sure you have all the correct information about your server.
please tell me more about the problem. Thanks

@LoweDennis_LBP Use the number that’s an ID.

When I type “status” it only give me one players name not everyone thats joins the server. So when I do the following commands “clientkick” or “tempbanclient” it gives me the following error code http://prntscr.com/bwxr7d . Here are the install places on the server… http://prntscr.com/bwxrk6 http://prntscr.com/bwxru7

Anyone know how to find the file to convert that russian text when a player is kicked or banned? Been looking all over for it

@LoweDennis_LBP lol, nice blocking of ip. anyways you have to put the id not the ip to ban the client.
And no i have not found how to change the Russian text for the msg. when kicked.

okay the group of members on my server have discovered how to kick people but how do you know what number everyone that joins the server are because it only has one number when you type “status”

@LoweDennis_LBP wondering same thing, and still looking into finding the russian text.

The source is the id if your scripting in Lua. That a way if getting player id’s

I’ve made a command in-game to get who’s online. It return the name and id of the player.

This will help you.

--client.lua

--Online Players
    RegisterNetEvent("onlinePlayers")
    AddEventHandler('onlinePlayers', function()
        for i = 0, 31 do
            local nome = GetPlayerName(i)
            local id = GetPlayerServerId(i)
            if (nome == "**Invalid**") then
                CancelEvent()
            else
                ShowNotification('~r~ID: ~g~'.. id .. ' ~w~- ~r~Nome: ~g~' .. nome)
            end
        end
    end)
--server.lua

--Lista Players
        elseif(command[1] == "/players") then
          TriggerClientEvent("onlinePlayers", source)

when i type it in the chat it just puts it as a message to everyone

@cody196 said in [SCRIPT] Kick, Ban...:

when i type it in the chat it just puts it as a message to everyone

Sorry! I forgot something! Put this function on client.lua

function ShowNotification(text)
    SetNotificationTextEntry("STRING")
    AddTextComponentString(text)
    DrawNotification(false, false)
end

@cody196 said in [SCRIPT] Kick, Ban...:

when i type it in the chat it just puts it as a message to everyone

And you need to make the resource “chat” recognize commands with “/”

@PsymoN when i did that in the basic scripting guide, when I press T it does nothing but freeze my player and bugs out.

@cody196 said in [SCRIPT] Kick, Ban...:

@PsymoN when i did that in the basic scripting guide, when I press T it does nothing but freeze my player and bugs out.

It works here. I’ve followed the Basic Scripting Guide too. Just make sure you’ve replaced the correct line.