Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Float:VidaB[200];
- new Float:ChalecoB[200];
- forward QuitarObj(playerid);
- public QuitarObj(playerid)
- {
- for(new i=0; i < 5; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid,i))
- {
- RemovePlayerAttachedObject(playerid,i);
- }
- }
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- new Float:Vida;
- GetPlayerHealth(playerid, Vida);
- if(Vida < VidaB[playerid])
- {
- SetTimerEx("VidaHold",600,0,"d",playerid);
- SetPlayerAttachedObject(playerid, 0, 1240, 1, 0.797953, 0.070644, 0.001249, 0.521487, 89.103843, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- VidaB[playerid] = Vida;
- SetTimerEx("QuitarObj",2000,0,"d",playerid);
- new Float:Chaleco;
- GetPlayerArmour(playerid, Chaleco);
- if(Chaleco < ChalecoB[playerid])
- {
- SetTimerEx("ChalecoHold",600,0,"d",playerid);
- SetPlayerAttachedObject(playerid, 0, 1242, 1, 0.797953, 0.070644, 0.001249, 0.521487, 89.103843, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- ChalecoB[playerid] = Chaleco;
- SetTimerEx("QuitarObj",2000,0,"d",playerid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement