Каллбеки: These work for both LUA and GameMonkey
onConsoleInput( text ) - Called when text is inputted in the console
onConnecting( server, IP, port ) - Called when the client is connecting to a server
onConnected( server ) - Called when the client connects successfully
onDisconnected( server, reason ) - Called when the client gets disconnected
onAdminPart( server ) - Called when another RCON connection disconnects
onAdminJoin( server ) - Called when another RCON connection connects
onPlayerCommand( server, player, command, text ) - Called when a player does a ! command
onPlayerChat( server, player, text ) - Called when a player chats
onPlayerAction( server, player, text ) - Called when a player does a /me
onPlayerCommand2( server, player, command, text ) - Called when a player executes a /c command
onPlayerPM( server, player, ToName, text ) - Called when a player sends a PM
onPlayerJoin( server, player, name ) - Called when a player joins the server
onPlayerPart( server, player, reason, ip ) - Called when a player leaves the server
onAdminCommand( server, text ) - Called when an admin does a ! command
onAdminChat( server, text ) - Called when an admin chats
onAdminMessage( server, text ) - Called when an admin sends a PM
onPlayerSpawn( server, player ) - Called when a player spawns
onMoneyChange( server, player, oldcash, newcash ) - Called when a players cash changes
onArmourChange( server, player, oldarmour, newarmour ) - Called when a players armour changes
onHealthChange( server, player, oldhealth, newhealth ) - Called when a players health changes
onPickupHit( server, player, pickupID, type ) - Called when a player picks up a pickup
onNewPickup( server, pickupID, type, x, y, z ) - Called when a new pickup is created
onDeletePickup( server, pickupID ) - Called when a pickup is deleted
onVehicleEnter( server, player, vehicleID, model, EntryType ) - Called when a p[layer enters a vehicle
onVehicleExit( server, player, vehicle ) - Called when a player exits a vehicle
onWeatherChange( server, oldweather, newweather ) - Called when the weather changes
onPlayerDeath( server, player, what (killed, died), weapon, team ) - Called when a player dies
onPlayerKill( server, killer, killed, what (Killed, died), weapon, killerteam, killedteam ) - Called when a player kills another player
onPlayerTeamKill( server, killer, killed, what (Killed, died), weapon, killerteam, killedteam ) - Called when a player kills another player on the same team
onWeaponChange( server, player, oldweapon, newweapon ) - Called when a player changes his weapon
Функции:
VCMP Commands:
GameMonkey -
VCMP.Say( server, text ) - Broadcasts a message to all clients
VCMP.Msg( server, player, text ) - Sends a message to player
VCMP.Announce( server, player, text ) - Places onscreen text on the players screen
VCMP.Kick( server, player ) - Kicks player
VCMP.Ban( server, player ) - Bans player
VCMP.BanIP( server, IP ) - Bans IP
VCMP.Unban( server, IP ) - Unbans IP
Misc.Print( text ) - Prints to console
Misc.NumTok( text, delim ) - Number ok tokens split by delim
Misc.GetTok( text, delim, token ) - Text at token
Misc.DistrictName( fX, fY ) - Area name from coords
Misc.WeaponName( id ) - Weapon name from ID
Misc.VehicleName( model ) - Vehicle name from model
Misc.PartReason( reasonID ) - Returns the reason for the player leaving the server
Misc.WeaponID( name ) - Weapon ID from name
Misc.VehicleModel( name ) - Vehicle model from name
Misc.Players( server ) - Players in server
Misc.MaxPlayers( server ) - Max players for the server
Misc.CallLua( function, params ) - Calls a function in the lua scripts
Game.GetTime( server ) - Time in server
Game.SetTime( server, hour, minute ) - Sets the time in the server
Game.GetHour( server ) - Hour in server
Game.SetHour( server, hour ) - Sets the hour in the server
Game.GetMinute( server ) - Gets the minute in the server
Game.SetMinute( server, minute ) - Sets the minute in the server
Game.GetWeather( server ) - Gets the weather in the server
Game.SetWeather( server, weather ) - Sets the weather in the server
Game.GetTimerate( server ) - Gets the timerate in the server
Game.SetTimerate( server, timerate ) - Sets the timerate in the server
Player.Connected( server, player ) - Returns if the player is connected
Player.Name( server, player ) - Returns the player name
Player.IP( server, player ) - Returns the players IP
Player.Pos( server, player ) - Returns the X Y Z of the player
Player.Health( server, player ) - Returns the health of the player
Player.Armour( server, player ) - Returns the armour of the player
Player.Vehicle( server, player ) - Returns the vehicle ID of the player
Player.Weapon( server, player ) - Returns the players current weapon
Player.Money( server, player ) - Returns the players cash
Player.ID( server, name ) - Gets the player id from name
Player.Idle( server, player ) - Gets the idle time of the player in ms
Player.SetPos( server, player, x, y, z ) - Sets the position of the player
Player.SetHealth( server, player, health ) - Sets the health of the player
Player.SetArmour( server, player, armour ) - Sets the armour of the player
Player.SetVehicle( server, player, vehicle ) - Puts the player in the specified vehicle
Player.SetWeapon( server, player, weapon ) - Gives the player the specified weapon
Player.SetMoney( server, player, money ) - Gives the player the specified money
Player.SetAnimation( server, player, animID ) - Tells the player to do an animation
Vehicle.Pos( server, vehicle ) - Returns the X Y Z of the vehicle
Vehicle.Health( server, vehicle ) - Returns the vehicles health
Vehicle.Status( server, vehicle ) - Returns the vehicle status
Vehicle.Engine( server, vehicle ) - Returns the vehicle engine
Vehicle.Model( server, vehicle ) - Returns the vehicle model
Vehicle.SetPos( server, vehicle, X, Y, Z ) - Sets the position of the vehicle
Vehicle.SetHealth( server, vehicle, health ) - Sets the health of the vehicle
Vehicle.SetStatus( server, vehicle, status ) - Sets the status of the vehicle
Vehicle.SetEngine( server, vehicle, engine ) - Sets the engine status of the vehicle
Pickup.Type( server, pickup ) - Returns the type of the pickup
Pickup.Pos( server, pickup ) - Returns the X Y Z of the pickup
Pickup.Respawn( server, pickup ) - Respawns the pickup
Pickup.SpawnForPlayer( server, player, pickup ) - Spawns the pickup for a player
Pickup.New( server, type, X, Y, Z ) - Creates a new pickup
Pickup.Delete( server, pickup ) - Deletes a pickup
LUA -
print( text ) - Prints to the console
adminChat( server, text ) - Broadcasts a message to all clients
adminMsg( server, player, text ) - Sends a PM to the specified player
announce( server, player, text ) - Places onscreen text on the players screen
kick( server, player ) - Kicks player
ban( server, player ) - Bans player
banIP( server, IP ) - Bans IP
unban( server, IP ) - Unbans IP
Misc.Print( text ) - Prints to console
numTok( text, delim ) - Number ok tokens split by delim
getTok( text, delim, token ) - Text at token
districtName( fX, fY ) - Area name from coords
weaponName( id ) - Weapon name from ID
vehicleName( model ) - Vehicle name from model
partReason( reasonID ) - Returns the reason for the player leaving the server
weaponID( name ) - Weapon ID from name
vehicleModel( name ) - Vehicle model from name
players( server ) - Players in server
maxPlayers( server ) - Max players for the server
callGM( func, params ) - Calls the gamemonkey scripts
getTime( server ) - Time in server
setTime( server, hour, minute ) - Sets the time in the server
getHour( server ) - Hour in server
setHour( server, hour ) - Sets the hour in the server
getMinute( server ) - Gets the minute in the server
setMinute( server, minute ) - Sets the minute in the server
getWeather( server ) - Gets the weather in the server
setWeather( server, weather ) - Sets the weather in the server
getTimerate( server ) - Gets the timerate in the server
setTimerate( server, timerate ) - Sets the timerate in the server
getPlayerConnected( server, player ) - Returns if the player is connected
getPlayerName( server, player ) - Returns the player name
getPlayerIP( server, player ) - Returns the players IP
getPlayerPos( server, player ) - Returns the X Y Z of the player
getPlayerHealth( server, player ) - Returns the health of the player
getPlayerArmour( server, player ) - Returns the armour of the player
getPlayerVehicle( server, player ) - Returns the vehicle ID of the player
getPlayerWeapon( server, player ) - Returns the players current weapon
getPlayerMoney( server, player ) - Returns the players cash
getPlayerID( server, name ) - Gets the player id from name
getPlayerIdle( server, player ) - Gets the idle time of the player in ms
setPlayerPos( server, player, x, y, z ) - Sets the position of the player
setPlayerHealth( server, player, health ) - Sets the health of the player
setPlayerArmour( server, player, armour ) - Sets the armour of the player
setPlayerVehicle( server, player, vehicle ) - Puts the player in the specified vehicle
setPlayerWeapon( server, player, weapon ) - Gives the player the specified weapon
setPlayerMoney( server, player, money ) - Gives the player the specified money
setPlayerSetAnimation( server, player, animID ) - Tells the player to do an animation
getVehiclePos( server, vehicle ) - Returns the X Y Z of the vehicle
getVehicleHealth( server, vehicle ) - Returns the vehicles health
getVehicleStatus( server, vehicle ) - Returns the vehicle status
getVehicleEngine( server, vehicle ) - Returns the vehicle engine
getVehicleModel( server, vehicle ) - Returns the vehicle model
setVehiclePos( server, vehicle, X, Y, Z ) - Sets the position of the vehicle
setVehicleHealth( server, vehicle, health ) - Sets the health of the vehicle
setVehicleStatus( server, vehicle, status ) - Sets the status of the vehicle
setVehicleEngine( server, vehicle, engine ) - Sets the engine status of the vehicle
getPickupType( server, pickup ) - Returns the type of the pickup
getPickupPos( server, pickup ) - Returns the X Y Z of the pickup
respawnPickup( server, pickup ) - Respawns the pickup
spawnPickupForPlayer( server, player, pickup ) - Spawns the pickup for a player
newPickup( server, type, X, Y, Z ) - Creates a new pickup
deletePickup( server, pickup ) - Deletes a pickup