Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///---OnPlayerReloading(playerid, weaponid, ammo);---///
- //Release 4
- /*by*/
- // ////// //
- // /// // /////
- // /// // // //
- ////// ////// ////// /////
- /*-------------------------------------------------------*/
- #include <a_samp>
- #tryinclude <foreach>
- #if defined OPRL
- #endinput
- #endif
- #define OPRL
- forward OnPlayerReloading(playerid, weaponid, ammo);
- forward EndReloading(playerid);
- new P_InReloading[MAX_PLAYERS];
- public OnPlayerUpdate(playerid)
- {
- new iWeaponid = GetPlayerWeapon(playerid);
- if(GetPlayerWeaponState(playerid) == 3 && iWeaponid != 25)//WEAPONSTATE_RELOADING
- {
- new iAmmo = GetPlayerAmmo(playerid);
- if(P_InReloading[playerid] == 0) {
- CallLocalFunction("OnPlayerReloading", "idd", playerid, iWeaponid, iAmmo);
- SetTimerEx("EndReloading", 2100, 0, "d", playerid);
- }
- P_InReloading[playerid] = 1;
- }
- if(funcidx("OnPlayerUpdate")) return CallRemoteFunction("OnPlayerUpdate", "i", playerid);
- return 1;
- }
- public EndReloading(playerid)
- {
- P_InReloading[playerid] = 0;
- return 1;
- }
- #if defined _ALS_OnPlayerUpdate
- #undef OnPlayerUpdate
- #else
- #define _ALS_OnPlayerUpdate
- #endif
- #define OnPlayerUpdate LZLo_OnPlayerUpdate
- forward LZLo_OnPlayerUpdate(playerid);
- ///---OnPlayerReloading(playerid, weaponid, ammo);---///
- //Release 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement