Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerUpdate(playerid)
- {
- new Keys, ud, lr;
- GetPlayerKeys(playerid, Keys, ud, lr);
- if(CheckCrouch[playerid] == 1)
- {
- switch(WeaponID[playerid])
- {
- case 24, 25, 34:
- {
- if((Keys & KEY_CROUCH) && !((Keys & KEY_FIRE) || (Keys & KEY_HANDBRAKE)) && GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK )
- {
- if(Ammo[playerid][GetPlayerWeapon(playerid)] > GetPlayerAmmo(playerid))
- {
- OnPlayerCBug(playerid);
- }
- }
- }
- }
- }
- if(!ud && !lr) { NotMoving[playerid] = 2;
- }
- else { NotMoving[playerid] = 0;
- }
- {
- new drunknew;
- drunknew = GetPlayerDrunkLevel(playerid);
- if (drunknew < 100)
- {
- SetPlayerDrunkLevel(playerid, 2000);
- } else
- {
- if (pDrunkLevelLast[playerid] != drunknew)
- {
- new wfps = pDrunkLevelLast[playerid] - drunknew;
- if ((wfps > 0) && (wfps < 200))
- pFPS[playerid] = wfps;
- pDrunkLevelLast[playerid] = drunknew;
- }
- new Float:hp,Float:arm;
- GetPlayerHealth(playerid,hp);
- GetPlayerArmour(playerid,arm);
- if(InDM[playerid] == 0)
- {
- if(hp <= 99.0) return SetPlayerHealth(playerid, 100.0);
- if(arm <= 99.0) return SetPlayerArmour(playerid, 100.0);
- }
- }
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment