KickPlayer: Difference between revisions
From Onset Developer Wiki
FlyingFork (talk | contribs) No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription|Kicks a player with a reason, colors are '''not''' supported.}} | {{FuncDescription|Kicks (disconnect) a player with a reason, colors are '''not''' supported.}} | ||
{{FuncSyntax|KickPlayer(player, reason)}} | {{FuncSyntax|KickPlayer(player, reason)}} |
Latest revision as of 17:51, 3 February 2022
Description
Kicks (disconnect) a player with a reason, colors are not supported.
Syntax
KickPlayer(player, reason)
Parameters
- player
The player identifier. - reason
The reason
Return Value
- This function doesn't have a return value.
Example
AddCommand("kick", function(playerid, lookupid)
if lookupid == nil then
return AddPlayerChat(playerid, "Usage: /kick <lookupid>")
end
if not IsValidPlayer(lookupid) then
return AddPlayerChat(playerid, "The playerid you have inserted is invalid.")
end
KickPlayer(lookupid, "Kicked by "..GetPlayerName(playerid)..".")
end)
See also
- GetPlayerBySteamId
- SetPlayerRagdoll
- SetPlayerDimension
- GetPlayerDimension
- SetPlayerPropertyValue
- GetPlayerPropertyValue
- IsValidPlayer
- GetPlayerCount
- GetAllPlayers
- GetNearestPlayer2D
- GetPlayersInRange2D
- GetPlayersInRange3D
- GetStreamedPlayersForPlayer
- SetPlayerName
- GetPlayerName
- GetPlayerSteamId
- GetPlayerNetworkStats
- SetPlayerSpawnLocation
- IsPlayerStreamedIn
- SetPlayerVoiceRange
- SetPlayerVoiceChannel
- IsPlayerVoiceChannel
- SetPlayerVoiceEnabled
- IsPlayerVoiceEnabled
- IsPlayerTalking
- AddPlayerChat
- AddPlayerChatRange
- AddPlayerChatAll
- GetPlayerState
- GetPlayerMovementMode
- GetPlayerMovementSpeed
- IsPlayerAiming
- IsPlayerReloading
- GetPlayerVehicle
- GetPlayerVehicleSeat
- SetPlayerInVehicle
- RemovePlayerFromVehicle
- SetPlayerLocation
- GetPlayerLocation
- SetPlayerWeaponStat
- SetPlayerWeapon
- GetPlayerWeapon
- GetPlayerEquippedWeaponSlot
- EquipPlayerWeaponSlot
- GetPlayerEquippedWeapon
- SetPlayerHeading
- GetPlayerHeading
- SetPlayerSpectate
- IsPlayerDead
- SetPlayerHealth
- GetPlayerHealth
- SetPlayerArmor
- GetPlayerArmor
- SetPlayerRespawnTime
- GetPlayerRespawnTime
- GetPlayerIP
- GetPlayerPing
- KickPlayer
- GetPlayerLocale
- GetPlayerGUID
- GetPlayerGameVersion
- SetPlayerAnimation
- AttachPlayerParachute
- SetPlayerHeadSize
- GetPlayerHeadSize