Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined _aEscudo_included
- #endinput
- #endif
- #define _aEscudo_included
- #include <a_samp>
- #define CallBack:_%1(%2) forward_%1(%2); \ public_%1(%2)
- #define Slot (3)
- #define MAX_DANO (15)
- static damage[MAX_PLAYERS];
- CallBack:a_OnPlayerTakeDamage(playerid, issuerid){
- if(issuerid != INVALID_PLAYER_ID){
- if(IsPlayerAttachedObjectSlotUsed(playerid, Slot)){
- if(damage[playerid] < MAX_DANO) ++damage[playerid], SetPlayerHealth(playerid, 100.0);
- else if(damage[playerid] > MAX_DANO) damage[playerid] = 0, RemovePlayerAttachedObject(playerid, Slot);
- }
- }
- return true;
- }
- CallBack:a_OnPlayerGiveDamage(playerid, damagedid, Float: amount){
- if(damagedid != INVALID_PLAYER_ID){
- if(IsPlayerAttachedObjectSlotUsed(damagedid, Slot)){
- if(damage[damagedid] < MAX_DANO) amount = 10.0;
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement