Server Scripting Functions: Difference between revisions
No edit summary |
|||
Line 6: | Line 6: | ||
==Blip functions== | ==Blip functions== | ||
[[blip]] [[createBlip]] ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, visibleTo=[[getRootElement]]()] ) | [[blip]] [[createBlip]] ( float x, float y, float z, [[[int]] icon=0, [[int]] size=2, [[int]] r=255, [[int]] g=0, [[int]] b=0, [[int]] a=255, visibleTo=[[getRootElement]]()] ) | ||
[[blip]] [[createBlipAttachedTo]] ( [[entity]] entity, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, visibleTo=[[getRootElement]]()] ) | [[blip]] [[createBlipAttachedTo]] ( [[entity]] entity, [[[int]] icon=0, [[int]] size=2, [[int]] r=255, [[int]] g=0, [[int]] b=0, [[int]] a=255, visibleTo=[[getRootElement]]()] ) | ||
bool [[destroyBlipAttachedTo]] ( [[entity]] entity ) | bool [[destroyBlipAttachedTo]] ( [[entity]] entity ) | ||
Line 14: | Line 14: | ||
bool [[destroyAllBlips]] () | bool [[destroyAllBlips]] () | ||
int [[getBlipIcon]] ( [[blip]] blip ) | [[int]] [[getBlipIcon]] ( [[blip]] blip ) | ||
int [[getBlipSize]] ( [[blip]] blip ) | [[int]] [[getBlipSize]] ( [[blip]] blip ) | ||
int int int int [[getBlipColor]] ( [[blip]] blip ) | [[int]] [[int]] [[int]] [[int]] [[getBlipColor]] ( [[blip]] blip ) | ||
blip [[getBlipAttachedTo]] ( [[entity]] entity ) | blip [[getBlipAttachedTo]] ( [[entity]] entity ) | ||
bool [[setBlipIcon]] ( [[element]] blip, int icon ) | bool [[setBlipIcon]] ( [[element]] blip, [[int]] icon ) | ||
bool [[setBlipSize]] ( [[element]] blip, int size ) | bool [[setBlipSize]] ( [[element]] blip, [[int]] size ) | ||
bool [[setBlipColor]] ( [[element]] blip, int red, int green, int blue, int alpha ) | bool [[setBlipColor]] ( [[element]] blip, [[int]] red, [[int]] green, [[int]] blue, [[int]] alpha ) | ||
bool [[attachBlipToEntity]] ( [[blip]] blip, [[entity]] entity ) | bool [[attachBlipToEntity]] ( [[blip]] blip, [[entity]] entity ) | ||
Line 35: | Line 35: | ||
[[element]] [[getRootElement]] () | [[element]] [[getRootElement]] () | ||
[[element]] [[getElementChild]] ( [[element]] parent, int index ) | [[element]] [[getElementChild]] ( [[element]] parent, [[int]] index ) | ||
int [[getElementChildrenCount]] ( [[element]] parent ) | [[int]] [[getElementChildrenCount]] ( [[element]] parent ) | ||
string [[getElementID]] ( [[element]] element ) | string [[getElementID]] ( [[element]] element ) | ||
[[element]] [[getElementByID]] ( string name, int index ) | [[element]] [[getElementByID]] ( string name, [[int]] index ) | ||
[[element]] [[getElementByIndex]] ( string type, int index ) | [[element]] [[getElementByIndex]] ( string type, [[int]] index ) | ||
var [[getElementData]] ( string name ) | var [[getElementData]] ( string name ) | ||
Line 91: | Line 91: | ||
A marker is a 3D model in the world that can highlight a particular point or area, often used to instruct players where to go to perform actions such as entering buildings. | A marker is a 3D model in the world that can highlight a particular point or area, often used to instruct players where to go to perform actions such as entering buildings. | ||
[[element]] [[createMarker]] ( float x, float y, float z, [string type, float size, int r, int g, int b, int a, visibleTo=[[getRootElement]]()] ) | [[element]] [[createMarker]] ( float x, float y, float z, [string type, float size, [[int]] r, [[int]] g, [[int]] b, [[int]] a, visibleTo=[[getRootElement]]()] ) | ||
bool [[destroyAllMarkers]] () | bool [[destroyAllMarkers]] () | ||
int [[getMarkerCount]] () | [[int]] [[getMarkerCount]] () | ||
string [[getMarkerType]] ( [[element]] marker ) | string [[getMarkerType]] ( [[element]] marker ) | ||
Line 101: | Line 101: | ||
float [[getMarkerSize]] ( [[element]] marker ) | float [[getMarkerSize]] ( [[element]] marker ) | ||
int int int int [[getMarkerColor]] ( [[element]] marker ) | [[int]] [[int]] [[int]] [[int]] [[getMarkerColor]] ( [[element]] marker ) | ||
float float float [[getMarkerTarget]] ( [[element]] marker ) | float float float [[getMarkerTarget]] ( [[element]] marker ) | ||
Line 109: | Line 109: | ||
bool [[setMarkerSize]] ( [[element]] marker, float size ) | bool [[setMarkerSize]] ( [[element]] marker, float size ) | ||
bool [[setMarkerColor]] ( [[element]] marker, int r, int g, int b, int a ) | bool [[setMarkerColor]] ( [[element]] marker, [[int]] r, [[int]] g, [[int]] b, [[int]] a ) | ||
bool [[setMarkerTarget]] ( [[element]] marker, false ) | bool [[setMarkerTarget]] ( [[element]] marker, false ) | ||
Line 118: | Line 118: | ||
An object is a model in the world. These have collision models and can be moved and rotated at will. Any existing GTA model can be used. | An object is a model in the world. These have collision models and can be moved and rotated at will. Any existing GTA model can be used. | ||
[[element]] [[createObject]] ( int id, float x, float y, float z, [float rx, float ry, float rz] ) | [[element]] [[createObject]] ( [[int]] id, float x, float y, float z, [float rx, float ry, float rz] ) | ||
bool [[destroyAllObjects]] () | bool [[destroyAllObjects]] () | ||
int [[getObjectModel]] ( [[element]] object ) | [[int]] [[getObjectModel]] ( [[element]] object ) | ||
float float float [[getObjectRotation]] ( [[element]] object ) | float float float [[getObjectRotation]] ( [[element]] object ) | ||
bool [[setObjectModel]] ( [[element]] object, int id ) | bool [[setObjectModel]] ( [[element]] object, [[int]] id ) | ||
bool [[setObjectRotation]] ( [[element]] object, float x, float y, float z ) | bool [[setObjectRotation]] ( [[element]] object, float x, float y, float z ) | ||
bool [[moveObject]] ( [[element]] object, int time, float x, float y, float z, float rx, float ry, float rz ) | bool [[moveObject]] ( [[element]] object, [[int]] time, float x, float y, float z, float rx, float ry, float rz ) | ||
==Pickup functions== | ==Pickup functions== | ||
[[pickup]] [[createPickup]] ( float x, float y, float z, int type, int amount/weapon, [int ammo] ) | [[pickup]] [[createPickup]] ( float x, float y, float z, [[int]] type, [[int]] amount/weapon, [[[int]] ammo] ) | ||
bool [[destroyAllPickups]] () | bool [[destroyAllPickups]] () | ||
int [[getPickupType]] ( [[pickup]] pickup ) | [[int]] [[getPickupType]] ( [[pickup]] pickup ) | ||
int [[getPickupWeapon]] ( [[pickup]] pickup ) | [[int]] [[getPickupWeapon]] ( [[pickup]] pickup ) | ||
int [[getPickupHealth]] ( [[pickup]] pickup ) | [[int]] [[getPickupHealth]] ( [[pickup]] pickup ) | ||
int [[getPickupAmmo]] ( [[pickup]] pickup ) | [[int]] [[getPickupAmmo]] ( [[pickup]] pickup ) | ||
bool [[setPickupType]] ( [[element]] pickup, int type, int amount/weapon, [int ammo] ) | bool [[setPickupType]] ( [[element]] pickup, [[int]] type, [[int]] amount/weapon, [[[int]] ammo] ) | ||
==Player functions== | ==Player functions== | ||
int [[getPlayerCount]] () | [[int]] [[getPlayerCount]] () | ||
int [[getPlayerCurrentWeaponAmmoInClip]] ( [[player]] player ) | [[int]] [[getPlayerCurrentWeaponAmmoInClip]] ( [[player]] player ) | ||
int [[getPlayerCurrentWeaponID]] ( [[player]] player ) | [[int]] [[getPlayerCurrentWeaponID]] ( [[player]] player ) | ||
[[player]] [[getPlayerFromNick]] ( string nick ) | [[player]] [[getPlayerFromNick]] ( string nick ) | ||
Line 160: | Line 160: | ||
float [[getPlayerArmor]] ( [[player]] player ) | float [[getPlayerArmor]] ( [[player]] player ) | ||
int [[getPlayerLevel]] ( [[player]] player ) | [[int]] [[getPlayerLevel]] ( [[player]] player ) | ||
int [[getPlayerMoney]] ( [[player]] player ) | [[int]] [[getPlayerMoney]] ( [[player]] player ) | ||
float float float [[getPlayerMoveSpeed]] ( [[player]] player ) | float float float [[getPlayerMoveSpeed]] ( [[player]] player ) | ||
Line 170: | Line 170: | ||
[[vehicle]] [[getPlayerOccupiedVehicle]] ( [[player]] player ) | [[vehicle]] [[getPlayerOccupiedVehicle]] ( [[player]] player ) | ||
int [[getPlayerOccupiedVehicleSeat]] ( [[player]] player ) | [[int]] [[getPlayerOccupiedVehicleSeat]] ( [[player]] player ) | ||
int [[getPlayerPing]] ( [[player]] player ) | [[int]] [[getPlayerPing]] ( [[player]] player ) | ||
float [[getPlayerRotation]] ( [[player]] player ) | float [[getPlayerRotation]] ( [[player]] player ) | ||
int [[getPlayerSkin]] ( [[player]] player ) | [[int]] [[getPlayerSkin]] ( [[player]] player ) | ||
string [[getPlayerSourceIP]] ( [[player]] player ) | string [[getPlayerSourceIP]] ( [[player]] player ) | ||
Line 190: | Line 190: | ||
bool [[setPlayerRotation]] ( [[element]] player, float rotation ) | bool [[setPlayerRotation]] ( [[element]] player, float rotation ) | ||
bool [[setPlayerSkin]] ( [[element]] player, int id ) | bool [[setPlayerSkin]] ( [[element]] player, [[int]] id ) | ||
bool [[setPlayerHealth]] ( [[element]] player, float health ) | bool [[setPlayerHealth]] ( [[element]] player, float health ) | ||
Line 196: | Line 196: | ||
bool [[setPlayerArmor]] ( [[element]] player, float armor ) | bool [[setPlayerArmor]] ( [[element]] player, float armor ) | ||
bool [[setPlayerMoney]] ( [[element]] player, int money ) | bool [[setPlayerMoney]] ( [[element]] player, [[int]] money ) | ||
bool [[givePlayerMoney]] ( [[element]] player, int money ) | bool [[givePlayerMoney]] ( [[element]] player, [[int]] money ) | ||
bool [[takePlayerMoney]] ( [[element]] player, int money ) | bool [[takePlayerMoney]] ( [[element]] player, [[int]] money ) | ||
bool [[killPlayer]] ( [[element]] player ) | bool [[killPlayer]] ( [[element]] player ) | ||
bool [[ | bool [[warpPlayerintoVehicle]] ( [[player]] player, [[vehicle]] vehicle, [[int]] seat] ) | ||
bool [[removePlayerFromVehicle]] ( [[element]] player ) | bool [[removePlayerFromVehicle]] ( [[element]] player ) | ||
Line 210: | Line 210: | ||
bool [[spawnPlayer]] ( [[player]] player, [[spawnpoint]] spawnpoint ) | bool [[spawnPlayer]] ( [[player]] player, [[spawnpoint]] spawnpoint ) | ||
bool [[spawnPlayer]] ( [[player]] player, float x, float y, float z, float rotation, int skin ) | bool [[spawnPlayer]] ( [[player]] player, float x, float y, float z, float rotation, [[int]] skin ) | ||
==Radar area functions== | ==Radar area functions== | ||
[[radararea]] [[createRadarArea]] ( float x, float y, float sizex, float sizey, int r, int g, int b, int a, [visibleTo=[[getRootElement]]()] ) | [[radararea]] [[createRadarArea]] ( float x, float y, float sizex, float sizey, [[int]] r, [[int]] g, [[int]] b, [[int]] a, [visibleTo=[[getRootElement]]()] ) | ||
bool [[destroyAllRadarAreas]] () | bool [[destroyAllRadarAreas]] () | ||
Line 219: | Line 219: | ||
float float [[getRadarAreaSize]] ( [[radararea]] radararea ) | float float [[getRadarAreaSize]] ( [[radararea]] radararea ) | ||
int int int int [[getRadarAreaColor]] ( [[radararea]] radararea ) | [[int]] [[int]] [[int]] [[int]] [[getRadarAreaColor]] ( [[radararea]] radararea ) | ||
bool [[isRadarAreaFlashing]] ( [[radararea]] radararea ) | bool [[isRadarAreaFlashing]] ( [[radararea]] radararea ) | ||
Line 225: | Line 225: | ||
bool [[setRadarAreaSize]] ( [[element]] radararea, float x, float y ) | bool [[setRadarAreaSize]] ( [[element]] radararea, float x, float y ) | ||
bool [[setRadarAreaColor]] ( [[element]] radararea, int r, int g, int b, int a ) | bool [[setRadarAreaColor]] ( [[element]] radararea, [[int]] r, [[int]] g, [[int]] b, [[int]] a ) | ||
bool [[setRadarAreaFlashing]] ( [[element]] radararea, bool flash ) | bool [[setRadarAreaFlashing]] ( [[element]] radararea, bool flash ) | ||
Line 235: | Line 235: | ||
==Server functions== | ==Server functions== | ||
int [[getMaxPlayers]] () | [[int]] [[getMaxPlayers]] () | ||
bool [[serverLoggerPrint]] ( string text ) | bool [[serverLoggerPrint]] ( string text ) | ||
Line 243: | Line 243: | ||
bool [[playerPM]] ( [[element]] player, string text, [r, g, b] ) | bool [[playerPM]] ( [[element]] player, string text, [r, g, b] ) | ||
bool [[outputDebugString]] ( string text, [int level=3] ) | bool [[outputDebugString]] ( string text, [[[int]] level=3] ) | ||
bool [[addCommandHandler]] ( string key, string handler ) | bool [[addCommandHandler]] ( string key, string handler ) | ||
Line 249: | Line 249: | ||
bool [[removeCommandHandler]] ( string key ) | bool [[removeCommandHandler]] ( string key ) | ||
== | ==spawnpoint functions== | ||
float [[ | float [[getspawnpointRotation]] ( [[spawnpoint]] spawn ) | ||
int [[ | [[int]] [[getspawnpointSkin]] ( [[spawnpoint]] spawn ) | ||
bool [[ | bool [[setspawnpointRotation]] ( [[element]] spawn, float rotation ) | ||
bool [[ | bool [[setspawnpointSkin]] ( [[element]] spawn, [[int]] skin ) | ||
==Text Functions== | ==Text Functions== | ||
Line 285: | Line 285: | ||
void [[textItemSetColor]] ( textitem, red, green, blue, alpha ) | void [[textItemSetColor]] ( textitem, red, green, blue, alpha ) | ||
int int int int [[textItemGetColor]] ( textitem ) | [[int]] [[int]] [[int]] [[int]] [[textItemGetColor]] ( textitem ) | ||
void [[textItemSetPriority]] ( textitem, priority ) | void [[textItemSetPriority]] ( textitem, priority ) | ||
int [[textItemGetPriority]] ( textitem ) | [[int]] [[textItemGetPriority]] ( textitem ) | ||
==Utility functions== | ==Utility functions== | ||
float [[ | float [[getDistanceBetweenpoints2D]] ( float x1, float y1, float x2, float y2 ) | ||
float [[ | float [[getDistanceBetweenpoints3D]] ( float x1, float y1, float z1, float x2, float y2, float z2 ) | ||
int [[ | [[int]] [[rand[[int]]]] ( [[int]] lowerbound, [[int]] upperbound ) | ||
float [[randFloat]] () | float [[randFloat]] () | ||
int [[getTickCount]] () | [[int]] [[getTickCount]] () | ||
string [[gettok]] ( string text, int index, int separator ) | string [[gettok]] ( string text, [[int]] index, [[int]] separator ) | ||
bool [[setTimer]] ( string function, int time, [arg1, arg2, ...] ) | bool [[setTimer]] ( string function, [[int]] time, [arg1, arg2, ...] ) | ||
==Vehicle functions== | ==Vehicle functions== | ||
vehicle [[createVehicle]] ( int id, float x, float y, float z, [float rx, float ry, float rz] ) | vehicle [[createVehicle]] ( [[int]] id, float x, float y, float z, [float rx, float ry, float rz] ) | ||
bool [[destroyAllVehicles]] () | bool [[destroyAllVehicles]] () | ||
int int int int [[getVehicleColor]] ( [[vehicle]] vehicle ) | [[int]] [[int]] [[int]] [[int]] [[getVehicleColor]] ( [[vehicle]] vehicle ) | ||
float [[getVehicleHealth]] ( [[vehicle]] vehicle ) | float [[getVehicleHealth]] ( [[vehicle]] vehicle ) | ||
int [[getVehicleID]] ( [[vehicle]] vehicle ) | [[int]] [[getVehicleID]] ( [[vehicle]] vehicle ) | ||
int [[getVehicleIDFromName]] ( string name ) | [[int]] [[getVehicleIDFromName]] ( string name ) | ||
int [[getVehicleIndex]] ( [[vehicle]] vehicle ) | [[int]] [[getVehicleIndex]] ( [[vehicle]] vehicle ) | ||
float float float [[getVehicleMoveSpeed]] ( string vehicle ) | float float float [[getVehicleMoveSpeed]] ( string vehicle ) | ||
Line 325: | Line 325: | ||
string [[getVehicleName]] ( string vehicle ) | string [[getVehicleName]] ( string vehicle ) | ||
string [[getVehicleNameFromID]] ( int id ) | string [[getVehicleNameFromID]] ( [[int]] id ) | ||
player [[getVehicleOccupant]] ( [[vehicle]] vehicle, [int seat=0] ) | player [[getVehicleOccupant]] ( [[vehicle]] vehicle, [[[int]] seat=0] ) | ||
float float float [[getVehicleRotation]] ( [[vehicle]] vehicle ) | float float float [[getVehicleRotation]] ( [[vehicle]] vehicle ) | ||
Line 335: | Line 335: | ||
float float [[getVehicleTurretPosition]] ( [[vehicle]] vehicle ) | float float [[getVehicleTurretPosition]] ( [[vehicle]] vehicle ) | ||
int [[getVehicleMaxPassengers]] ( [[vehicle]] vehicle ) | [[int]] [[getVehicleMaxPassengers]] ( [[vehicle]] vehicle ) | ||
bool [[isVehicleLocked]] ( [[vehicle]] vehicle ) | bool [[isVehicleLocked]] ( [[vehicle]] vehicle ) | ||
Line 351: | Line 351: | ||
bool [[setVehicleHealth]] ( [[element]] vehicle, float health ) | bool [[setVehicleHealth]] ( [[element]] vehicle, float health ) | ||
bool [[setVehicleColor]] ( [[element]] vehicle, int color1, int color2, int color3, int color4 ) | bool [[setVehicleColor]] ( [[element]] vehicle, [[int]] color1, [[int]] color2, [[int]] color3, [[int]] color4 ) | ||
bool [[setVehicleLocked]] ( [[element]] vehicle, bool locked ) | bool [[setVehicleLocked]] ( [[element]] vehicle, bool locked ) | ||
==Weapon functions== | ==Weapon functions== | ||
string [[getWeaponNameFromID]] ( int id ) | string [[getWeaponNameFromID]] ( [[int]] id ) | ||
int [[getWeaponIDFromName]] ( string name ) | [[int]] [[getWeaponIDFromName]] ( string name ) | ||
bool [[giveWeapon]] ( [[element]] player, int [[weapon]], [int ammo=30] ) | bool [[giveWeapon]] ( [[element]] player, [[int]] [[weapon]], [[[int]] ammo=30] ) | ||
bool [[takeWeapon]] ( [[element]] player, int [[weapon]] ) | bool [[takeWeapon]] ( [[element]] player, [[int]] [[weapon]] ) | ||
bool [[takeAllWeapons]] ( [[element]] player ) | bool [[takeAllWeapons]] ( [[element]] player ) | ||
==World functions== | ==World functions== | ||
int int [[getTime]] () | [[int]] [[int]] [[getTime]] () | ||
int [[getWeather]] () | [[int]] [[getWeather]] () | ||
bool [[setTime]] ( int hour, int min ) | bool [[setTime]] ( [[int]] hour, [[int]] min ) | ||
bool [[setWeather]] ( int id ) | bool [[setWeather]] ( [[int]] id ) | ||
bool [[setWeatherBlended]] ( int id ) | bool [[setWeatherBlended]] ( [[int]] id ) | ||
==XML functions== | ==XML functions== |
Revision as of 07:32, 18 May 2006
This page lists all the scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use Requested Functions and Events
Please note that the scripting functions can now be extended by loading in dynamic modules that provide new functionality, such as MySQL database access. These scripting functions are non-native and require the module to be loaded in order to work.
Head over to Module functions for a list of non-native functions and modules that are available.
Blip functions
blip createBlip ( float x, float y, float z, [[[int]] icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, visibleTo=getRootElement()] )
blip createBlipAttachedTo ( entity entity, [[[int]] icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, visibleTo=getRootElement()] )
bool destroyBlipAttachedTo ( entity entity )
bool destroyAllBlips ()
int getBlipIcon ( blip blip )
int getBlipSize ( blip blip )
int int int int getBlipColor ( blip blip )
blip getBlipAttachedTo ( entity entity )
bool setBlipIcon ( element blip, int icon )
bool setBlipSize ( element blip, int size )
bool setBlipColor ( element blip, int red, int green, int blue, int alpha )
bool attachBlipToEntity ( blip blip, entity entity )
Element functions
bool destroyElement ( element element )
element getElementChild ( element parent, int index )
int getElementChildrenCount ( element parent )
string getElementID ( element element )
element getElementByID ( string name, int index )
element getElementByIndex ( string type, int index )
var getElementData ( string name )
element getElementParent ( element element )
string getElementType ( element element )
table getElementsByType ( string type )
bool setElementID ( element element, string name )
bool setElementData ( element element, string name, var data )
bool setElementParent ( element element, element parent )
Entity functions
float float float getEntityPosition ( entity entity )
bool setEntityPosition ( element entity, float x, float y, float z )
bool addEntityVisibleTo ( element entity, element visibleto )
bool removeEntityVisibleTo ( element entity, element visibleto )
bool clearEntityVisibleTo ( element entity )
Event functions
bool addEvent ( string name, string arguments )
bool addEventHandler ( string name, element element, string handler )
bool triggerEvent ( string name, element element, [argument, ...] )
Map functions
string getLoadedMapName ()
xmlnode getLoadedMapXMLRoot ()
bool startMap ( string name )
bool endMap ()
element loadMapData ( xmlnode node, element parent )
Marker functions
A marker is a 3D model in the world that can highlight a particular point or area, often used to instruct players where to go to perform actions such as entering buildings.
element createMarker ( float x, float y, float z, [string type, float size, int r, int g, int b, int a, visibleTo=getRootElement()] )
bool destroyAllMarkers ()
string getMarkerType ( element marker )
float getMarkerSize ( element marker )
int int int int getMarkerColor ( element marker )
float float float getMarkerTarget ( element marker )
bool setMarkerType ( element marker, string type )
bool setMarkerSize ( element marker, float size )
bool setMarkerColor ( element marker, int r, int g, int b, int a )
bool setMarkerTarget ( element marker, false )
bool setMarkerTarget ( element marker, float x, float y, float z )
Object functions
An object is a model in the world. These have collision models and can be moved and rotated at will. Any existing GTA model can be used.
element createObject ( int id, float x, float y, float z, [float rx, float ry, float rz] )
bool destroyAllObjects ()
int getObjectModel ( element object )
float float float getObjectRotation ( element object )
bool setObjectModel ( element object, int id )
bool setObjectRotation ( element object, float x, float y, float z )
bool moveObject ( element object, int time, float x, float y, float z, float rx, float ry, float rz )
Pickup functions
pickup createPickup ( float x, float y, float z, int type, int amount/weapon, [[[int]] ammo] )
bool destroyAllPickups ()
int getPickupType ( pickup pickup )
int getPickupWeapon ( pickup pickup )
int getPickupHealth ( pickup pickup )
int getPickupAmmo ( pickup pickup )
bool setPickupType ( element pickup, int type, int amount/weapon, [[[int]] ammo] )
Player functions
int getPlayerCurrentWeaponAmmoInClip ( player player )
int getPlayerCurrentWeaponID ( player player )
player getPlayerFromNick ( string nick )
float getPlayerHealth ( player player )
float getPlayerArmor ( player player )
int getPlayerLevel ( player player )
int getPlayerMoney ( player player )
float float float getPlayerMoveSpeed ( player player )
string getPlayerName ( player player )
vehicle getPlayerOccupiedVehicle ( player player )
int getPlayerOccupiedVehicleSeat ( player player )
int getPlayerPing ( player player )
float getPlayerRotation ( player player )
int getPlayerSkin ( player player )
string getPlayerSourceIP ( player player )
bool isPlayerDead ( player player )
bool isPlayerDucked ( player player )
bool isPlayerMuted ( player player )
bool setPlayerRotation ( element player, float rotation )
bool setPlayerSkin ( element player, int id )
bool setPlayerHealth ( element player, float health )
bool setPlayerArmor ( element player, float armor )
bool setPlayerMoney ( element player, int money )
bool givePlayerMoney ( element player, int money )
bool takePlayerMoney ( element player, int money )
bool killPlayer ( element player )
bool warpPlayerintoVehicle ( player player, vehicle vehicle, int seat] )
bool removePlayerFromVehicle ( element player )
bool spawnPlayer ( player player, spawnpoint spawnpoint )
bool spawnPlayer ( player player, float x, float y, float z, float rotation, int skin )
Radar area functions
radararea createRadarArea ( float x, float y, float sizex, float sizey, int r, int g, int b, int a, [visibleTo=getRootElement()] )
bool destroyAllRadarAreas ()
float float getRadarAreaSize ( radararea radararea )
int int int int getRadarAreaColor ( radararea radararea )
bool isRadarAreaFlashing ( radararea radararea )
bool setRadarAreaSize ( element radararea, float x, float y )
bool setRadarAreaColor ( element radararea, int r, int g, int b, int a )
bool setRadarAreaFlashing ( element radararea, bool flash )
Scoreboard functions
bool addScoreboardColumn ( string id, string name, float width )
bool removeScoreboardColumn ( string id )
Server functions
int getMaxPlayers ()
bool serverLoggerPrint ( string text )
bool serverChat ( string text, [r, g, b] )
bool playerPM ( element player, string text, [r, g, b] )
bool outputDebugString ( string text, [[[int]] level=3] )
bool addCommandHandler ( string key, string handler )
bool removeCommandHandler ( string key )
spawnpoint functions
float getspawnpointRotation ( spawnpoint spawn )
int getspawnpointSkin ( spawnpoint spawn )
bool setspawnpointRotation ( element spawn, float rotation )
bool setspawnpointSkin ( element spawn, int skin )
Text Functions
textdisplay textCreateDisplay ()
void textDestroyDisplay ( textdisplay )
textitem textCreateTextItem ( [text, x, y, priority, red, green, blue, alpha, scale] )
void textDestroyTextItem ( textitem )
void textDisplayAddText ( textdisplay, textitem )
void textDisplayAddObserver ( textdisplay, player )
void textItemSetText ( textitem, text )
string textItemGetText ( textitem )
void textItemSetScale ( textitem, scale )
float textItemGetScale ( textitem )
void textItemSetPosition ( textitem, x, y )
float float textItemGetPosition ( textitem )
void textItemSetColor ( textitem, red, green, blue, alpha )
int int int int textItemGetColor ( textitem )
void textItemSetPriority ( textitem, priority )
int textItemGetPriority ( textitem )
Utility functions
float getDistanceBetweenpoints2D ( float x1, float y1, float x2, float y2 )
float getDistanceBetweenpoints3D ( float x1, float y1, float z1, float x2, float y2, float z2 )
int [[randint]] ( int lowerbound, int upperbound )
float randFloat ()
int getTickCount ()
string gettok ( string text, int index, int separator )
bool setTimer ( string function, int time, [arg1, arg2, ...] )
Vehicle functions
vehicle createVehicle ( int id, float x, float y, float z, [float rx, float ry, float rz] )
bool destroyAllVehicles ()
int int int int getVehicleColor ( vehicle vehicle )
float getVehicleHealth ( vehicle vehicle )
int getVehicleID ( vehicle vehicle )
int getVehicleIDFromName ( string name )
int getVehicleIndex ( vehicle vehicle )
float float float getVehicleMoveSpeed ( string vehicle )
string getVehicleName ( string vehicle )
string getVehicleNameFromID ( int id )
player getVehicleOccupant ( vehicle vehicle, [[[int]] seat=0] )
float float float getVehicleRotation ( vehicle vehicle )
float float float getVehicleTurnSpeed ( vehicle vehicle )
float float getVehicleTurretPosition ( vehicle vehicle )
int getVehicleMaxPassengers ( vehicle vehicle )
bool isVehicleLocked ( vehicle vehicle )
bool fixVehicle ( element vehicle )
bool blowVehicle ( element vehicle, [bool explode=true] )
bool setVehicleRotation ( element vehicle, float rx, float ry, float rz )
bool setVehicleMoveSpeed ( element vehicle, float x, float y, float z )
bool setVehicleTurnSpeed ( element vehicle, float rx, float ry, float rz )
bool setVehicleHealth ( element vehicle, float health )
bool setVehicleColor ( element vehicle, int color1, int color2, int color3, int color4 )
bool setVehicleLocked ( element vehicle, bool locked )
Weapon functions
string getWeaponNameFromID ( int id )
int getWeaponIDFromName ( string name )
bool giveWeapon ( element player, int weapon, [[[int]] ammo=30] )
bool takeWeapon ( element player, int weapon )
bool takeAllWeapons ( element player )
World functions
int getWeather ()
bool setTime ( int hour, int min )
bool setWeather ( int id )
bool setWeatherBlended ( int id )
XML functions
xmlnode xmlFindSubNode ( parent, subnode, index )
string xmlNodeGetValue ( xmlNode )
bool xmlNodeSetValue ( xmlNode, value )
string xmlNodeGetAttribute ( xmlNode, attribute name )
bool xmlNodeSetAttribute ( xmlNode, attribute name, value )
xmlnode xmlLoadFile ( filename )
bool xmlUnloadFile ( xmlnode )