Quote:
Originally Posted by Emmet_
If you really want it that bad, add this at the bottom of a_samp.inc...
pawn Code:
new g_PlayerWeapon[MAX_PLAYERS char];
forward OnPlayerWeaponChange(playerid, oldgun, newgun);
public OnPlayerUpdate(playerid) { if (g_PlayerWeapon{playerid} != GetPlayerWeapon(playerid)) { CallLocalFunction("OnPlayerWeaponChange", "ddd", playerid, g_PlayerWeapon{playerid}, GetPlayerWeapon(playerid)); g_PlayerWeapon{playerid} = GetPlayerWeapon(playerid); } return CallLocalFunction("wc_OnPlayerUpdate", "d", playerid); }
#if defined _ALS_OnPlayerUpdate #undef OnPlayerUpdate #else #define _ALS_OnPlayerUpdate #endif #define OnPlayerUpdate wc_OnPlayerUpdate forward wc_OnPlayerUpdate(playerid);
That took me two minutes to write! Didn't even have to open PAWNO...
|
Quote:
Originally Posted by DJloko
yes, i know, but, i think it wold be better if a native callback ...
|
It's easier for us to have a native function/callback instead of using fast timers/OnPlayerUpdate.