21.08.2011, 00:10
(
Последний раз редактировалось TheChaoz; 06.09.2011 в 23:52.
)
Callbackz
Introduction:
This include have some callbacks and functions that i think you can find useful. Some of them were posted as sugestions, other's are my own ideas.
Install:
Just copy the file to yoour "include" folder.
Important:If you will use this include on a Filterscript, you must add this before including the file:
pawn Код:
#define FILTERSCRIPT
Callbacks and functions of the include
Callbacks
Код:
OnPlayerPause(playerid) OnPlayerAFK(playerid) OnPlayerShotPlayer(playerid, targetid, Float:Heath, Float:Armour, weaponidt) (Headshot parameter removed) OnPlayerWeaponChange(playerid, newweaponid, oldweaponid) OnPlayerVirtualWorldChange(playerid, newworldid, oldworldid) OnPlayerEnterWater(playerid) OnPlayerExitWater(playerid) OnPlayerHealthChange(playerid, Float:newhealth, Float:oldhealth) OnPlayerArmourChange(playerid, Float:newarmour, Float:oldarmour) OnPlayerMoneyChange(playerid, newmoney, oldmoney) OnPlayerUseMachine(playerid) OnVehicleCreate(vehicleid) OnVehicleDestroy(vehicleid) OnPlayerUseVendingMachine(playerid) OnPlayerPlayAnimation(playerid, Lib[], Name[]) OnPlayerScoreChange(playerid, newscore, oldscore)
Код:
SetPlayerAFK(playerid, bool:afk) IsPlayerAFK(playerid) IsPlayerPaused(playerid) IsPlayerInWater(playerid) IsPlayerParachuting(playerid) IsPlayerUsingMachine(playerid) SetPlayerMoney(playerid, money) CrashPlayer(playerid) EnableDriveBy(bool:enable) EnablePlayerDriveBy(playerid, bool:enable) EnableInteriorDamage(bool:enable) EnablePlayerInteriorDamage(playerid, bool:enable) Reconnect(playerid) ReconnectEx(playerid, time) GetPlayerFPS(playerid) GetVehiclePlate(vehicleid, Plate[], size) GetVehicleColor(vehicleid, color1, color2) GetVehicleInterior(vehicleid) GetVehicleIDFromPlate(Plate[]) IsVehicleCreated(vehicleid) EnableVendingMachines(bool:enable) EnableVendingMachinesForPlayer(playerid, bool:enable) EnableCapsLock(bool:enable) EnableCapsLockForPlayer(playerid, bool:enable) GivePlayerScore(playerid, score) GetOnlinePlayers(bool:CountNPC) AddForbidenNick(nick[]) (New!) AddForbidenWord(word[]) (New!) EnableTiresDamage(bool:Enable) (New!) EnableTiresDamageForVehicle(vehicleid, bool:Enable) (New!) GetVehicleType(model) (New!)
No known bugs until now. If you find one, please let me know, so i can fix it.
Is very likely that when you compile a script that use this include, you get one (or two) warns like the following, but there's nothing to worry about.
pawn Код:
warning 200: symbol "@yH_VehicleDamageStatusUpdate2C" is truncated to 31 characters
Requirements:
YSI - (Direct download)
foreach(optional)
Download
Pastebin
Changelog
17/8/2011 (1є Beta release)
18/8/2011 (version 1.0)
Fixed some script bugs.22/8/2011 (version 1.1)
Fixed some script bugs and added new callbacks & functions:6/9/2011 (version 2.0)
Код:OnPlayerUseVendingMachine(playerid) (old OnPlayerUseMachine) OnPlayerPlayAnimation(playerid, Lib[], Name[]) OnPlayerScoreChange(playerid, newscore, oldscore) EnableVendingMachines(bool:enable) EnableVendingMachinesForPlayer(playerid, bool:enable) EnableCapsLock(bool:enable) EnableCapsLockForPlayer(playerid, bool:enable) GivePlayerScore(playerid, score) GetOnlinePlayers(bool:CountNPC)
New OnPlayerShotPlayer system. (thx to wups).
The code was optimized.
Added the posivility to remove callbacks & functions, so the amx takes up less space.
New functions added:
Код:AddForbidenNick(nick[]) AddForbidenWord(word[]) EnableTiresDamage(bool:Enable) EnableTiresDamageForVehicle(vehicleid, bool:Enable) GetVehicleType(model)
Suggestions
You can suggest new callbacks/functions that you like this script to contain, and if i can, i'll add them on future versions.
Creditos
JernejL (GetPlayerFPS y Reconnect (methods), and encode_tires function)
Double-O-Seven (Cross Product Functions)
Nero_3D (AdjustVector y GetPlayerCameraWeaponVector Functions)
wups (OnPlayerShootPlayer)
****** (YSI)
The Chaoz (Scripting)