Author Topic: Functions and callbacks of 0.4  (Read 5948 times)

0 Members and 1 Guest are viewing this topic.

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Functions and callbacks of 0.4
« on: July 29, 2012, 10:08:56 pm »
Here is the list of functions that are currently implemented in 0.4.

Functions:
Code: [Select]
//MESSAGES
int printf(const char* pszFormat, ...)
int SendCustomCommand(unsigned int uCmdType, const char* pszFormat, ...)
int SendClientMessage(int nPlayerId, unsigned int uColour, const char* pszFormat, ...)
int SendGameMessage(int nPlayerId, int nType, const char* pszFormat, ... )

//SERVER SETTINGS
int SetServerName(const char* pszText)
int GetServerName(char* pszBuffer, int nBufferLen)
int SetMaxPlayers(int nMaxPlayers)
int GetMaxPlayers(void)
int SetServerPassword(char* pszBuffer)
int GetServerPassword(char* pszBuffer, int nBufferLen)
int SetGameModeText(const char* pszText)
int GetGameModeText(char* pszBuffer, int nBufferLen)

//WORLD: settings
int SetWorldBounds(float fMaxX, float fMinX, float fMaxY, float fMinY)
int GetWorldBounds(float* pfMaxX, float* pfMinX, float* pfMaxY, float* pfMinY)
int SetWastedSettings(unsigned int dwDeathTimer, unsigned int dwFadeTimer, float fFadeInSpeed, float fFadeOutSpeed, unsigned int dwFadeColour, unsigned int dwCorpseFadeStart, unsigned int dwCorpseFadeTime)
int GetWastedSettings(unsigned int* pdwDeathTimer, unsigned int* pdwFadeTimer, float* pfFadeInSpeed, float* pfFadeOutSpeed, unsigned int* pdwFadeColour, unsigned int* pdwCorpseFadeStart, unsigned int* pdwCorpseFadeTime)
int SetTimeRate(unsigned int uTimeRate)
unsigned int GetTimeRate(void)
int SetHour(int nHour)
int GetHour(void)
int SetMinute(int nMinute)
int GetMinute(void)
int SetWeather(int nWeather)
int GetWeather(void)
int SetGravity(float fGravity)
float GetGravity(void)
int SetGamespeed(float fGamespeed)
float GetGamespeed(void)
int SetWaterLevel(float fWaterLevel)
float GetWaterLevel(void)
int SetMaxHeight(float fHeight)
float GetMaxHeight(void)

//WORLD: toggles
int ToggleSyncFrameLimiter(unsigned int bToggle)
unsigned int EnabledSyncFrameLimiter(void)
int ToggleFrameLimiter(unsigned int bToggle)
unsigned int EnabledFrameLimiter(void)
int ToggleTaxiBoostJump(unsigned int bToggle)
unsigned int EnabledTaxiBoostJump(void)
int ToggleDriveOnWater(unsigned int bToggle)
unsigned int EnabledDriveOnWater(void)
int ToggleFastSwitch(unsigned int bToggle)
unsigned int EnabledFastSwitch(void)
int ToggleFriendlyFire(unsigned int bToggle)
unsigned int EnabledFriendlyFire(void)
int ToggleDisableDriveby(unsigned int bToggle)
unsigned int EnabledDisableDriveby(void)
int TogglePerfectHandling(unsigned int bToggle)
unsigned int EnabledPerfectHandling(void)
int ToggleFlyingCars(unsigned int bToggle)
unsigned int EnabledFlyingCars(void)
int ToggleJumpSwitch(unsigned int bToggle)
unsigned int EnabledJumpSwitch(void)
int ToggleShowMarkers(unsigned int bToggle)
unsigned int EnabledShowMarkers(void)
int ToggleStuntBike(unsigned int bToggle)
unsigned int EnabledStuntBike(void)
int ToggleShootInAir(unsigned int bToggle)
unsigned int EnabledShootInAir(void)
int ToggleShowNametags(unsigned int bToggle)
unsigned int EnabledShowNametags(void)
int ToggleJoinMessages(unsigned int bToggle)
unsigned int EnabledJoinMessages(void)
int ToggleDeathMessages(unsigned int bToggle)
unsigned int EnabledDeathMessages(void)

//MISC
int CreateExplosion(int nWorldId, int nType, float fPosX, float fPosY, float fPosZ, int nSourcePlayerId, unsigned int bGroundLevel)
int PlaySound(int nWorldId, int nSoundId, float fPosX, float fPosY, float fPosZ)
int HideMapObject(int nModelId, int nTenthX, int nTenthY, int nTenthZ)
int ShowMapObject(int nModelId, int nTenthX, int nTenthY, int nTenthZ)
int ShowAllMapObjects(void)

//CLASSES
int SetUseClasses(unsigned int bToggle)
unsigned int GetUseClasses(void)
int GetPlayerClass(int nPlayerId)
int AddPlayerClass(int nTeamId, unsigned int uColour, int nModelId, float fSpawnX, float fSpawnY, float fSpawnZ, float fAngleZ, int nWep1, int nWep1Ammo, int nWep2, int nWep2Ammo, int nWep3, int nWep3Ammo)
int SetSpawnPlayerPos(float fPosX, float fPosY, float fPosZ)
int SetSpawnCameraPos(float fPosX, float fPosY, float fPosZ)
int SetSpawnCameraLookAt(float fPosX, float fPosY, float fPosZ)

//ADMIN
unsigned int IsPlayerAdmin(int nPlayerId)
int SetPlayerAdmin(int nPlayerId, unsigned int bToggle)
int GetPlayerIP(int nPlayerId, char* pszBuffer, int nBufferLen)
int KickPlayer(int nPlayerId)
int BanPlayer(int nPlayerId)
int BanIP(char* pszIPAddress)
int UnbanIP(char* pszIPAddress)
unsigned int IsIPBanned(char* pszIPAddress)

//PLAYERS: basic
int GetPlayerIDFromName(char* pszName)
unsigned int IsPlayerConnected(int nPlayerId)
unsigned int IsPlayerSpawned(int nPlayerId)
unsigned int IsPlayerStreamedForPlayer(int nCheckPlayer, int nPlayerId)
unsigned int GetPlayerKey(int nPlayerId)
int SetPlayerWorld(int nPlayerId, int nWorld)
int GetPlayerWorld(int nPlayerId)
int SetPlayerSecWorld(int nPlayerId, int nSecWorld)
int GetPlayerSecWorld(int nPlayerId)
int GetPlayerUniqueWorld(int nPlayerId)
unsigned int IsPlayerWorldCompatible(int nPlayerId, int nWorld)
int GetPlayerState(int nPlayerId)
int GetPlayerName(int nPlayerId, char* szBuffer, int nBufferLen)
int SetPlayerTeam(int nPlayerId, int nTeamId)
int GetPlayerTeam(int nPlayerId)
int SetPlayerSkin(int nPlayerId, int nSkinId)
int GetPlayerSkin(int nPlayerId)
int SetPlayerColour(int nPlayerId, unsigned int uColour)
unsigned int GetPlayerColour(int nPlayerId)
int ForcePlayerSpawn(int nPlayerId)
int ForcePlayerSelect(int nPlayerId)
int ForceAllSelect(void)

//PLAYERS: score, ping, money, typing
int GivePlayerMoney(int nPlayerId, int nAmount)
int SetPlayerMoney(int nPlayerId, int nAmount)
int GetPlayerMoney(int nPlayerId)
int SetPlayerScore(int nPlayerId, int nScore)
int GetPlayerScore(int nPlayerId)
int GetPlayerPing(int nPlayerId)
unsigned int IsPlayerTyping(int nPlayerId)

//PLAYERS: health and location
int SetPlayerHealth(int nPlayerId, float fHealth)
float GetPlayerHealth(int nPlayerId)
int SetPlayerArmour(int nPlayerId, float fArmour)
float GetPlayerArmour(int nPlayerId)
int SetPlayerImmunityFlags(int nPlayerId, int nFlags)
int GetPlayerImmunityFlags(int nPlayerId)
int SetPlayerPos(int nPlayerId, float fPosX, float fPosY, float fPosZ)
int GetPlayerPos(int nPlayerId, float* pfPosX, float* pfPosY, float* pfPosZ)
int SetPlayerSpeed(int nPlayerId, float fSpeedX, float fSpeedY, float fSpeedZ)
int GetPlayerSpeed(int nPlayerId, float* pfSpeedX, float* pfSpeedY, float* pfSpeedZ)
int AddPlayerSpeed(int nPlayerId, float fSpeedX, float fSpeedY, float fSpeedZ)
int SetPlayerHeading(int nPlayerId, float fAngleZ)
float GetPlayerHeading(int nPlayerId)
int SetPlayerInterior(int nPlayerId, int nInterior)
int SetPlayerAlpha(int nPlayerId, int nAlpha, int nFadeTime)
int GetPlayerAlpha(int nPlayerId)

//PLAYERS: vehicle
int PutPlayerInVehicle(int nPlayerId, int nVehicleId, int nSlot, unsigned int bMakeRoom, unsigned int bWarp)
int RemovePlayerFromVehicle(int nPlayerId)
int GetPlayerInVehicleStatus(int nPlayerId)
int GetPlayerInVehicleSlot(int nPlayerId)
int GetPlayerVehicleID(int nPlayerId)

//PLAYERS: toggles
int TogglePlayerControllable(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerControllable(int nPlayerId)
int TogglePlayerDriveby(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerDriveby(int nPlayerId)
int TogglePlayerWhiteScanlines(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerWhiteScanlines(int nPlayerId)
int TogglePlayerGreenScanlines(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerGreenScanlines(int nPlayerId)
int TogglePlayerWidescreen(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerWidescreen(int nPlayerId)
int TogglePlayerShowMarkers(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerShowMarkers(int nPlayerId)
int TogglePlayerAttackPriv(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerAttackPriv(int nPlayerId)
int TogglePlayerHasMarker(int nPlayerId, unsigned int bToggle)
unsigned int EnabledPlayerHasMarker(int nPlayerId)

//PLAYERS: weapons
int GivePlayerWeapon(int nPlayerId, int nWeaponId, int nAmmo)
int SetPlayerWeapon(int nPlayerId, int nWeaponId, int nAmmo)
int GetPlayerWeapon(int nPlayerId)
int GetPlayerWeaponAmmo(int nPlayerId)
int SetPlayerWeaponSlot(int nPlayerId, int nSlot)
int GetPlayerWeaponSlot(int nPlayerId)
int GetPlayerWeaponAtSlot(int nPlayerId, int nSlot)
int GetPlayerAmmoAtSlot(int nPlayerId, int nSlot)
int RemovePlayerWeapon(int nPlayerId, int nWeaponId)
int RemoveAllWeapons(int nPlayerId)

//PLAYERS: camera
int SetCameraPosition(int nPlayerId, float fPosX, float fPosY, float fPosZ, float fLookX, float fLookY, float fLookZ)
int RestoreCamera(int nPlayerId)
unsigned int IsCameraLocked(int nPlayerId)

//PLAYERS: misc
int SetPlayerAnimation(int nPlayerId, int nAnimationId)
int SetPlayerWantedLevel(int nPlayerId, int nLevel)
int GetPlayerStandingOnVehicle(int nPlayerId)
int GetPlayerStandingOnObject(int nPlayerId)

//VEHICLES
int CreateVehicle(int nModelId, int nWorld, float fPosX, float fPosY, float fPosZ, float fAngleZ, int nColour1, int nColour2)
int DeleteVehicle(int nVehicleId)
int GetVehicleSyncSource(int nVehicleId)
int GetVehicleSyncType(int nVehicleId)
unsigned int IsVehicleStreamedForPlayer(int nVehicleId, int nPlayerId)
int SetVehicleWorld(int nVehicleId, int nWorld)
int GetVehicleWorld(int nVehicleId)
int GetVehicleModel(int nVehicleId)
int GetVehicleOccupant(int nVehicleId, int nSlotIndex)
int RespawnVehicle(int nVehicleId)
int SetVehicleImmunityFlags(int nVehicleId, int nImmuFlags)
int GetVehicleImmunityFlags(int nVehicleId)
int KillVehicle(int nVehicleId)
unsigned int IsVehicleWrecked(int nVehicleId)
int SetVehiclePos(int nVehicleId, float fPosX, float fPosY, float fPosZ, unsigned int bRemoveOccupants)
int GetVehiclePos(int nVehicleId, float* pfPosX, float* pfPosY, float* pfPosZ)
int SetVehicleRot(int nVehicleId, float fX, float fY, float fZ, float fW)
int SetVehicleRotEuler(int nVehicleId, float fX, float fY, float fZ)
int GetVehicleRot(int nVehicleId, float* pfX, float* pfY, float *pfZ, float *pfW)
int GetVehicleRotEuler(int nVehicleId, float* pfX, float* pfY, float *pfZ)
int SetVehicleSpeed(int nVehicleId, float fX, float fY, float fZ)
int GetVehicleSpeed(int nVehicleId, float* pfX, float* pfY, float* pfZ)
int AddVehicleSpeed(int nVehicleId, float fX, float fY, float fZ)
int SetVehicleRelSpeed(int nVehicleId, float fX, float fY, float fZ)
int GetVehicleRelSpeed(int nVehicleId, float* pfX, float* pfY, float* pfZ)
int AddVehicleRelSpeed(int nVehicleId, float fX, float fY, float fZ)
int SetVehicleTurnSpeed(int nVehicleId, float fX, float fY, float fZ)
int GetVehicleTurnSpeed(int nVehicleId, float* pfX, float* pfY, float* pfZ)
int AddVehicleTurnSpeed(int nVehicleId, float fX, float fY, float fZ)
int SetVehicleSpawnPos(int nVehicleId, float fPosX, float fPosY, float fPosZ, float fAngleZ)
int GetVehicleSpawnPos(int nVehicleId, float* pfPosX, float* pfPosY, float* pfPosZ, float* pfAngleZ)
int SetVehicleSpawnRot(int nVehicleId, float fX, float fY, float fZ, float fW)
int SetVehicleSpawnRotEuler(int nVehicleId, float fX, float fY, float fZ)
int GetVehicleSpawnRot(int nVehicleId, float* pfX, float* pfY, float* pfZ, float* pfW)
int GetVehicleSpawnRotEuler(int nVehicleId, float* pfX, float* pfY, float* pfZ)
int SetVehicleIdleRespawnTimer(int nVehicleId, unsigned int uTimer)
unsigned int GetVehicleIdleRespawnTimer(int nVehicleId)
int SetVehicleHealth(int nVehicleId, float fHealth)
float GetVehicleHealth(int nVehicleId)
int SetVehicleColour(int nVehicleId, int nColour1, int nColour2)
int GetVehicleColour(int nVehicleId, int* pnColour1, int* pnColour2)
int SetVehicleDoorsLocked(int nVehicleId, unsigned int bToggle)
unsigned int GetVehicleDoorsLocked(int nVehicleId)
int SetVehiclePartStatus(int nVehicleId, int nPartId, int nStatus)
int GetVehiclePartStatus(int nVehicleId, int nPartId)
int SetVehicleTyreStatus(int nVehicleId, int nTyreId, int nStatus)
int GetVehicleTyreStatus(int nVehicleId, int nTyreId)
int SetVehicleDamageData(int nVehicleId, unsigned int uDamageData)
unsigned int GetVehicleDamageData(int nVehicleId)
int SetVehicleAlarm(int nVehicleId, unsigned int bToggle)
unsigned int GetVehicleAlarm(int nVehicleId)
int SetVehicleLights(int nVehicleId, unsigned int bToggle)
unsigned int GetVehicleLights(int nVehicleId)

//VEHICLES: handling
int ResetAllVehicleHandlings(void)
unsigned int ExistsHandlingRule(int nModelIndex, int nRuleIndex)
int SetHandlingRule(int nModelIndex, int nRuleIndex, double fValue)
double GetHandlingRule(int nModelIndex, int nRuleIndex)
int ResetHandlingRule(int nModelIndex, int nRuleIndex)
int ResetHandling(int nModelIndex)
unsigned int ExistsInstHandlingRule(int nVehicleId, int nRuleIndex)
int SetInstHandlingRule(int nVehicleId, int nRuleIndex, double fValue)
double GetInstHandlingRule(int nVehicleId, int nRuleIndex)
int ResetInstHandlingRule(int nVehicleId, int nRuleIndex)
int ResetInstHandling(int nVehicleId)

//PICKUPS
int CreatePickup(int nModel, int nWorld, int nQuantity, float fPosX, float fPosY, float fPosZ, int nAlpha, unsigned int bAutomatic)
int DeletePickup(int nPickupId)
unsigned int IsPickupStreamedForPlayer(int nPickupId, int nPlayerId)
int SetPickupWorld(int nPickupId, int nWorld)
int GetPickupWorld(int nPickupId)
int PickupGetAlpha(int nPickupId)
int PickupSetAlpha(int nPickupId, int nAlpha)
unsigned int PickupIsAutomatic(int nPickupId)
int PickupSetAutomatic(int nPickupId, unsigned int bToggle)
int SetPickupAutoTimer(int nPickupId, int nTimer)
int GetPickupAutoTimer(int nPickupId)
int PickupRefresh(int nPickupId)
int PickupGetPos(int nPickupId, float* pfPosX, float* pfPosY, float* pfPosZ)
int PickupSetPos(int nPickupId, float fPosX, float fPosY, float fPosZ)
int PickupGetModel(int nPickupId)
int PickupGetQuantity(int nPickupId)

//OBJECTS
int CreateObject(int nModelId, int nWorld, float fPosX, float fPosY, float fPosZ, int nAlpha)
int DeleteObject(int nObjectId)
unsigned int IsObjectStreamedForPlayer(int nObjectId, int nPlayerId)
int GetObjectModel(int nObjectId)
int SetObjectWorld(int nObjectId, int nWorld)
int GetObjectWorld(int nObjectId)
int SetObjectAlpha(int nObjectId, int nAlpha, int nTime)
int GetObjectAlpha(int nObjectId)
int MoveObjectTo(int nObjectId, float fX, float fY, float fZ, int nTime)
int MoveObjectBy(int nObjectId, float fX, float fY, float fZ, int nTime)
int SetObjectPos(int nObjectId, float fX, float fY, float fZ)
int GetObjectPos(int nObjectId, float* pfPosX, float* pfPosY, float* pfPosZ)
int RotObjectTo(int nObjectId, float fX, float fY, float fZ, float fW, int nTime)
int RotObjectToEuler(int nObjectId, float fX, float fY, float fZ, int nTime)
int RotObjectBy(int nObjectId, float fX, float fY, float fZ, float fW, int nTime)
int RotObjectByEuler(int nObjectId, float fX, float fY, float fZ, int nTime)
int GetObjectRot(int nObjectId, float* pfX, float* pfY, float *pfZ, float *pfW)
int GetObjectRotEuler(int nObjectId, float* pfX, float* pfY, float *pfZ)
int SetObjectShotReport(int nObjectId, unsigned int bToggle)
unsigned int IsObjectShotReport(int nObjectId)
int SetObjectBumpReport(int nObjectId, unsigned int bToggle)
unsigned int IsObjectBumpReport(int nObjectId)

Callbacks:
Code: [Select]
int OnInitServer(void)
void OnShutdownServer(void)
void OnFrame(float fElapsedTime)
void OnPlayerConnect(int nPlayerId)
void OnPlayerDisconnect(int nPlayerId, int nReason)
void OnPlayerBeginTyping(int nPlayerId)
void OnPlayerEndTyping(int nPlayerId)
int OnPlayerRequestClass(int nPlayerId, int nOffset)
int OnPlayerRequestSpawn(int nPlayerId)
void OnPlayerSpawn(int nPlayerId)
void OnPlayerDeath(int nPlayerId, int nKillerId, int nReason, int nBodyPart)
void OnPlayerUpdate(int nPlayerId, int nUpdateType)
int OnPlayerRequestEnter(int nPlayerId, int nVehicleId, int nSlotId)
void OnPlayerEnterVehicle(int nPlayerId, int nVehicleId, int nSlotId)
void OnPlayerExitVehicle(int nPlayerId, int nVehicleId)
int OnPickupClaimPicked(int nPickupId, int nPlayerId)
void OnPickupPickedUp(int nPickupId, int nPlayerId)
void OnPickupRespawn(int nPickupId)
void OnVehicleUpdate(int nVehicleId, int nUpdateType)
void OnVehicleExplode(int nVehicleId)
void OnVehicleRespawn(int nVehicleId)
void OnObjectShot(int nObjectId, int nPlayerId, int nWeapon)
void OnObjectBump(int nObjectId, int nPlayerId)
int OnPublicMessage(int nPlayerId, const char* pszText)
int OnCommandMessage(int nPlayerId, const char* pszText)
int OnPrivateMessage(int nPlayerId, int nTargetId, const char* pszText)
int OnInternalCommand(unsigned int uCmdType, const char* pszText)
int OnLoginAttempt(char* pszPlayerName, const char* pszUserPassword, const char* pszIpAddress)

The list is written in C syntax, but should be rather obvious anyway.

Restored from a copy stored in Google's cache.
Original poster: maxorator
« Last Edit: May 11, 2013, 07:14:59 pm by stormeus »
Do not PM me for support.