KickPlayer: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{PlayerEvents}} |
Revision as of 17:15, 13 December 2019
Description
Kicks 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
- OnPlayerServerAuth
- OnPlayerSteamAuth
- OnPlayerStreamIn
- OnPlayerStreamOut
- OnPlayerJoin
- OnPlayerQuit
- OnPlayerSpawn
- OnPlayerDeath
- OnPlayerWeaponShot
- OnPlayerDamage
- OnPlayerChat
- OnPlayerChatCommand
- OnPlayerInteractDoor
- OnPlayWeaponHitEffects
- OnPlayerSwitchCamera
- OnPlayerEnterWater
- OnPlayerLeaveWater
- OnPlayerCrouch
- OnPlayerEndCrouch
- OnPlayerEndFall
- OnPlayerFall
- OnPlayerTalking