SHOW:
|
|
- or go back to the newest paste.
1 | #define FILTERSCRIPT | |
2 | ||
3 | #include <a_samp> | |
4 | ||
5 | - | #pragma tabsize 0 |
5 | + | |
6 | forward HideDano(playerid); | |
7 | ||
8 | new PlayerText:Damage[MAX_PLAYERS]; | |
9 | new PlayerText:Dano[MAX_PLAYERS]; | |
10 | ||
11 | new TimerDamageTuga[MAX_PLAYERS]; | |
12 | new TimerDanoTuga[MAX_PLAYERS]; | |
13 | ||
14 | public OnFilterScriptInit() | |
15 | { | |
16 | print("\n--------------------------------------"); | |
17 | print(" Sistema de Dano "); | |
18 | print(" By: Tugamars "); | |
19 | print("--------------------------------------\n"); | |
20 | ||
21 | return 1; | |
22 | } | |
23 | ||
24 | public OnFilterScriptExit() | |
25 | { | |
26 | print("\n--------------------------------------"); | |
27 | print(" Sistema de Dano "); | |
28 | print(" By: Tugamars "); | |
29 | print("--------------------------------------\n"); | |
30 | return 1; | |
31 | - | public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) |
31 | + | |
32 | ||
33 | public OnPlayerConnect(playerid) | |
34 | { | |
35 | ||
36 | - | public OnPlayerExitVehicle(playerid, vehicleid) |
36 | + | TimerDamageTuga[playerid] = -1; |
37 | TimerDanoTuga[playerid] = -1; | |
38 | ||
39 | Damage[playerid] = CreatePlayerTextDraw(playerid, 308.000000, 172.000000, ""); | |
40 | PlayerTextDrawBackgroundColor(playerid, Damage[playerid], 255); | |
41 | - | public OnPlayerStateChange(playerid, newstate, oldstate) |
41 | + | |
42 | PlayerTextDrawLetterSize(playerid, Damage[playerid], 0.500000, 1.300000); | |
43 | PlayerTextDrawColor(playerid, Damage[playerid], -1); | |
44 | PlayerTextDrawSetOutline(playerid, Damage[playerid], 0); | |
45 | PlayerTextDrawSetProportional(playerid, Damage[playerid], 1); | |
46 | - | public OnPlayerEnterCheckpoint(playerid) |
46 | + | |
47 | PlayerTextDrawSetSelectable(playerid, Damage[playerid], 0); | |
48 | ||
49 | Dano[playerid] = CreatePlayerTextDraw(playerid, 455.000000, 26.000000, ""); | |
50 | PlayerTextDrawBackgroundColor(playerid, Dano[playerid], 255); | |
51 | - | public OnPlayerLeaveCheckpoint(playerid) |
51 | + | |
52 | PlayerTextDrawLetterSize(playerid, Dano[playerid], 0.500000, 1.300000); | |
53 | PlayerTextDrawColor(playerid, Dano[playerid], -1); | |
54 | PlayerTextDrawSetOutline(playerid, Dano[playerid], 0); | |
55 | PlayerTextDrawSetProportional(playerid, Dano[playerid], 1); | |
56 | - | public OnPlayerEnterRaceCheckpoint(playerid) |
56 | + | PlayerTextDrawSetShadow(playerid, Dano[playerid], 0xFFFFFFFF); |
57 | ||
58 | return 1; | |
59 | } | |
60 | ||
61 | - | public OnPlayerLeaveRaceCheckpoint(playerid) |
61 | + | |
62 | { | |
63 | new damage[128]; | |
64 | format(damage, sizeof(damage), "%.0f", amount); | |
65 | ||
66 | - | public OnRconCommand(cmd[]) |
66 | + | |
67 | ||
68 | PlayerTextDrawShow(playerid, Damage[playerid]); | |
69 | ||
70 | if(TimerDamageTuga[playerid] != -1) | |
71 | - | public OnPlayerRequestSpawn(playerid) |
71 | + | { |
72 | TimerDamageTuga[playerid] = SetTimerEx("HideDamage", 5000, false, "n", playerid); | |
73 | } | |
74 | ||
75 | return 1; | |
76 | - | public OnObjectMoved(objectid) |
76 | + | |
77 | public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) | |
78 | { | |
79 | new damage[128]; | |
80 | format(damage, sizeof(damage), "-%.0f", amount); | |
81 | - | public OnPlayerObjectMoved(playerid, objectid) |
81 | + | |
82 | PlayerTextDrawSetString(playerid, Dano[playerid], damage); | |
83 | ||
84 | PlayerTextDrawShow(playerid, Dano[playerid]); | |
85 | ||
86 | - | public OnPlayerPickUpPickup(playerid, pickupid) |
86 | + | if(TimerDanoTuga[playerid] != -1) |
87 | { | |
88 | TimerDanoTuga[playerid] = SetTimerEx("HideDano", 5000, false, "n", playerid); | |
89 | } | |
90 | return 1; | |
91 | - | public OnVehicleMod(playerid, vehicleid, componentid) |
91 | + | |
92 | ||
93 | public HideDamage(playerid) | |
94 | { | |
95 | PlayerTextDrawSetString(playerid, Damage[playerid], ""); | |
96 | - | public OnVehiclePaintjob(playerid, vehicleid, paintjobid) |
96 | + | TimerDamageTuga[playerid] = -1; |
97 | return 1; | |
98 | } | |
99 | public HideDano(playerid) | |
100 | { | |
101 | - | public OnVehicleRespray(playerid, vehicleid, color1, color2) |
101 | + | PlayerTextDrawSetString(playerid, Dano[playerid], ""); |
102 | TimerDanoTuga[playerid] = -1; | |
103 | return 1; | |
104 | } |