28.12.2017, 15:44
(
Последний раз редактировалось Ritzy2K; 06.10.2018 в 09:23.
)
New SA-MP Functions
v 0.2 | Last Update - 29/12/17
Introduction
This Include adds wide range of SA-MP functions which gives other script developer extra control over their player.
These functions aren't rocket science code. Just adds some functions which new coders might find difficult to write.
Current Functions
Код:
1. IsPlayerAiming(playerid, weaponid); - returns true if a player is aiming. (Includes zoom-in weapons.) 2. IsPlayerSwimming(playerid); - returns true if a player is swimming. (Regardless of the water body.) 3. IsPlayerSkydiving(playerid); - returns true if a player is skydiving. 4. IsPlayerParachuting(playerid); - returns true if a player is parachuting. 5. IsPlayerPassengerAiming(playerid); - returns true if a player is aiming a weapon as passenger of vehicle. 6. IsPlayerInKitchen(playerid); - returns true if player is in Kitchen. (Default Interiors.) 7. IsPlayerNearVending(playerid, type); - returns true if player is near Vending Machine. (Default locations.) 8. IsPlayerNearPump(playerid); - returns true if a player is near Fuel Pump. (Default Locations.) 8. IsPlayerCarSurfing(playerid) - returns true if player is car surfing. 9. IsPlayerNearPlayer(playerid, targetid, float:radius) - returns true if player is near another player in given radius. 10. IsPlayerNearVehicle(playerid, vehicleid, float:radius) - returns true if player is near specified vehicle in given radius. 11. IsPlayerNearDynamicObject(playerid, objectid, float:radius) - returns true if player is near specified dynamic object id in given radius 12. IsPlayerRidingTrain(playerid); - returns true if player is riding a train. 13. IsPlayerSpawned(playerid); - returns true if player is spawned.
Код:
Ritzy - Author |Stuntman| And Southclaws - Helped a lot Emmet_ - Vending Machine Array OneDay - Optimization SA-MP Team (Past, and Present) - For SA-MP
Note: You're free to use this however you please in your script. But, please don't reupload without my permission.
There might be some bugs. Please report them.
Suggestions for functions are welcome!