Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- forward TimerForRemoveObj(playerid);
- new HitObjTime[MAX_PLAYERS];
- new RedScreenTime[MAX_PLAYERS];
- new AdvTime[MAX_PLAYERS];
- new Text:textredscreen;
- public OnPlayerConnect(playerid)
- {
- HitObjTime[playerid] = 0;
- RedScreenTime[playerid] = 0;
- AdvTime[playerid] = 0;
- return 1;
- }
- public OnGameModeInit()
- {
- textredscreen = TextDrawCreate(2.000000, 333.000000, "___");
- TextDrawBackgroundColor(textredscreen, 255);
- TextDrawFont(textredscreen, 1);
- TextDrawLetterSize(textredscreen, 0.790000, 12.700002);
- TextDrawColor(textredscreen, -1);
- TextDrawSetOutline(textredscreen, 0);
- TextDrawSetProportional(textredscreen, 1);
- TextDrawSetShadow(textredscreen, 1);
- TextDrawUseBox(textredscreen, 1);
- TextDrawBoxColor(textredscreen, -16776564);
- TextDrawTextSize(textredscreen, 639.000000, 20.000000);
- TextDrawSetSelectable(textredscreen, 0);
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(weaponid != 18 && weaponid != 37 && weaponid != 41)
- {
- PlayerPlaySound(playerid,5202,0.0,0.0,0.0);
- PlayerPlaySound(issuerid,5202,0.0,0.0,0.0);
- if(RedScreenTime[playerid] == 0)
- {
- TextDrawShowForPlayer(playerid, textredscreen);
- RedScreenTime[playerid] = 1;
- }
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- SetPlayerAttachedObject(playerid, 1, 18675, 1, 0.076999,0.052999,-1.553000);
- HitObjTime[playerid] = 1;
- SetTimerEx("TimerForRemoveObj", 1000, true, "i", playerid);
- AdvTime[playerid]++;
- if(AdvTime[playerid] == 50)
- {
- SendClientMessage(playerid, -1, "[FS] Improved_damage by brawrr (Skype: Rev1se)");
- AdvTime[playerid] = 0;
- }
- }
- return 1;
- }
- public TimerForRemoveObj(playerid)
- {
- if(HitObjTime[playerid] == 1)
- {
- HitObjTime[playerid] = 0;
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- }
- if(RedScreenTime[playerid] == 1)
- {
- RedScreenTime[playerid] = 0;
- TextDrawHideForPlayer(playerid, textredscreen);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement