Useful Callbacks

From SA-MP Wiki

Jump to: navigation, search

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}}})
pickupidThe ID of the pickup that was picked up
modelidThe 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}}})
playeridThe ID of the player who bought the food
typeThe type of beverage or food bought (0 for vending machines, 1 for chicken, 2 for pizza, 3 for burger)
costThe 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)
playeridThe ID of the player who bought the weapon
weaponidThe ID of the weapon the player bought
costThe cost of the weapon

By: Sacky

OnPlayerGamble

Description:

Allows you to script for the event of a gambling
Parameters:
({{{1}}})
playeridThe ID of the player who gambled
typeThe type of gambling done
betHow much the player bet
wlWhether they won or lost

By: Sacky

OnPlayerGetShot

Description:

Lets a player script for the event of someone getting shot
Parameters:
({{{1}}})
playeridThe 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}}})
playeridThe ID of the player who got modded the vehicle
vehicleidThe ID of the vehicle that got modded
partidThe ID of the part added to the vehicle
costThe cost of the part

By: Sacky

OnPlayerPickupItem

Description:

Lets a player script for the event of someone picking up an item (pickup)
Parameters:
({{{1}}})
playeridThe ID of the player who picked up the pickup
pickupidThe ID of the pickup that was picked up
modelidThe modelid of the pickup
typeThe type of spawn of the pickup

By: Sacky

OnVehicleRespawnEx

Description:

Lets a player script for the event of a vehicle respawning
Parameters:
({{{1}}})
vehicleidThe 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}}})
playeridThe ID of the player that entered the area
areaidThe 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}}})
playeridThe ID of the player that left the area
areaidThe ID of area the player left

By: DracoBlue

Personal tools
Navigation
Toolbox