Useful Callbacks
From SA-MP Wiki
Contents |
Useful Callbacks (uf.inc)
Here you can find useful callbacks for your pawno scripts. These are documented from uf.inc.
OnPickupRespawn
Description:
Allows you to script for the event of a pickup respawning
Parameters:({{{1}}})
pickupid | The ID of the pickup that was picked up |
modelid | The modelid of the pickup |
By: Sacky
OnPlayerBuyFood
Description:
Allows you to script for the event of a player buying food or drink (at cluckin' bell, pizza, burger or vending machines)
Parameters:({{{1}}})
playerid | The ID of the player who bought the food |
type | The type of beverage or food bought (0 for vending machines, 1 for chicken, 2 for pizza, 3 for burger) |
cost | The cost of the item |
By: Sacky
OnPlayerBuyWeapon
Description:
Allows you to script for the event of a player buying a weapon (at ammunation)
Parameters:(playerid,weaponid,cost)
playerid | The ID of the player who bought the weapon |
weaponid | The ID of the weapon the player bought |
cost | The cost of the weapon |
By: Sacky
OnPlayerGamble
Description:
Allows you to script for the event of a gambling
Parameters:({{{1}}})
playerid | The ID of the player who gambled |
type | The type of gambling done |
bet | How much the player bet |
wl | Whether they won or lost |
By: Sacky
OnPlayerGetShot
Description:
Lets a player script for the event of someone getting shot
Parameters:({{{1}}})
playerid | The ID of the player who got shot |
By: Sacky
OnPlayerModVehicle
Description:
Lets a player script for the event of a player modding a vehicle
Parameters:({{{1}}})
playerid | The ID of the player who got modded the vehicle |
vehicleid | The ID of the vehicle that got modded |
partid | The ID of the part added to the vehicle |
cost | The cost of the part |
By: Sacky
OnPlayerPickupItem
Description:
Lets a player script for the event of someone picking up an item (pickup)
Parameters:({{{1}}})
playerid | The ID of the player who picked up the pickup |
pickupid | The ID of the pickup that was picked up |
modelid | The modelid of the pickup |
type | The type of spawn of the pickup |
By: Sacky
OnVehicleRespawnEx
Description:
Lets a player script for the event of a vehicle respawning
Parameters:({{{1}}})
vehicleid | The ID of the vehicle that respawned |
By: Sacky
DCallbacks (dcallbacks.inc)
Some callbacks made by dracoblue that improve the ease of coding a gamemode, they can be found here
OnPlayerEnterArea
Description:
Lets a player script for the event of a player entering a certain area
Parameters:({{{1}}})
playerid | The ID of the player that entered the area |
areaid | The ID of area the player entered |
By: DracoBlue
OnPlayerLeaveArea
Description:
Lets a player script for the event of a player leaving a certain area
Parameters:({{{1}}})
playerid | The ID of the player that left the area |
areaid | The ID of area the player left |
By: DracoBlue