SHOW:
|
|
- or go back to the newest paste.
1 | /* | |
2 | - | Credits - Y_Less |
2 | + | Credits - Y_Less |
3 | - | ZeeX |
3 | + | ZeeX |
4 | - | Danyal |
4 | + | Danyal |
5 | ||
6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | |
7 | - | Weapon Shop By Danyal |
7 | + | Weapon Shop By Danyal |
8 | - | Please keep the credits to me |
8 | + | Please keep the credits to me |
9 | - | Enjoy WEAPON-SHOP System! |
9 | + | Enjoy WEAPON-SHOP System! |
10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | |
11 | ||
12 | ||
13 | -------------------------------------------------------------------------------- | |
14 | - | I Know You Will Change |
14 | + | I Know You Will Change |
15 | - | Please Do Not Remove Credits |
15 | + | Please Do Not Remove Credits |
16 | -------------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | - | #include <a_samp> |
19 | + | #include <a_samp> //[CREDITS: WHOLE SANANDREAS MULTIPLAYER TEAM] |
20 | - | #include <YSI\y_ini> |
20 | + | #include <YSI\y_ini> //[CREDITS: Y_LESS] |
21 | - | #include <zcmd> |
21 | + | #include <zcmd> //[CREDITS: ZEEX] |
22 | - | #include <lreps> |
22 | + | |
23 | #define PATH "WeaponShop/%s.ini" | |
24 | #define WEAPONSHOP 789 | |
25 | #define COLOR_RED 0xAA3333AA | |
26 | #define COLOR_GREEN 0x33AA33FF | |
27 | - | #define COLOR_RED 0xAA3333AA |
27 | + | #define COLOUR_WHITE 0xFFFFFFFF |
28 | - | #define COLOR_GREEN 0x33AA33FF |
28 | + | #define COLOUR_BLACK 0x000000FF |
29 | #define COLOUR_YELLOW 0xFFFF00AA | |
30 | #define COLOUR_LIGHTBLUE 0x33CCFFAA | |
31 | #define COLOUR_ORANGE 0xFF9900AA | |
32 | #define COLOUR_PINK 0xE100E1FF | |
33 | - | // Weapons |
33 | + | #define COLOUR_GREY 0xAFAFAFAA |
34 | #define COLOUR_BLUE 0x0088FFAA | |
35 | #define COLOUR_LIGHTGREEN 0x9ACD32AA | |
36 | ||
37 | //Player Weapon Info | |
38 | enum wInfo { | |
39 | ||
40 | // Weapons | |
41 | Weapon1, | |
42 | Weapon2, | |
43 | Weapon3, | |
44 | Weapon4, | |
45 | Weapon5, | |
46 | Weapon6, | |
47 | - | //Ammo |
47 | + | |
48 | Weapon8, | |
49 | Weapon9, | |
50 | Weapon10, | |
51 | Weapon11, | |
52 | Weapon12, | |
53 | ||
54 | //Ammo | |
55 | Ammo1, | |
56 | Ammo2, | |
57 | Ammo3, | |
58 | Ammo4, | |
59 | Ammo5, | |
60 | Ammo6, | |
61 | - | //Skills |
61 | + | |
62 | Ammo8, | |
63 | Ammo9, | |
64 | Ammo10, | |
65 | Ammo11, | |
66 | Ammo12, | |
67 | ||
68 | //Skills | |
69 | SKILL_PISTOL, | |
70 | SKILL_PISTOL_SILENCED, | |
71 | SKILL_DESERT_EAGLE, | |
72 | SKILL_SHOTGUN, | |
73 | SKILL_SAWNOFF_SHOTGUN, | |
74 | SKILL_SPAS12_SHOTGUN, | |
75 | SKILL_MICRO_UZI, | |
76 | SKILL_MP5, | |
77 | SKILL_AK47, | |
78 | - | print("\n--------------------------------------"); |
78 | + | |
79 | - | print(" WEAPONS-SHOP v3.0 Loaded by Danyal"); |
79 | + | |
80 | - | print("--------------------------------------\n"); |
80 | + | |
81 | - | return 1; |
81 | + | |
82 | ||
83 | new Killing_Spree[MAX_PLAYERS], Float:New_Health, Float:New_Armour; | |
84 | new Float:Health_Calculate, Float:Armour_Calulate; | |
85 | ||
86 | - | print("\n--------------------------------------"); |
86 | + | |
87 | - | print(" WEAPONS-SHOP v3.0 UnLoaded by Danyal"); |
87 | + | |
88 | - | print("--------------------------------------\n"); |
88 | + | print("\n--------------------------------------"); |
89 | - | return 1; |
89 | + | print(" WEAPONS-SHOP v4.0 Loaded by Danyal"); |
90 | print("--------------------------------------\n"); | |
91 | return 1; | |
92 | } | |
93 | ||
94 | - | if(!fexist(pWeaponSave(playerid))) |
94 | + | |
95 | - | { |
95 | + | |
96 | - | new INI:file = INI_Open(pWeaponSave(playerid)); |
96 | + | print("\n--------------------------------------"); |
97 | - | // Weapon Create |
97 | + | print(" WEAPONS-SHOP v4.0 UnLoaded by Danyal"); |
98 | - | INI_WriteInt(file, "Weapon1", 0); |
98 | + | print("--------------------------------------\n"); |
99 | - | INI_WriteInt(file, "Weapon2", 0); |
99 | + | |
100 | - | INI_WriteInt(file, "Weapon3", 0); |
100 | + | |
101 | - | INI_WriteInt(file, "Weapon4", 0); |
101 | + | |
102 | - | INI_WriteInt(file, "Weapon5", 0); |
102 | + | |
103 | - | INI_WriteInt(file, "Weapon6", 0); |
103 | + | |
104 | - | INI_WriteInt(file, "Weapon7", 0); |
104 | + | if(!fexist(pWeaponSave(playerid))) |
105 | - | INI_WriteInt(file, "Weapon8", 0); |
105 | + | |
106 | - | INI_WriteInt(file, "Weapon9", 0); |
106 | + | new INI:file = INI_Open(pWeaponSave(playerid)); |
107 | - | INI_WriteInt(file, "Weapon10", 0); |
107 | + | // Weapon Create |
108 | - | INI_WriteInt(file, "Weapon11", 0); |
108 | + | INI_WriteInt(file, "Weapon1", 0); |
109 | - | INI_WriteInt(file, "Weapon12", 0); |
109 | + | INI_WriteInt(file, "Weapon2", 0); |
110 | - | // Ammo Create |
110 | + | INI_WriteInt(file, "Weapon3", 0); |
111 | - | INI_WriteInt(file, "Ammo1", 0); |
111 | + | INI_WriteInt(file, "Weapon4", 0); |
112 | - | INI_WriteInt(file, "Ammo2", 0); |
112 | + | INI_WriteInt(file, "Weapon5", 0); |
113 | - | INI_WriteInt(file, "Ammo3", 0); |
113 | + | INI_WriteInt(file, "Weapon6", 0); |
114 | - | INI_WriteInt(file, "Ammo4", 0); |
114 | + | INI_WriteInt(file, "Weapon7", 0); |
115 | - | INI_WriteInt(file, "Ammo5", 0); |
115 | + | INI_WriteInt(file, "Weapon8", 0); |
116 | - | INI_WriteInt(file, "Ammo6", 0); |
116 | + | INI_WriteInt(file, "Weapon9", 0); |
117 | - | INI_WriteInt(file, "Ammo7", 0); |
117 | + | INI_WriteInt(file, "Weapon10", 0); |
118 | - | INI_WriteInt(file, "Ammo8", 0); |
118 | + | INI_WriteInt(file, "Weapon11", 0); |
119 | - | INI_WriteInt(file, "Ammo9", 0); |
119 | + | INI_WriteInt(file, "Weapon12", 0); |
120 | - | INI_WriteInt(file, "Ammo10", 0); |
120 | + | // Ammo Create |
121 | - | INI_WriteInt(file, "Ammo11", 0); |
121 | + | INI_WriteInt(file, "Ammo1", 0); |
122 | - | INI_WriteInt(file, "Ammo12", 0); |
122 | + | INI_WriteInt(file, "Ammo2", 0); |
123 | - | //Weapon Skill |
123 | + | INI_WriteInt(file, "Ammo3", 0); |
124 | - | INI_WriteInt(file, "SKILL_PISTOL", 1); |
124 | + | INI_WriteInt(file, "Ammo4", 0); |
125 | - | INI_WriteInt(file, "SKILL_PISTOL_SILENCED", 1); |
125 | + | INI_WriteInt(file, "Ammo5", 0); |
126 | - | INI_WriteInt(file, "SKILL_DESERT_EAGLE", 1); |
126 | + | INI_WriteInt(file, "Ammo6", 0); |
127 | - | INI_WriteInt(file, "SKILL_SHOTGUN", 1); |
127 | + | INI_WriteInt(file, "Ammo7", 0); |
128 | - | INI_WriteInt(file, "SKILL_SAWNOFF_SHOTGUN", 1); |
128 | + | INI_WriteInt(file, "Ammo8", 0); |
129 | - | INI_WriteInt(file, "SKILL_SPAS12_SHOTGUN", 1); |
129 | + | INI_WriteInt(file, "Ammo9", 0); |
130 | - | INI_WriteInt(file, "SKILL_MICRO_UZI", 1); |
130 | + | INI_WriteInt(file, "Ammo10", 0); |
131 | - | INI_WriteInt(file, "SKILL_MP5", 1); |
131 | + | INI_WriteInt(file, "Ammo11", 0); |
132 | - | INI_WriteInt(file, "SKILL_AK47", 1); |
132 | + | INI_WriteInt(file, "Ammo12", 0); |
133 | - | INI_WriteInt(file, "SKILL_M4", 1); |
133 | + | //Weapon Skill |
134 | - | INI_WriteInt(file, "SKILL_SNIPERRIFLE", 1); |
134 | + | INI_WriteInt(file, "SKILL_PISTOL", 1); |
135 | - | INI_Close(file); |
135 | + | INI_WriteInt(file, "SKILL_PISTOL_SILENCED", 1); |
136 | - | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); |
136 | + | INI_WriteInt(file, "SKILL_DESERT_EAGLE", 1); |
137 | - | } |
137 | + | INI_WriteInt(file, "SKILL_SHOTGUN", 1); |
138 | - | else if(fexist(pWeaponSave(playerid))) |
138 | + | INI_WriteInt(file, "SKILL_SAWNOFF_SHOTGUN", 1); |
139 | - | { |
139 | + | INI_WriteInt(file, "SKILL_SPAS12_SHOTGUN", 1); |
140 | - | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); |
140 | + | INI_WriteInt(file, "SKILL_MICRO_UZI", 1); |
141 | - | } |
141 | + | INI_WriteInt(file, "SKILL_MP5", 1); |
142 | - | return 1; |
142 | + | INI_WriteInt(file, "SKILL_AK47", 1); |
143 | INI_WriteInt(file, "SKILL_M4", 1); | |
144 | INI_WriteInt(file, "SKILL_SNIPERRIFLE", 1); | |
145 | INI_Close(file); | |
146 | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); | |
147 | - | SendClientMessage(playerid, -1, "This Server Uses Weapon Shop V3.0 By Danyal"); |
147 | + | |
148 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, WeaponInfo[playerid][SKILL_PISTOL]); |
148 | + | else if(fexist(pWeaponSave(playerid))) |
149 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); |
149 | + | |
150 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, WeaponInfo[playerid][SKILL_DESERT_EAGLE]); |
150 | + | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); |
151 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, WeaponInfo[playerid][SKILL_SHOTGUN]); |
151 | + | |
152 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); |
152 | + | |
153 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); |
153 | + | |
154 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, WeaponInfo[playerid][SKILL_MICRO_UZI]); |
154 | + | |
155 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, WeaponInfo[playerid][SKILL_MP5]); |
155 | + | |
156 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, WeaponInfo[playerid][SKILL_AK47]); |
156 | + | |
157 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, WeaponInfo[playerid][SKILL_M4]); |
157 | + | SendClientMessage(playerid, -1, "This Server Uses Weapon Shop V4.0 By Danyal"); |
158 | - | SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
158 | + | //______________________________________________________________________________ |
159 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon1], WeaponInfo[playerid][Ammo1]); |
159 | + | //*-*-*-*-*-*-*-*-*-*-*-*-* [PLAYER SKILL SETTING] *-*-*-*-*-*-*-*-*-*-*-*-* |
160 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon2], WeaponInfo[playerid][Ammo2]); |
160 | + | |
161 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon3], WeaponInfo[playerid][Ammo3]); |
161 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, WeaponInfo[playerid][SKILL_PISTOL]); |
162 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon4], WeaponInfo[playerid][Ammo4]); |
162 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); |
163 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon5], WeaponInfo[playerid][Ammo5]); |
163 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, WeaponInfo[playerid][SKILL_DESERT_EAGLE]); |
164 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon6], WeaponInfo[playerid][Ammo6]); |
164 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, WeaponInfo[playerid][SKILL_SHOTGUN]); |
165 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon7], WeaponInfo[playerid][Ammo7]); |
165 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); |
166 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon8], WeaponInfo[playerid][Ammo8]); |
166 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); |
167 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon9], WeaponInfo[playerid][Ammo9]); |
167 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, WeaponInfo[playerid][SKILL_MICRO_UZI]); |
168 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon10], WeaponInfo[playerid][Ammo10]); |
168 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, WeaponInfo[playerid][SKILL_MP5]); |
169 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon11], WeaponInfo[playerid][Ammo11]); |
169 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, WeaponInfo[playerid][SKILL_AK47]); |
170 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon12], WeaponInfo[playerid][Ammo12]); |
170 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, WeaponInfo[playerid][SKILL_M4]); |
171 | - | return 1; |
171 | + | SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
172 | //______________________________________________________________________________ | |
173 | //*-*-*-*-*-*-*-*-*- [GIVING OUT PLAYER ITS SAVED WEAPON] *-*-*-*-*-*-*-*-*- | |
174 | //------------------------------------------------------------------------------ | |
175 | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon1], WeaponInfo[playerid][Ammo1]); | |
176 | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon2], WeaponInfo[playerid][Ammo2]); | |
177 | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon3], WeaponInfo[playerid][Ammo3]); | |
178 | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon4], WeaponInfo[playerid][Ammo4]); | |
179 | - | case 22: WeaponInfo[killerid][SKILL_PISTOL]++; |
179 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon5], WeaponInfo[playerid][Ammo5]); |
180 | - | case 23: WeaponInfo[killerid][SKILL_PISTOL_SILENCED]++; |
180 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon6], WeaponInfo[playerid][Ammo6]); |
181 | - | case 24: WeaponInfo[killerid][SKILL_DESERT_EAGLE]++; |
181 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon7], WeaponInfo[playerid][Ammo7]); |
182 | - | case 25: WeaponInfo[killerid][SKILL_SHOTGUN]++; |
182 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon8], WeaponInfo[playerid][Ammo8]); |
183 | - | case 26: WeaponInfo[killerid][SKILL_SAWNOFF_SHOTGUN]++; |
183 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon9], WeaponInfo[playerid][Ammo9]); |
184 | - | case 27: WeaponInfo[killerid][SKILL_SPAS12_SHOTGUN]++; |
184 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon10], WeaponInfo[playerid][Ammo10]); |
185 | - | case 28: WeaponInfo[killerid][SKILL_MICRO_UZI]++; |
185 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon11], WeaponInfo[playerid][Ammo11]); |
186 | - | case 29: WeaponInfo[killerid][SKILL_MP5]++; |
186 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon12], WeaponInfo[playerid][Ammo12]); |
187 | - | case 30: WeaponInfo[killerid][SKILL_AK47]++; |
187 | + | |
188 | - | case 31: WeaponInfo[killerid][SKILL_M4]++; |
188 | + | |
189 | - | case 34: WeaponInfo[killerid][SKILL_SNIPERRIFLE]++; |
189 | + | |
190 | public OnPlayerDeath(playerid, killerid, reason) | |
191 | { | |
192 | //______________________________________________________________________________ | |
193 | //*-*-*-*-*-*-*-*-*-*- [KILLLER WEAPON SKILL INCREASING] *-*-*-*-*-*-*-*-*-* | |
194 | //*-*-*-*-*-*-*-*-*-*-* [PLAYER WEAPON SKILL DECREASING] *-*-*-*-*-*-*-*-*-*- | |
195 | //------------------------------------------------------------------------------ | |
196 | new Weapon = GetPlayerWeapon(killerid); | |
197 | switch(Weapon) | |
198 | { | |
199 | case 22: | |
200 | { | |
201 | WeaponInfo[killerid][SKILL_PISTOL]+=2; | |
202 | WeaponInfo[playerid][SKILL_PISTOL]--; | |
203 | } | |
204 | case 23: | |
205 | { | |
206 | WeaponInfo[killerid][SKILL_PISTOL_SILENCED]+=2; | |
207 | WeaponInfo[playerid][SKILL_PISTOL_SILENCED]--; | |
208 | } | |
209 | - | if(fexist(pWeaponSave(playerid))) |
209 | + | case 24: |
210 | - | { |
210 | + | { |
211 | - | new INI:file = INI_Open(pWeaponSave(playerid)); |
211 | + | WeaponInfo[killerid][SKILL_DESERT_EAGLE]+=2; |
212 | - | // Weapon Save |
212 | + | WeaponInfo[playerid][SKILL_DESERT_EAGLE]--; |
213 | - | INI_WriteInt(file, "Weapon1", WeaponInfo[playerid][Weapon1]); |
213 | + | } |
214 | - | INI_WriteInt(file, "Weapon2", WeaponInfo[playerid][Weapon2]); |
214 | + | case 25: |
215 | - | INI_WriteInt(file, "Weapon3", WeaponInfo[playerid][Weapon3]); |
215 | + | { |
216 | - | INI_WriteInt(file, "Weapon4", WeaponInfo[playerid][Weapon4]); |
216 | + | WeaponInfo[killerid][SKILL_SHOTGUN]+=2; |
217 | - | INI_WriteInt(file, "Weapon5", WeaponInfo[playerid][Weapon5]); |
217 | + | WeaponInfo[playerid][SKILL_SHOTGUN]--; |
218 | - | INI_WriteInt(file, "Weapon6", WeaponInfo[playerid][Weapon6]); |
218 | + | } |
219 | - | INI_WriteInt(file, "Weapon7", WeaponInfo[playerid][Weapon7]); |
219 | + | case 26: |
220 | - | INI_WriteInt(file, "Weapon8", WeaponInfo[playerid][Weapon8]); |
220 | + | { |
221 | - | INI_WriteInt(file, "Weapon9", WeaponInfo[playerid][Weapon9]); |
221 | + | WeaponInfo[killerid][SKILL_SAWNOFF_SHOTGUN]+=2; |
222 | - | INI_WriteInt(file, "Weapon10", WeaponInfo[playerid][Weapon10]); |
222 | + | WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]--; |
223 | - | INI_WriteInt(file, "Weapon11", WeaponInfo[playerid][Weapon11]); |
223 | + | } |
224 | - | INI_WriteInt(file, "Weapon12", WeaponInfo[playerid][Weapon12]); |
224 | + | case 27: |
225 | - | // Ammo Save |
225 | + | { |
226 | - | INI_WriteInt(file, "Ammo1", WeaponInfo[playerid][Ammo1]); |
226 | + | WeaponInfo[killerid][SKILL_SPAS12_SHOTGUN]+=2; |
227 | - | INI_WriteInt(file, "Ammo2", WeaponInfo[playerid][Ammo2]); |
227 | + | WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]--; |
228 | - | INI_WriteInt(file, "Ammo3", WeaponInfo[playerid][Ammo3]); |
228 | + | } |
229 | - | INI_WriteInt(file, "Ammo4", WeaponInfo[playerid][Ammo4]); |
229 | + | case 28: |
230 | - | INI_WriteInt(file, "Ammo5", WeaponInfo[playerid][Ammo5]); |
230 | + | { |
231 | - | INI_WriteInt(file, "Ammo6", WeaponInfo[playerid][Ammo6]); |
231 | + | WeaponInfo[killerid][SKILL_MICRO_UZI]+=2; |
232 | - | INI_WriteInt(file, "Ammo7", WeaponInfo[playerid][Ammo7]); |
232 | + | WeaponInfo[playerid][SKILL_MICRO_UZI]--; |
233 | - | INI_WriteInt(file, "Ammo8", WeaponInfo[playerid][Ammo8]); |
233 | + | } |
234 | - | INI_WriteInt(file, "Ammo9", WeaponInfo[playerid][Ammo9]); |
234 | + | case 29: |
235 | - | INI_WriteInt(file, "Ammo10", WeaponInfo[playerid][Ammo10]); |
235 | + | { |
236 | - | INI_WriteInt(file, "Ammo11", WeaponInfo[playerid][Ammo11]); |
236 | + | WeaponInfo[killerid][SKILL_MP5]+=2; |
237 | - | INI_WriteInt(file, "Ammo12", WeaponInfo[playerid][Ammo12]); |
237 | + | WeaponInfo[playerid][SKILL_MP5]--; |
238 | - | // Skill Save |
238 | + | } |
239 | - | INI_WriteInt(file, "SKILL_PISTOL", WeaponInfo[playerid][SKILL_PISTOL]); |
239 | + | case 30: |
240 | - | INI_WriteInt(file, "SKILL_PISTOL_SILENCED", WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); |
240 | + | { |
241 | - | INI_WriteInt(file, "SKILL_DESERT_EAGLE", WeaponInfo[playerid][SKILL_DESERT_EAGLE]); |
241 | + | WeaponInfo[killerid][SKILL_AK47]+=2; |
242 | - | INI_WriteInt(file, "SKILL_SHOTGUN", WeaponInfo[playerid][SKILL_SHOTGUN]); |
242 | + | WeaponInfo[playerid][SKILL_AK47]--; |
243 | - | INI_WriteInt(file, "SKILL_SAWNOFF_SHOTGUN", WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); |
243 | + | } |
244 | - | INI_WriteInt(file, "SKILL_SPAS12_SHOTGUN", WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); |
244 | + | case 31: |
245 | - | INI_WriteInt(file, "SKILL_MICRO_UZI", WeaponInfo[playerid][SKILL_MICRO_UZI]); |
245 | + | { |
246 | - | INI_WriteInt(file, "SKILL_MP5", WeaponInfo[playerid][SKILL_MP5]); |
246 | + | WeaponInfo[killerid][SKILL_M4]+=2; |
247 | - | INI_WriteInt(file, "SKILL_AK47", WeaponInfo[playerid][SKILL_AK47]); |
247 | + | WeaponInfo[playerid][SKILL_M4]--; |
248 | - | INI_WriteInt(file, "SKILL_M4", WeaponInfo[playerid][SKILL_M4]); |
248 | + | } |
249 | - | INI_WriteInt(file, "SKILL_SNIPERRIFLE", WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
249 | + | case 34: |
250 | { | |
251 | - | INI_Close(file); |
251 | + | WeaponInfo[killerid][SKILL_SNIPERRIFLE]+=2; |
252 | WeaponInfo[playerid][SKILL_SNIPERRIFLE]--; | |
253 | } | |
254 | } | |
255 | //______________________________________________________________________________ | |
256 | //*-*-*-*-*-*-*-*-*-*-*-*-*- [REWARDS FOR KILLER] *-*-*-*-*-*-*-*-*-*-*-*-** | |
257 | //------------------------------------------------------------------------------ | |
258 | new Player_Name[24], string[128]; | |
259 | GetPlayerName(killerid, Player_Name, sizeof(Player_Name)); | |
260 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{9FE4AA}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
260 | + | Killing_Spree[playerid] = 0; |
261 | Killing_Spree[killerid]++; | |
262 | switch(Killing_Spree[killerid]) | |
263 | { | |
264 | case 1: | |
265 | { | |
266 | format(string,sizeof(string), "~r~%s ~w~First Kill", Player_Name); | |
267 | - | if(IsPlayerConnected(playerid)) |
267 | + | GameTextForAll(string, 3000,6); |
268 | GetPlayerHealth(killerid, New_Health); | |
269 | - | new showskillz[476]; |
269 | + | if(New_Health < 80) |
270 | - | new pName[MAX_PLAYER_NAME]; |
270 | + | { |
271 | SetPlayerHealth(killerid, New_Health + 20); | |
272 | - | format (showskillz, sizeof(showskillz), "{FFFFFF}Player {FF0000}%s{FFFFFF} Stats \n",pName ); |
272 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned +20 Health. As A Reward!"); |
273 | } | |
274 | else | |
275 | { | |
276 | Health_Calculate = 100 - New_Health; | |
277 | SetPlayerHealth(killerid, New_Health + Health_Calculate); | |
278 | format(string, sizeof(string), "You Have Earned +%d Health. As A Reward!", Health_Calculate); | |
279 | SendClientMessage(killerid,COLOUR_BLUE, string); | |
280 | } | |
281 | Health_Calculate = 0; New_Health = 0.0; | |
282 | } | |
283 | case 2: | |
284 | - | switch(dialogid) |
284 | + | { |
285 | - | { |
285 | + | format(string,sizeof(string), "~r~%s ~w~Double Kill", Player_Name); |
286 | - | case WEAPONSHOP: |
286 | + | GameTextForAll(string, 3000,6); |
287 | - | { |
287 | + | GivePlayerWeapon(killerid,24,100); |
288 | - | if(response) |
288 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Deagle With 100 Bullets. As A Reward!"); |
289 | - | { |
289 | + | } |
290 | - | switch(listitem) |
290 | + | case 3: |
291 | - | { |
291 | + | { |
292 | - | case 0: ShowPlayerDialog(playerid, WEAPONSHOP+1, DIALOG_STYLE_LIST, "Pistols", "9mm\t\t\t$200\nSilenced 9mm\t\t$600\nDesert Eagle\t\t$1200", "Select", "Cancel"); |
292 | + | format(string,sizeof(string), "~r~%s ~w~Tripple Kill", Player_Name); |
293 | - | case 1: ShowPlayerDialog(playerid, WEAPONSHOP+2, DIALOG_STYLE_LIST, "Sub-Machine Gun", "Tec9\t\t\t$300\nMicro SMG\t\t$500", "Select", "Cancel"); |
293 | + | GameTextForAll(string, 3000,6); |
294 | - | case 2: ShowPlayerDialog(playerid, WEAPONSHOP+3, DIALOG_STYLE_LIST, "Shotguns", "Shotgun\t\t\t$600\nSawnoff Shotgun\t\t$800\nCombat Shotgun\t\t$1000", "Select", "Cancel"); |
294 | + | GetPlayerArmour(killerid, New_Armour); |
295 | - | case 3: ShowPlayerDialog(playerid, WEAPONSHOP+4, DIALOG_STYLE_LIST, "Armours", "Armour\t\t\t$200", "Select", "Cancel"); |
295 | + | if(New_Armour < 80) |
296 | - | case 4: ShowPlayerDialog(playerid, WEAPONSHOP+5, DIALOG_STYLE_LIST, "SMG", "MP5\t\t\t$2000", "Select", "Cancel"); |
296 | + | { |
297 | - | case 5: ShowPlayerDialog(playerid, WEAPONSHOP+6, DIALOG_STYLE_LIST, "Assault", "AK47\t\t$3500\nM4\t\t$4500", "Select", "Cancel"); |
297 | + | SetPlayerArmour(killerid, New_Armour + 20); |
298 | - | } |
298 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned +20 Armour. As A Reward!"); |
299 | - | return 1; |
299 | + | } |
300 | - | } |
300 | + | else |
301 | - | return 1; |
301 | + | { |
302 | - | } |
302 | + | Armour_Calulate = 100 - New_Armour; |
303 | SetPlayerArmour(killerid, New_Armour + Armour_Calulate); | |
304 | - | case WEAPONSHOP+1: |
304 | + | format(string, sizeof(string), "You Have Earned +%d Armour. As A Reward!", Health_Calculate); |
305 | - | { |
305 | + | SendClientMessage(killerid,COLOUR_BLUE, string); |
306 | - | if(response) |
306 | + | } |
307 | - | { |
307 | + | Armour_Calulate = 0; New_Armour = 0.0; |
308 | - | switch(listitem) |
308 | + | } |
309 | - | { |
309 | + | case 4: |
310 | - | case 0: |
310 | + | { |
311 | - | { |
311 | + | format(string,sizeof(string), "~r~%s ~w~Over Kill", Player_Name); |
312 | - | if(GetPlayerMoney(playerid) <200) |
312 | + | GameTextForAll(string, 3000,6); |
313 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
313 | + | GivePlayerWeapon(killerid,28,500); |
314 | - | GivePlayerMoney(playerid, -200); |
314 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Micro SMG With 500 Bullets. As A Reward!"); |
315 | - | GivePlayerWeapon(playerid,22,30); |
315 | + | } |
316 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a 9mm! ($200)"); |
316 | + | case 5: |
317 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
317 | + | { |
318 | - | } |
318 | + | format(string,sizeof(string), "~r~%s ~w~Rampage", Player_Name); |
319 | GameTextForAll(string, 3000,6); | |
320 | - | case 1: |
320 | + | GivePlayerMoney(killerid, 25000); |
321 | - | { |
321 | + | GivePlayerWeapon(killerid,30,50); |
322 | - | if(GetPlayerMoney(playerid) <600) |
322 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A AK47 With 50 Bullets and 25k Money. As A Reward!"); |
323 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
323 | + | } |
324 | - | GivePlayerMoney(playerid, -600); |
324 | + | case 6: |
325 | - | GivePlayerWeapon(playerid,23,30); |
325 | + | { |
326 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Silenced 9mm! ($600)"); |
326 | + | format(string,sizeof(string), "~r~%s ~w~Killtacular", Player_Name); |
327 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
327 | + | GameTextForAll(string, 3000,6); |
328 | - | } |
328 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Been Given Random Gift. As A Reward!"); |
329 | new chooseone = random(6); | |
330 | - | case 2: |
330 | + | switch(chooseone) |
331 | - | { |
331 | + | { |
332 | - | if(GetPlayerMoney(playerid) <1200) |
332 | + | case 0: |
333 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
333 | + | { |
334 | - | GivePlayerMoney(playerid, -1200); |
334 | + | GetPlayerHealth(killerid, New_Health); |
335 | - | GivePlayerWeapon(playerid,24,30); |
335 | + | Health_Calculate = 100 - New_Health; |
336 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Desert Eagle! ($1200)"); |
336 | + | SetPlayerHealth(killerid, New_Health + Health_Calculate); |
337 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
337 | + | format(string, sizeof(string), "You Have Earned +%d Health. As A Reward!", Health_Calculate); |
338 | - | } |
338 | + | SendClientMessage(killerid,COLOUR_BLUE, string); |
339 | - | } |
339 | + | Health_Calculate = 0; New_Health = 0.0; |
340 | - | return 1; |
340 | + | } |
341 | - | } |
341 | + | |
342 | - | return 1; |
342 | + | case 1: |
343 | - | } |
343 | + | { |
344 | GivePlayerWeapon(killerid,24,250); | |
345 | - | case WEAPONSHOP+2: |
345 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Deagle With 250 Bullets. As A Reward!"); |
346 | - | { |
346 | + | } |
347 | - | if(response) |
347 | + | |
348 | - | { |
348 | + | case 2: |
349 | - | switch(listitem) |
349 | + | { |
350 | - | { |
350 | + | GetPlayerArmour(killerid, New_Armour); |
351 | - | case 0: |
351 | + | Armour_Calulate = 100 - New_Armour; |
352 | - | { |
352 | + | SetPlayerArmour(killerid, New_Armour + Armour_Calulate); |
353 | - | if(GetPlayerMoney(playerid) <300) |
353 | + | format(string, sizeof(string), "You Have Earned +%d Armour. As A Reward!", Health_Calculate); |
354 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
354 | + | SendClientMessage(killerid,COLOUR_BLUE, string); |
355 | - | GivePlayerMoney(playerid, -300); |
355 | + | Armour_Calulate = 0; New_Armour = 0.0; |
356 | - | GivePlayerWeapon(playerid,32,30); |
356 | + | } |
357 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Tec9! ($300)"); |
357 | + | |
358 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
358 | + | case 3: |
359 | - | } |
359 | + | { |
360 | GivePlayerWeapon(killerid,28,800); | |
361 | - | case 1: |
361 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Micro SMG With 800 Bullets. As A Reward!"); |
362 | - | { |
362 | + | } |
363 | - | if(GetPlayerMoney(playerid) <500) |
363 | + | |
364 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
364 | + | case 4: |
365 | - | GivePlayerMoney(playerid, -500); |
365 | + | { |
366 | - | GivePlayerWeapon(playerid,28,30); |
366 | + | GivePlayerMoney(killerid, 30000); |
367 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Micro SMG! ($500)"); |
367 | + | GivePlayerWeapon(killerid,30,150); |
368 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
368 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A AK47 With 150 Bullets and 30k Money. As A Reward!"); |
369 | - | } |
369 | + | } |
370 | - | } |
370 | + | |
371 | - | return 1; |
371 | + | case 5: |
372 | - | } |
372 | + | { |
373 | - | return 1; |
373 | + | SendClientMessage(killerid,COLOR_RED,"Ooops, Bad Luck!!! You Haven't Got Anything."); |
374 | - | } |
374 | + | } |
375 | } | |
376 | - | case WEAPONSHOP+3: |
376 | + | } |
377 | - | { |
377 | + | case 7: |
378 | - | if(response) |
378 | + | { |
379 | - | { |
379 | + | format(string,sizeof(string), "~r~%s ~w~Monster Kill", Player_Name); |
380 | - | switch(listitem) |
380 | + | GameTextForAll(string, 3000,6); |
381 | - | { |
381 | + | GetPlayerHealth(killerid, New_Health); |
382 | - | case 0: |
382 | + | if(New_Health < 50) |
383 | - | { |
383 | + | { |
384 | - | if(GetPlayerMoney(playerid) <600) |
384 | + | SetPlayerHealth(killerid, New_Health + 20); |
385 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
385 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned +50 Health. As A Reward!"); |
386 | - | GivePlayerMoney(playerid, -600); |
386 | + | } |
387 | - | GivePlayerWeapon(playerid,25,15); |
387 | + | else |
388 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Shotgun! ($600)"); |
388 | + | { |
389 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
389 | + | Health_Calculate = 100 - New_Health; |
390 | - | } |
390 | + | SetPlayerHealth(killerid, New_Health + Health_Calculate); |
391 | format(string, sizeof(string), "You Have Earned +%d Health. As A Reward!", Health_Calculate); | |
392 | - | case 1: |
392 | + | SendClientMessage(killerid,COLOUR_BLUE, string); |
393 | - | { |
393 | + | } |
394 | - | if(GetPlayerMoney(playerid) <800) |
394 | + | Health_Calculate = 0; New_Health = 0.0; |
395 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
395 | + | } |
396 | - | GivePlayerMoney(playerid, -800); |
396 | + | case 8: |
397 | - | GivePlayerWeapon(playerid,26,15); |
397 | + | { |
398 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Sawnoff Shotgun (800$)"); |
398 | + | format(string,sizeof(string), "~r~%s ~w~Killimanjaro", Player_Name); |
399 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
399 | + | GameTextForAll(string, 3000,6); |
400 | - | } |
400 | + | GivePlayerWeapon(killerid,24,200); |
401 | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Deagle With 200 Bullets. As A Reward!"); | |
402 | - | case 2: |
402 | + | } |
403 | - | { |
403 | + | case 9: |
404 | - | if(GetPlayerMoney(playerid) <1000) |
404 | + | { |
405 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
405 | + | format(string,sizeof(string), "~r~%s ~w~Ludicrous Kill", Player_Name); |
406 | - | GivePlayerMoney(playerid, -1000); |
406 | + | GameTextForAll(string, 3000,6); |
407 | - | GivePlayerWeapon(playerid,27,15); |
407 | + | GetPlayerArmour(killerid, New_Armour); |
408 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Combat Shotgun (1000$)"); |
408 | + | if(New_Armour < 50) |
409 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
409 | + | { |
410 | - | } |
410 | + | SetPlayerArmour(killerid, New_Armour + 20); |
411 | - | } |
411 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned +50 Armour. As A Reward!"); |
412 | - | return 1; |
412 | + | } |
413 | - | } |
413 | + | else |
414 | - | return 1; |
414 | + | { |
415 | - | } |
415 | + | Armour_Calulate = 100 - New_Armour; |
416 | SetPlayerArmour(killerid, New_Armour + Armour_Calulate); | |
417 | - | case WEAPONSHOP+4: |
417 | + | format(string, sizeof(string), "You Have Earned +%d Armour. As A Reward!", Health_Calculate); |
418 | - | { |
418 | + | SendClientMessage(killerid,COLOUR_BLUE, string); |
419 | - | if(response) |
419 | + | } |
420 | - | { |
420 | + | Armour_Calulate = 0; New_Armour = 0.0; |
421 | - | switch(listitem) |
421 | + | } |
422 | - | { |
422 | + | case 10: |
423 | - | case 0: |
423 | + | { |
424 | - | { |
424 | + | format(string,sizeof(string), "~r~%s ~w~Killionaire", Player_Name); |
425 | - | if(GetPlayerMoney(playerid) <200) |
425 | + | GameTextForAll(string, 3000,6); |
426 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
426 | + | GivePlayerWeapon(killerid,28,1000); |
427 | - | GivePlayerMoney(playerid, -200); |
427 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Micro SMG With 1000 Bullets. As A Reward!"); |
428 | - | SetPlayerArmour(playerid, 100); |
428 | + | } |
429 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Armour! ($200)"); |
429 | + | case 11: |
430 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
430 | + | { |
431 | - | } |
431 | + | format(string,sizeof(string), "~r~%s ~w~Unstoppable", Player_Name); |
432 | - | } |
432 | + | GameTextForAll(string, 3000,6); |
433 | - | return 1; |
433 | + | SetPlayerSpecialAction(killerid, SPECIAL_ACTION_USEJETPACK); |
434 | - | } |
434 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Jetpack. As A Reward!"); |
435 | - | return 1; |
435 | + | } |
436 | - | } |
436 | + | case 12: |
437 | { | |
438 | - | case WEAPONSHOP+5: |
438 | + | format(string,sizeof(string), "~r~%s ~w~Invincible", Player_Name); |
439 | - | { |
439 | + | GameTextForAll(string, 3000,6); |
440 | - | if(response) |
440 | + | GivePlayerMoney(killerid, 50000); |
441 | - | { |
441 | + | GivePlayerWeapon(killerid,31,100); |
442 | - | switch(listitem) |
442 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A M4 With 100 Bullets and 50k Money. As A Reward!"); |
443 | - | { |
443 | + | } |
444 | - | case 0: |
444 | + | case 13: |
445 | - | { |
445 | + | { |
446 | - | if(GetPlayerMoney(playerid) <2000) |
446 | + | format(string,sizeof(string), "~r~%s ~w~Inconceivable", Player_Name); |
447 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
447 | + | GameTextForAll(string, 3000,6); |
448 | - | GivePlayerMoney(playerid, -2000); |
448 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Been Given Random Gift. As A Reward!"); |
449 | - | GivePlayerWeapon(playerid,29,30); |
449 | + | new chooseone = random(6); |
450 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a MP5 (2000$)"); |
450 | + | switch(chooseone) |
451 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
451 | + | { |
452 | - | } |
452 | + | case 0: |
453 | - | } |
453 | + | { |
454 | - | return 1; |
454 | + | GetPlayerHealth(killerid, New_Health); |
455 | - | } |
455 | + | Health_Calculate = 100 - New_Health; |
456 | - | return 1; |
456 | + | SetPlayerHealth(killerid, New_Health + Health_Calculate); |
457 | - | } |
457 | + | format(string, sizeof(string), "You Have Earned +%d Health. As A Reward!", Health_Calculate); |
458 | SendClientMessage(killerid,COLOUR_BLUE, string); | |
459 | - | case WEAPONSHOP+6: |
459 | + | Health_Calculate = 0; New_Health = 0.0; |
460 | - | { |
460 | + | } |
461 | - | if(response) |
461 | + | |
462 | - | { |
462 | + | case 1: |
463 | - | switch(listitem) |
463 | + | { |
464 | - | { |
464 | + | GivePlayerWeapon(killerid,35,10); |
465 | - | case 0: |
465 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A RPG With 10 Missiles. As A Reward!"); |
466 | - | { |
466 | + | } |
467 | - | if(GetPlayerMoney(playerid) <3500) |
467 | + | |
468 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
468 | + | case 2: |
469 | - | GivePlayerMoney(playerid, -3500); |
469 | + | { |
470 | - | GivePlayerWeapon(playerid,30,120); |
470 | + | GetPlayerArmour(killerid, New_Armour); |
471 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a AK47 (3500$)"); |
471 | + | Armour_Calulate = 100 - New_Armour; |
472 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
472 | + | SetPlayerArmour(killerid, New_Armour + Armour_Calulate); |
473 | - | } |
473 | + | format(string, sizeof(string), "You Have Earned +%d Armour. As A Reward!", Health_Calculate); |
474 | SendClientMessage(killerid,COLOUR_BLUE, string); | |
475 | - | case 1: |
475 | + | Armour_Calulate = 0; New_Armour = 0.0; |
476 | - | { |
476 | + | } |
477 | - | if(GetPlayerMoney(playerid) <4500) |
477 | + | |
478 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
478 | + | case 3: |
479 | - | GivePlayerMoney(playerid, -4500); |
479 | + | { |
480 | - | GivePlayerWeapon(playerid,31,120); |
480 | + | GivePlayerWeapon(killerid,38,100); |
481 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a M4 (4500$)"); |
481 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Minigun With 100 Bullets. As A Reward!"); |
482 | - | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); |
482 | + | } |
483 | - | } |
483 | + | |
484 | - | } |
484 | + | case 4: |
485 | - | return 1; |
485 | + | { |
486 | - | } |
486 | + | GivePlayerMoney(killerid, 60000); |
487 | - | return 1; |
487 | + | GivePlayerWeapon(killerid,34,25); |
488 | - | } |
488 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned A Sniper With 25 Bullets and 60k Money. As A Reward!"); |
489 | - | } |
489 | + | } |
490 | - | return 1; |
490 | + | |
491 | case 5: | |
492 | { | |
493 | SendClientMessage(killerid,COLOR_RED,"Ooops, Bad Luck!!! You Haven't Got Anything."); | |
494 | } | |
495 | } | |
496 | } | |
497 | - | // Load Weapons |
497 | + | case 14: |
498 | - | INI_Int("Weapon1", WeaponInfo[playerid][Weapon1]); |
498 | + | { |
499 | - | INI_Int("Weapon2", WeaponInfo[playerid][Weapon2]); |
499 | + | format(string,sizeof(string), "~r~%s ~w~Unfrigginbelievable", Player_Name); |
500 | - | INI_Int("Weapon3", WeaponInfo[playerid][Weapon3]); |
500 | + | GameTextForAll(string, 3000,6); |
501 | - | INI_Int("Weapon4", WeaponInfo[playerid][Weapon4]); |
501 | + | GivePlayerWeapon(killerid,37,150); |
502 | - | INI_Int("Weapon5", WeaponInfo[playerid][Weapon5]); |
502 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned Flamethrower. As A Reward!"); |
503 | - | INI_Int("Weapon6", WeaponInfo[playerid][Weapon6]); |
503 | + | } |
504 | - | INI_Int("Weapon7", WeaponInfo[playerid][Weapon7]); |
504 | + | case 15: |
505 | - | INI_Int("Weapon8", WeaponInfo[playerid][Weapon8]); |
505 | + | { |
506 | - | INI_Int("Weapon9", WeaponInfo[playerid][Weapon9]); |
506 | + | format(string,sizeof(string), "~r~%s ~w~Extermination", Player_Name); |
507 | - | INI_Int("Weapon10", WeaponInfo[playerid][Weapon10]); |
507 | + | GameTextForAll(string, 3000,6); |
508 | - | INI_Int("Weapon11", WeaponInfo[playerid][Weapon11]); |
508 | + | GivePlayerWeapon(killerid,38,1000); |
509 | - | INI_Int("Weapon12", WeaponInfo[playerid][Weapon12]); |
509 | + | SendClientMessage(killerid,COLOUR_BLUE,"You Have Earned Minigun. As A Reward!"); |
510 | } | |
511 | - | // Load Ammo |
511 | + | |
512 | - | INI_Int("Ammo1", WeaponInfo[playerid][Ammo1]); |
512 | + | |
513 | - | INI_Int("Ammo2", WeaponInfo[playerid][Ammo2]); |
513 | + | |
514 | - | INI_Int("Ammo3", WeaponInfo[playerid][Ammo3]); |
514 | + | |
515 | - | INI_Int("Ammo4", WeaponInfo[playerid][Ammo4]); |
515 | + | |
516 | - | INI_Int("Ammo5", WeaponInfo[playerid][Ammo5]); |
516 | + | |
517 | - | INI_Int("Ammo6", WeaponInfo[playerid][Ammo6]); |
517 | + | |
518 | - | INI_Int("Ammo7", WeaponInfo[playerid][Ammo7]); |
518 | + | |
519 | - | INI_Int("Ammo8", WeaponInfo[playerid][Ammo8]); |
519 | + | |
520 | - | INI_Int("Ammo9", WeaponInfo[playerid][Ammo9]); |
520 | + | |
521 | - | INI_Int("Ammo10", WeaponInfo[playerid][Ammo10]); |
521 | + | |
522 | - | INI_Int("Ammo11", WeaponInfo[playerid][Ammo11]); |
522 | + | |
523 | - | INI_Int("Ammo12", WeaponInfo[playerid][Ammo12]); |
523 | + | |
524 | GetPlayerWeaponData(playerid, 8, WeaponInfo[playerid][Weapon8], WeaponInfo[playerid][Ammo8]); | |
525 | - | // Load Skills |
525 | + | |
526 | - | INI_Int("SKILL_PISTOL", WeaponInfo[playerid][SKILL_PISTOL]); |
526 | + | |
527 | - | INI_Int("SKILL_PISTOL_SILENCED", WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); |
527 | + | |
528 | - | INI_Int("SKILL_DESERT_EAGLE", WeaponInfo[playerid][SKILL_DESERT_EAGLE]); |
528 | + | |
529 | - | INI_Int("SKILL_SHOTGUN", WeaponInfo[playerid][SKILL_SHOTGUN]); |
529 | + | |
530 | - | INI_Int("SKILL_SAWNOFF_SHOTGUN", WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); |
530 | + | if(fexist(pWeaponSave(playerid))) |
531 | - | INI_Int("SKILL_SPAS12_SHOTGUN", WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); |
531 | + | |
532 | - | INI_Int("SKILL_MICRO_UZI", WeaponInfo[playerid][SKILL_MICRO_UZI]); |
532 | + | new INI:file = INI_Open(pWeaponSave(playerid)); |
533 | - | INI_Int("SKILL_MP5", WeaponInfo[playerid][SKILL_MP5]); |
533 | + | //Weapon Save |
534 | - | INI_Int("SKILL_AK47", WeaponInfo[playerid][SKILL_AK47]); |
534 | + | INI_WriteInt(file, "Weapon1", WeaponInfo[playerid][Weapon1]); |
535 | - | INI_Int("SKILL_M4", WeaponInfo[playerid][SKILL_M4]); |
535 | + | INI_WriteInt(file, "Weapon2", WeaponInfo[playerid][Weapon2]); |
536 | - | INI_Int("SKILL_SNIPERRIFLE", WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
536 | + | INI_WriteInt(file, "Weapon3", WeaponInfo[playerid][Weapon3]); |
537 | INI_WriteInt(file, "Weapon4", WeaponInfo[playerid][Weapon4]); | |
538 | - | // |
538 | + | INI_WriteInt(file, "Weapon5", WeaponInfo[playerid][Weapon5]); |
539 | - | return 1; |
539 | + | INI_WriteInt(file, "Weapon6", WeaponInfo[playerid][Weapon6]); |
540 | INI_WriteInt(file, "Weapon7", WeaponInfo[playerid][Weapon7]); | |
541 | INI_WriteInt(file, "Weapon8", WeaponInfo[playerid][Weapon8]); | |
542 | INI_WriteInt(file, "Weapon9", WeaponInfo[playerid][Weapon9]); | |
543 | INI_WriteInt(file, "Weapon10", WeaponInfo[playerid][Weapon10]); | |
544 | INI_WriteInt(file, "Weapon11", WeaponInfo[playerid][Weapon11]); | |
545 | - | new string[50]; |
545 | + | INI_WriteInt(file, "Weapon12", WeaponInfo[playerid][Weapon12]); |
546 | - | format(string, sizeof(string), PATH, GetName(playerid)); |
546 | + | //Ammo Save |
547 | - | return string; |
547 | + | INI_WriteInt(file, "Ammo1", WeaponInfo[playerid][Ammo1]); |
548 | INI_WriteInt(file, "Ammo2", WeaponInfo[playerid][Ammo2]); | |
549 | INI_WriteInt(file, "Ammo3", WeaponInfo[playerid][Ammo3]); | |
550 | INI_WriteInt(file, "Ammo4", WeaponInfo[playerid][Ammo4]); | |
551 | INI_WriteInt(file, "Ammo5", WeaponInfo[playerid][Ammo5]); | |
552 | - | new name[24]; |
552 | + | INI_WriteInt(file, "Ammo6", WeaponInfo[playerid][Ammo6]); |
553 | - | GetPlayerName(playerid, name, sizeof(name)); |
553 | + | INI_WriteInt(file, "Ammo7", WeaponInfo[playerid][Ammo7]); |
554 | - | return name; |
554 | + | INI_WriteInt(file, "Ammo8", WeaponInfo[playerid][Ammo8]); |
555 | INI_WriteInt(file, "Ammo9", WeaponInfo[playerid][Ammo9]); | |
556 | INI_WriteInt(file, "Ammo10", WeaponInfo[playerid][Ammo10]); | |
557 | INI_WriteInt(file, "Ammo11", WeaponInfo[playerid][Ammo11]); | |
558 | INI_WriteInt(file, "Ammo12", WeaponInfo[playerid][Ammo12]); | |
559 | //Skill Save | |
560 | INI_WriteInt(file, "SKILL_PISTOL", WeaponInfo[playerid][SKILL_PISTOL]); | |
561 | INI_WriteInt(file, "SKILL_PISTOL_SILENCED", WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); | |
562 | INI_WriteInt(file, "SKILL_DESERT_EAGLE", WeaponInfo[playerid][SKILL_DESERT_EAGLE]); | |
563 | INI_WriteInt(file, "SKILL_SHOTGUN", WeaponInfo[playerid][SKILL_SHOTGUN]); | |
564 | INI_WriteInt(file, "SKILL_SAWNOFF_SHOTGUN", WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); | |
565 | INI_WriteInt(file, "SKILL_SPAS12_SHOTGUN", WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); | |
566 | INI_WriteInt(file, "SKILL_MICRO_UZI", WeaponInfo[playerid][SKILL_MICRO_UZI]); | |
567 | INI_WriteInt(file, "SKILL_MP5", WeaponInfo[playerid][SKILL_MP5]); | |
568 | INI_WriteInt(file, "SKILL_AK47", WeaponInfo[playerid][SKILL_AK47]); | |
569 | INI_WriteInt(file, "SKILL_M4", WeaponInfo[playerid][SKILL_M4]); | |
570 | INI_WriteInt(file, "SKILL_SNIPERRIFLE", WeaponInfo[playerid][SKILL_SNIPERRIFLE]); | |
571 | ||
572 | INI_Close(file); | |
573 | } | |
574 | return 1; | |
575 | } | |
576 | ||
577 | CMD:shopweaps(playerid, params[]) | |
578 | { | |
579 | if(IsPlayerConnected(playerid)) | |
580 | { | |
581 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{9FE4AA}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
582 | } | |
583 | return 1; | |
584 | } | |
585 | ||
586 | CMD:showskills(playerid, params[]) | |
587 | { | |
588 | if(IsPlayerConnected(playerid)) | |
589 | { | |
590 | new showskillz[476]; | |
591 | new pName[MAX_PLAYER_NAME]; | |
592 | GetPlayerName(playerid, pName, sizeof(pName)); | |
593 | format (showskillz, sizeof(showskillz), "{FFFFFF}Player {FF0000}%s{FFFFFF} Stats \n",pName ); | |
594 | format (showskillz, sizeof(showskillz), "{FFFFFF}Pistol:{FF0000}%i , {FFFFFF}Silenced Pistol:{FF0000}%i , {FFFFFF}Desert:{FF0000}%i \n", WeaponInfo[playerid][SKILL_PISTOL] , WeaponInfo[playerid][SKILL_PISTOL_SILENCED], WeaponInfo[playerid][SKILL_DESERT_EAGLE]); | |
595 | format (showskillz, sizeof(showskillz), "{FFFFFF}Shotgun:{FF0000}%i , {FFFFFF}SawnOff ShotGun:{FF0000}%i , {FFFFFF}Spas12 Shotgun:{FF0000}%i \n", WeaponInfo[playerid][SKILL_SHOTGUN], WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN], WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); | |
596 | format (showskillz, sizeof(showskillz), "{FFFFFF}Uzi:{FF0000}%i , {FFFFFF}MP5:{FF0000}%i , {FFFFFF}AK47:{FF0000}%i \n", WeaponInfo[playerid][SKILL_MICRO_UZI], WeaponInfo[playerid][SKILL_MP5], WeaponInfo[playerid][SKILL_AK47]); | |
597 | format (showskillz, sizeof(showskillz), "{FFFFFF}M4:{FF0000}%i , {FFFFFF}Sniper Rifle:{FF0000}%i.",WeaponInfo[playerid][SKILL_M4], WeaponInfo[playerid][SKILL_SNIPERRIFLE]); | |
598 | SendClientMessage(playerid, -1, showskillz); | |
599 | } | |
600 | return 1; | |
601 | } | |
602 | ||
603 | public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) | |
604 | { | |
605 | switch(dialogid) | |
606 | { | |
607 | case WEAPONSHOP: | |
608 | { | |
609 | if(response) | |
610 | { | |
611 | switch(listitem) | |
612 | { | |
613 | case 0: ShowPlayerDialog(playerid, WEAPONSHOP+1, DIALOG_STYLE_LIST, "Pistols", "9mm\t\t\t$200\nSilenced 9mm\t\t$600\nDesert Eagle\t\t$1200", "Select", "Cancel"); | |
614 | case 1: ShowPlayerDialog(playerid, WEAPONSHOP+2, DIALOG_STYLE_LIST, "Sub-Machine Gun", "Tec9\t\t\t$300\nMicro SMG\t\t$500", "Select", "Cancel"); | |
615 | case 2: ShowPlayerDialog(playerid, WEAPONSHOP+3, DIALOG_STYLE_LIST, "Shotguns", "Shotgun\t\t\t$600\nSawnoff Shotgun\t\t$800\nCombat Shotgun\t\t$1000", "Select", "Cancel"); | |
616 | case 3: ShowPlayerDialog(playerid, WEAPONSHOP+4, DIALOG_STYLE_LIST, "Armours", "Armour\t\t\t$200", "Select", "Cancel"); | |
617 | case 4: ShowPlayerDialog(playerid, WEAPONSHOP+5, DIALOG_STYLE_LIST, "SMG", "MP5\t\t\t$2000", "Select", "Cancel"); | |
618 | case 5: ShowPlayerDialog(playerid, WEAPONSHOP+6, DIALOG_STYLE_LIST, "Assault", "AK47\t\t$3500\nM4\t\t$4500", "Select", "Cancel"); | |
619 | } | |
620 | return 1; | |
621 | } | |
622 | return 1; | |
623 | } | |
624 | ||
625 | case WEAPONSHOP+1: | |
626 | { | |
627 | if(response) | |
628 | { | |
629 | switch(listitem) | |
630 | { | |
631 | case 0: | |
632 | { | |
633 | if(GetPlayerMoney(playerid) <200) | |
634 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
635 | GivePlayerMoney(playerid, -200); | |
636 | GivePlayerWeapon(playerid,22,30); | |
637 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a 9mm! ($200)"); | |
638 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
639 | } | |
640 | ||
641 | case 1: | |
642 | { | |
643 | if(GetPlayerMoney(playerid) <600) | |
644 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
645 | GivePlayerMoney(playerid, -600); | |
646 | GivePlayerWeapon(playerid,23,30); | |
647 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Silenced 9mm! ($600)"); | |
648 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
649 | } | |
650 | ||
651 | case 2: | |
652 | { | |
653 | if(GetPlayerMoney(playerid) <1200) | |
654 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
655 | GivePlayerMoney(playerid, -1200); | |
656 | GivePlayerWeapon(playerid,24,30); | |
657 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Desert Eagle! ($1200)"); | |
658 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
659 | } | |
660 | } | |
661 | return 1; | |
662 | } | |
663 | return 1; | |
664 | } | |
665 | ||
666 | case WEAPONSHOP+2: | |
667 | { | |
668 | if(response) | |
669 | { | |
670 | switch(listitem) | |
671 | { | |
672 | case 0: | |
673 | { | |
674 | if(GetPlayerMoney(playerid) <300) | |
675 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
676 | GivePlayerMoney(playerid, -300); | |
677 | GivePlayerWeapon(playerid,32,30); | |
678 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Tec9! ($300)"); | |
679 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
680 | } | |
681 | ||
682 | case 1: | |
683 | { | |
684 | if(GetPlayerMoney(playerid) <500) | |
685 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
686 | GivePlayerMoney(playerid, -500); | |
687 | GivePlayerWeapon(playerid,28,30); | |
688 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Micro SMG! ($500)"); | |
689 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
690 | } | |
691 | } | |
692 | return 1; | |
693 | } | |
694 | return 1; | |
695 | } | |
696 | ||
697 | case WEAPONSHOP+3: | |
698 | { | |
699 | if(response) | |
700 | { | |
701 | switch(listitem) | |
702 | { | |
703 | case 0: | |
704 | { | |
705 | if(GetPlayerMoney(playerid) <600) | |
706 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
707 | GivePlayerMoney(playerid, -600); | |
708 | GivePlayerWeapon(playerid,25,15); | |
709 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Shotgun! ($600)"); | |
710 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
711 | } | |
712 | ||
713 | case 1: | |
714 | { | |
715 | if(GetPlayerMoney(playerid) <800) | |
716 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
717 | GivePlayerMoney(playerid, -800); | |
718 | GivePlayerWeapon(playerid,26,15); | |
719 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Sawnoff Shotgun (800$)"); | |
720 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
721 | } | |
722 | ||
723 | case 2: | |
724 | { | |
725 | if(GetPlayerMoney(playerid) <1000) | |
726 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
727 | GivePlayerMoney(playerid, -1000); | |
728 | GivePlayerWeapon(playerid,27,15); | |
729 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Combat Shotgun (1000$)"); | |
730 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
731 | } | |
732 | } | |
733 | return 1; | |
734 | } | |
735 | return 1; | |
736 | } | |
737 | ||
738 | case WEAPONSHOP+4: | |
739 | { | |
740 | if(response) | |
741 | { | |
742 | switch(listitem) | |
743 | { | |
744 | case 0: | |
745 | { | |
746 | if(GetPlayerMoney(playerid) <200) | |
747 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
748 | GivePlayerMoney(playerid, -200); | |
749 | SetPlayerArmour(playerid, 100); | |
750 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Armour! ($200)"); | |
751 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
752 | } | |
753 | } | |
754 | return 1; | |
755 | } | |
756 | return 1; | |
757 | } | |
758 | ||
759 | case WEAPONSHOP+5: | |
760 | { | |
761 | if(response) | |
762 | { | |
763 | switch(listitem) | |
764 | { | |
765 | case 0: | |
766 | { | |
767 | if(GetPlayerMoney(playerid) <2000) | |
768 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
769 | GivePlayerMoney(playerid, -2000); | |
770 | GivePlayerWeapon(playerid,29,30); | |
771 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a MP5 (2000$)"); | |
772 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
773 | } | |
774 | } | |
775 | return 1; | |
776 | } | |
777 | return 1; | |
778 | } | |
779 | ||
780 | case WEAPONSHOP+6: | |
781 | { | |
782 | if(response) | |
783 | { | |
784 | switch(listitem) | |
785 | { | |
786 | case 0: | |
787 | { | |
788 | if(GetPlayerMoney(playerid) <3500) | |
789 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
790 | GivePlayerMoney(playerid, -3500); | |
791 | GivePlayerWeapon(playerid,30,120); | |
792 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a AK47 (3500$)"); | |
793 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
794 | } | |
795 | ||
796 | case 1: | |
797 | { | |
798 | if(GetPlayerMoney(playerid) <4500) | |
799 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
800 | GivePlayerMoney(playerid, -4500); | |
801 | GivePlayerWeapon(playerid,31,120); | |
802 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a M4 (4500$)"); | |
803 | ShowPlayerDialog(playerid, WEAPONSHOP, DIALOG_STYLE_LIST, "AmmuNation", "{F9B857}Pistols\n{F9B857}Sub-Machine Gun\n{FAFA52}Shotguns\n{C77D87}Armours\n{B8FF02}SMG\n{F300FF}Assault", "Select", "Cancel"); | |
804 | } | |
805 | } | |
806 | return 1; | |
807 | } | |
808 | return 1; | |
809 | } | |
810 | } | |
811 | return 1; | |
812 | } | |
813 | ||
814 | //Loaduser Public | |
815 | forward LoadUser_data(playerid, name[], value[]); | |
816 | public LoadUser_data(playerid, name[], value[]) | |
817 | { | |
818 | // Load Weapons | |
819 | INI_Int("Weapon1", WeaponInfo[playerid][Weapon1]); | |
820 | INI_Int("Weapon2", WeaponInfo[playerid][Weapon2]); | |
821 | INI_Int("Weapon3", WeaponInfo[playerid][Weapon3]); | |
822 | INI_Int("Weapon4", WeaponInfo[playerid][Weapon4]); | |
823 | INI_Int("Weapon5", WeaponInfo[playerid][Weapon5]); | |
824 | INI_Int("Weapon6", WeaponInfo[playerid][Weapon6]); | |
825 | INI_Int("Weapon7", WeaponInfo[playerid][Weapon7]); | |
826 | INI_Int("Weapon8", WeaponInfo[playerid][Weapon8]); | |
827 | INI_Int("Weapon9", WeaponInfo[playerid][Weapon9]); | |
828 | INI_Int("Weapon10", WeaponInfo[playerid][Weapon10]); | |
829 | INI_Int("Weapon11", WeaponInfo[playerid][Weapon11]); | |
830 | INI_Int("Weapon12", WeaponInfo[playerid][Weapon12]); | |
831 | ||
832 | // Load Ammo | |
833 | INI_Int("Ammo1", WeaponInfo[playerid][Ammo1]); | |
834 | INI_Int("Ammo2", WeaponInfo[playerid][Ammo2]); | |
835 | INI_Int("Ammo3", WeaponInfo[playerid][Ammo3]); | |
836 | INI_Int("Ammo4", WeaponInfo[playerid][Ammo4]); | |
837 | INI_Int("Ammo5", WeaponInfo[playerid][Ammo5]); | |
838 | INI_Int("Ammo6", WeaponInfo[playerid][Ammo6]); | |
839 | INI_Int("Ammo7", WeaponInfo[playerid][Ammo7]); | |
840 | INI_Int("Ammo8", WeaponInfo[playerid][Ammo8]); | |
841 | INI_Int("Ammo9", WeaponInfo[playerid][Ammo9]); | |
842 | INI_Int("Ammo10", WeaponInfo[playerid][Ammo10]); | |
843 | INI_Int("Ammo11", WeaponInfo[playerid][Ammo11]); | |
844 | INI_Int("Ammo12", WeaponInfo[playerid][Ammo12]); | |
845 | ||
846 | // Load Skills | |
847 | INI_Int("SKILL_PISTOL", WeaponInfo[playerid][SKILL_PISTOL]); | |
848 | INI_Int("SKILL_PISTOL_SILENCED", WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); | |
849 | INI_Int("SKILL_DESERT_EAGLE", WeaponInfo[playerid][SKILL_DESERT_EAGLE]); | |
850 | INI_Int("SKILL_SHOTGUN", WeaponInfo[playerid][SKILL_SHOTGUN]); | |
851 | INI_Int("SKILL_SAWNOFF_SHOTGUN", WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); | |
852 | INI_Int("SKILL_SPAS12_SHOTGUN", WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); | |
853 | INI_Int("SKILL_MICRO_UZI", WeaponInfo[playerid][SKILL_MICRO_UZI]); | |
854 | INI_Int("SKILL_MP5", WeaponInfo[playerid][SKILL_MP5]); | |
855 | INI_Int("SKILL_AK47", WeaponInfo[playerid][SKILL_AK47]); | |
856 | INI_Int("SKILL_M4", WeaponInfo[playerid][SKILL_M4]); | |
857 | INI_Int("SKILL_SNIPERRIFLE", WeaponInfo[playerid][SKILL_SNIPERRIFLE]); | |
858 | return 1; | |
859 | } | |
860 | ||
861 | //Stocks | |
862 | stock pWeaponSave(playerid) | |
863 | { | |
864 | new string[50]; | |
865 | format(string, sizeof(string), PATH, GetName(playerid)); | |
866 | return string; | |
867 | } | |
868 | ||
869 | stock GetName(playerid) | |
870 | { | |
871 | new name[24]; | |
872 | GetPlayerName(playerid, name, sizeof(name)); | |
873 | return name; | |
874 | } | |
875 | ||
876 | //------------------------------------------------------------------------------ | |
877 | //============================I Know You Will Change============================ | |
878 | //=========================Please Do Not Remove Credits========================= | |
879 | //------------------------------------------------------------------------------ |