SHOW:
|
|
- or go back to the newest paste.
1 | /* | |
2 | Credits - Y_Less | |
3 | ZeeX | |
4 | Danyal | |
5 | ||
6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | |
7 | Weapon Shop By Danyal | |
8 | - | || Weapon Shop By Danyal || |
8 | + | Please keep the credits to me |
9 | - | || Please keep the credits to me || |
9 | + | Enjoy WEAPON-SHOP System! |
10 | - | || Enjoy WEAPON-SHOP System! || |
10 | + | |
11 | ||
12 | ||
13 | -------------------------------------------------------------------------------- | |
14 | I Know You Will Change | |
15 | Please Do Not Remove Credits | |
16 | -------------------------------------------------------------------------------- | |
17 | */ | |
18 | ||
19 | #include <a_samp> | |
20 | #include <YSI\y_ini> | |
21 | #include <zcmd> | |
22 | ||
23 | //Defines | |
24 | #define PATH "WeaponShop/%s.ini" | |
25 | #define WEAPONSHOP 789 | |
26 | #define COLOR_RED 0xAA3333AA | |
27 | #define COLOR_GREEN 0x33AA33FF | |
28 | ||
29 | //Player Weapon Info | |
30 | enum wInfo { | |
31 | - | Weapon1, |
31 | + | |
32 | - | Weapon2, |
32 | + | // Weapons |
33 | - | Weapon3, |
33 | + | Weapon1, |
34 | - | Weapon4, |
34 | + | Weapon2, |
35 | - | Weapon5, |
35 | + | Weapon3, |
36 | - | Weapon6, |
36 | + | Weapon4, |
37 | - | Weapon7, |
37 | + | Weapon5, |
38 | - | Weapon8, |
38 | + | Weapon6, |
39 | - | Weapon9, |
39 | + | Weapon7, |
40 | - | Weapon10, |
40 | + | Weapon8, |
41 | - | Weapon11, |
41 | + | Weapon9, |
42 | - | Weapon12, |
42 | + | Weapon10, |
43 | - | Ammo1, |
43 | + | Weapon11, |
44 | - | Ammo2, |
44 | + | Weapon12, |
45 | - | Ammo3, |
45 | + | |
46 | - | Ammo4, |
46 | + | //Ammo |
47 | - | Ammo5, |
47 | + | Ammo1, |
48 | - | Ammo6, |
48 | + | Ammo2, |
49 | - | Ammo7, |
49 | + | Ammo3, |
50 | - | Ammo8, |
50 | + | Ammo4, |
51 | - | Ammo9, |
51 | + | Ammo5, |
52 | - | Ammo10, |
52 | + | Ammo6, |
53 | - | Ammo11, |
53 | + | Ammo7, |
54 | - | Ammo12 |
54 | + | Ammo8, |
55 | Ammo9, | |
56 | Ammo10, | |
57 | Ammo11, | |
58 | Ammo12, | |
59 | ||
60 | - | print("\n--------------------------------------"); |
60 | + | //Skills |
61 | - | print(" WEAPONS-SHOP v1.0 Loaded by Danyal"); |
61 | + | SKILL_PISTOL, |
62 | - | print("--------------------------------------\n"); |
62 | + | SKILL_PISTOL_SILENCED, |
63 | SKILL_DESERT_EAGLE, | |
64 | SKILL_SHOTGUN, | |
65 | SKILL_SAWNOFF_SHOTGUN, | |
66 | SKILL_SPAS12_SHOTGUN, | |
67 | SKILL_MICRO_UZI, | |
68 | - | print("\n--------------------------------------"); |
68 | + | SKILL_MP5, |
69 | - | print(" WEAPONS-SHOP v1.0 UnLoaded by Danyal"); |
69 | + | SKILL_AK47, |
70 | - | print("--------------------------------------\n"); |
70 | + | SKILL_M4, |
71 | SKILL_SNIPERRIFLE | |
72 | } | |
73 | new WeaponInfo[MAX_PLAYERS][wInfo]; | |
74 | ||
75 | public OnFilterScriptInit() | |
76 | - | if(!fexist(pWeaponSave(playerid))) |
76 | + | |
77 | print("\n--------------------------------------"); | |
78 | - | new INI:file = INI_Open(pWeaponSave(playerid)); |
78 | + | print(" WEAPONS-SHOP v3.0 Loaded by Danyal"); |
79 | - | // Weapon Create |
79 | + | print("--------------------------------------\n"); |
80 | - | INI_WriteInt(file, "Weapon1", 0); |
80 | + | return 1; |
81 | - | INI_WriteInt(file, "Weapon2", 0); |
81 | + | |
82 | - | INI_WriteInt(file, "Weapon3", 0); |
82 | + | |
83 | - | INI_WriteInt(file, "Weapon4", 0); |
83 | + | |
84 | - | INI_WriteInt(file, "Weapon5", 0); |
84 | + | |
85 | - | INI_WriteInt(file, "Weapon6", 0); |
85 | + | print("\n--------------------------------------"); |
86 | - | INI_WriteInt(file, "Weapon7", 0); |
86 | + | print(" WEAPONS-SHOP v3.0 UnLoaded by Danyal"); |
87 | - | INI_WriteInt(file, "Weapon8", 0); |
87 | + | print("--------------------------------------\n"); |
88 | - | INI_WriteInt(file, "Weapon9", 0); |
88 | + | return 1; |
89 | - | INI_WriteInt(file, "Weapon10", 0); |
89 | + | |
90 | - | INI_WriteInt(file, "Weapon11", 0); |
90 | + | |
91 | - | INI_WriteInt(file, "Weapon12", 0); |
91 | + | |
92 | - | // Ammp Create |
92 | + | |
93 | - | INI_WriteInt(file, "Ammo1", 0); |
93 | + | if(!fexist(pWeaponSave(playerid))) |
94 | - | INI_WriteInt(file, "Ammo2", 0); |
94 | + | { |
95 | - | INI_WriteInt(file, "Ammo3", 0); |
95 | + | new INI:file = INI_Open(pWeaponSave(playerid)); |
96 | - | INI_WriteInt(file, "Ammo4", 0); |
96 | + | // Weapon Create |
97 | - | INI_WriteInt(file, "Ammo5", 0); |
97 | + | INI_WriteInt(file, "Weapon1", 0); |
98 | - | INI_WriteInt(file, "Ammo6", 0); |
98 | + | INI_WriteInt(file, "Weapon2", 0); |
99 | - | INI_WriteInt(file, "Ammo7", 0); |
99 | + | INI_WriteInt(file, "Weapon3", 0); |
100 | - | INI_WriteInt(file, "Ammo8", 0); |
100 | + | INI_WriteInt(file, "Weapon4", 0); |
101 | - | INI_WriteInt(file, "Ammo9", 0); |
101 | + | INI_WriteInt(file, "Weapon5", 0); |
102 | - | INI_WriteInt(file, "Ammo10", 0); |
102 | + | INI_WriteInt(file, "Weapon6", 0); |
103 | - | INI_WriteInt(file, "Ammo11", 0); |
103 | + | INI_WriteInt(file, "Weapon7", 0); |
104 | - | INI_WriteInt(file, "Ammo12", 0); |
104 | + | INI_WriteInt(file, "Weapon8", 0); |
105 | INI_WriteInt(file, "Weapon9", 0); | |
106 | - | INI_Close(file); |
106 | + | INI_WriteInt(file, "Weapon10", 0); |
107 | - | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); |
107 | + | INI_WriteInt(file, "Weapon11", 0); |
108 | INI_WriteInt(file, "Weapon12", 0); | |
109 | - | else if(fexist(pWeaponSave(playerid))) |
109 | + | // Ammo Create |
110 | INI_WriteInt(file, "Ammo1", 0); | |
111 | - | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); |
111 | + | INI_WriteInt(file, "Ammo2", 0); |
112 | INI_WriteInt(file, "Ammo3", 0); | |
113 | INI_WriteInt(file, "Ammo4", 0); | |
114 | INI_WriteInt(file, "Ammo5", 0); | |
115 | INI_WriteInt(file, "Ammo6", 0); | |
116 | INI_WriteInt(file, "Ammo7", 0); | |
117 | INI_WriteInt(file, "Ammo8", 0); | |
118 | - | SendClientMessage(playerid, -1, "This Server Uses Weapon Shop V1.0 By Danyal"); |
118 | + | INI_WriteInt(file, "Ammo9", 0); |
119 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon1], WeaponInfo[playerid][Ammo1]); |
119 | + | INI_WriteInt(file, "Ammo10", 0); |
120 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon2], WeaponInfo[playerid][Ammo2]); |
120 | + | INI_WriteInt(file, "Ammo11", 0); |
121 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon3], WeaponInfo[playerid][Ammo3]); |
121 | + | INI_WriteInt(file, "Ammo12", 0); |
122 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon4], WeaponInfo[playerid][Ammo4]); |
122 | + | //Weapon Skill |
123 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon5], WeaponInfo[playerid][Ammo5]); |
123 | + | INI_WriteInt(file, "SKILL_PISTOL", 1); |
124 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon6], WeaponInfo[playerid][Ammo6]); |
124 | + | INI_WriteInt(file, "SKILL_PISTOL_SILENCED", 1); |
125 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon7], WeaponInfo[playerid][Ammo7]); |
125 | + | INI_WriteInt(file, "SKILL_DESERT_EAGLE", 1); |
126 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon8], WeaponInfo[playerid][Ammo8]); |
126 | + | INI_WriteInt(file, "SKILL_SHOTGUN", 1); |
127 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon9], WeaponInfo[playerid][Ammo9]); |
127 | + | INI_WriteInt(file, "SKILL_SAWNOFF_SHOTGUN", 1); |
128 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon10], WeaponInfo[playerid][Ammo10]); |
128 | + | INI_WriteInt(file, "SKILL_SPAS12_SHOTGUN", 1); |
129 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon11], WeaponInfo[playerid][Ammo11]); |
129 | + | INI_WriteInt(file, "SKILL_MICRO_UZI", 1); |
130 | - | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon12], WeaponInfo[playerid][Ammo12]); |
130 | + | INI_WriteInt(file, "SKILL_MP5", 1); |
131 | INI_WriteInt(file, "SKILL_AK47", 1); | |
132 | INI_WriteInt(file, "SKILL_M4", 1); | |
133 | INI_WriteInt(file, "SKILL_SNIPERRIFLE", 1); | |
134 | INI_Close(file); | |
135 | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); | |
136 | } | |
137 | else if(fexist(pWeaponSave(playerid))) | |
138 | { | |
139 | INI_ParseFile(pWeaponSave(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); | |
140 | } | |
141 | return 1; | |
142 | } | |
143 | ||
144 | public OnPlayerSpawn(playerid) | |
145 | { | |
146 | SendClientMessage(playerid, -1, "This Server Uses Weapon Shop V3.0 By Danyal"); | |
147 | SetPlayerSkillLevel(playerid, SKILL_PISTOL, WeaponInfo[playerid][SKILL_PISTOL]); | |
148 | SetPlayerSkillLevel(playerid, SKILL_PISTOL_SILENCED, WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); | |
149 | SetPlayerSkillLevel(playerid, SKILL_DESERT_EAGLE, WeaponInfo[playerid][SKILL_DESERT_EAGLE]); | |
150 | SetPlayerSkillLevel(playerid, SKILL_SHOTGUN, WeaponInfo[playerid][SKILL_SHOTGUN]); | |
151 | - | new INI:file = INI_Open(pWeaponSave(playerid)); |
151 | + | SetPlayerSkillLevel(playerid, SKILL_SAWNOFF_SHOTGUN, WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); |
152 | - | // Weapon Save |
152 | + | SetPlayerSkillLevel(playerid, SKILL_SPAS12_SHOTGUN, WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); |
153 | - | INI_WriteInt(file, "Weapon1", WeaponInfo[playerid][Weapon1]); |
153 | + | SetPlayerSkillLevel(playerid, SKILL_MICRO_UZI, WeaponInfo[playerid][SKILL_MICRO_UZI]); |
154 | - | INI_WriteInt(file, "Weapon2", WeaponInfo[playerid][Weapon2]); |
154 | + | SetPlayerSkillLevel(playerid, SKILL_MP5, WeaponInfo[playerid][SKILL_MP5]); |
155 | - | INI_WriteInt(file, "Weapon3", WeaponInfo[playerid][Weapon3]); |
155 | + | SetPlayerSkillLevel(playerid, SKILL_AK47, WeaponInfo[playerid][SKILL_AK47]); |
156 | - | INI_WriteInt(file, "Weapon4", WeaponInfo[playerid][Weapon4]); |
156 | + | SetPlayerSkillLevel(playerid, SKILL_M4, WeaponInfo[playerid][SKILL_M4]); |
157 | - | INI_WriteInt(file, "Weapon5", WeaponInfo[playerid][Weapon5]); |
157 | + | SetPlayerSkillLevel(playerid, SKILL_SNIPERRIFLE, WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
158 | - | INI_WriteInt(file, "Weapon6", WeaponInfo[playerid][Weapon6]); |
158 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon1], WeaponInfo[playerid][Ammo1]); |
159 | - | INI_WriteInt(file, "Weapon7", WeaponInfo[playerid][Weapon7]); |
159 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon2], WeaponInfo[playerid][Ammo2]); |
160 | - | INI_WriteInt(file, "Weapon8", WeaponInfo[playerid][Weapon8]); |
160 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon3], WeaponInfo[playerid][Ammo3]); |
161 | - | INI_WriteInt(file, "Weapon9", WeaponInfo[playerid][Weapon9]); |
161 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon4], WeaponInfo[playerid][Ammo4]); |
162 | - | INI_WriteInt(file, "Weapon10", WeaponInfo[playerid][Weapon10]); |
162 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon5], WeaponInfo[playerid][Ammo5]); |
163 | - | INI_WriteInt(file, "Weapon11", WeaponInfo[playerid][Weapon11]); |
163 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon6], WeaponInfo[playerid][Ammo6]); |
164 | - | INI_WriteInt(file, "Weapon12", WeaponInfo[playerid][Weapon12]); |
164 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon7], WeaponInfo[playerid][Ammo7]); |
165 | - | // Ammo Save |
165 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon8], WeaponInfo[playerid][Ammo8]); |
166 | - | INI_WriteInt(file, "Ammo1", WeaponInfo[playerid][Ammo1]); |
166 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon9], WeaponInfo[playerid][Ammo9]); |
167 | - | INI_WriteInt(file, "Ammo2", WeaponInfo[playerid][Ammo2]); |
167 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon10], WeaponInfo[playerid][Ammo10]); |
168 | - | INI_WriteInt(file, "Ammo3", WeaponInfo[playerid][Ammo3]); |
168 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon11], WeaponInfo[playerid][Ammo11]); |
169 | - | INI_WriteInt(file, "Ammo4", WeaponInfo[playerid][Ammo4]); |
169 | + | GivePlayerWeapon(playerid, WeaponInfo[playerid][Weapon12], WeaponInfo[playerid][Ammo12]); |
170 | - | INI_WriteInt(file, "Ammo5", WeaponInfo[playerid][Ammo5]); |
170 | + | return 1; |
171 | - | INI_WriteInt(file, "Ammo6", WeaponInfo[playerid][Ammo6]); |
171 | + | |
172 | - | INI_WriteInt(file, "Ammo7", WeaponInfo[playerid][Ammo7]); |
172 | + | |
173 | - | INI_WriteInt(file, "Ammo8", WeaponInfo[playerid][Ammo8]); |
173 | + | public OnPlayerDeath(playerid, killerid, reason) |
174 | - | INI_WriteInt(file, "Ammo9", WeaponInfo[playerid][Ammo9]); |
174 | + | |
175 | - | INI_WriteInt(file, "Ammo10", WeaponInfo[playerid][Ammo10]); |
175 | + | new Weapon = GetPlayerWeapon(killerid); |
176 | - | INI_WriteInt(file, "Ammo11", WeaponInfo[playerid][Ammo11]); |
176 | + | switch(Weapon) |
177 | - | INI_WriteInt(file, "Ammo12", WeaponInfo[playerid][Ammo12]); |
177 | + | |
178 | - | INI_Close(file); |
178 | + | case 22: WeaponInfo[killerid][SKILL_PISTOL]++; |
179 | case 23: WeaponInfo[killerid][SKILL_PISTOL_SILENCED]++; | |
180 | case 24: WeaponInfo[killerid][SKILL_DESERT_EAGLE]++; | |
181 | case 25: WeaponInfo[killerid][SKILL_SHOTGUN]++; | |
182 | case 26: WeaponInfo[killerid][SKILL_SAWNOFF_SHOTGUN]++; | |
183 | case 27: WeaponInfo[killerid][SKILL_SPAS12_SHOTGUN]++; | |
184 | case 28: WeaponInfo[killerid][SKILL_MICRO_UZI]++; | |
185 | - | 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"); |
185 | + | case 29: WeaponInfo[killerid][SKILL_MP5]++; |
186 | case 30: WeaponInfo[killerid][SKILL_AK47]++; | |
187 | case 31: WeaponInfo[killerid][SKILL_M4]++; | |
188 | case 34: WeaponInfo[killerid][SKILL_SNIPERRIFLE]++; | |
189 | } | |
190 | return 1; | |
191 | - | switch(dialogid) |
191 | + | |
192 | ||
193 | - | case WEAPONSHOP: |
193 | + | |
194 | - | { |
194 | + | |
195 | - | if(response) |
195 | + | |
196 | - | { |
196 | + | |
197 | - | switch(listitem) |
197 | + | |
198 | - | { |
198 | + | |
199 | - | 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"); |
199 | + | |
200 | - | case 1: ShowPlayerDialog(playerid, WEAPONSHOP+2, DIALOG_STYLE_LIST, "Sub-Machine Gun", "Tec9\t\t\t$300\nMicro SMG\t\t$500", "Select", "Cancel"); |
200 | + | |
201 | - | 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"); |
201 | + | |
202 | - | case 3: ShowPlayerDialog(playerid, WEAPONSHOP+4, DIALOG_STYLE_LIST, "Armours", "Armour\t\t\t$200", "Select", "Cancel"); |
202 | + | |
203 | - | case 4: ShowPlayerDialog(playerid, WEAPONSHOP+5, DIALOG_STYLE_LIST, "SMG", "MP5\t\t\t$2000", "Select", "Cancel"); |
203 | + | |
204 | - | case 5: ShowPlayerDialog(playerid, WEAPONSHOP+6, DIALOG_STYLE_LIST, "Assault", "AK47\t\t$3500\nM4\t\t$4500", "Select", "Cancel"); |
204 | + | |
205 | - | } |
205 | + | |
206 | - | return 1; |
206 | + | |
207 | - | } |
207 | + | |
208 | - | return 1; |
208 | + | |
209 | - | } |
209 | + | |
210 | new INI:file = INI_Open(pWeaponSave(playerid)); | |
211 | - | case WEAPONSHOP+1: |
211 | + | // Weapon Save |
212 | - | { |
212 | + | INI_WriteInt(file, "Weapon1", WeaponInfo[playerid][Weapon1]); |
213 | - | if(response) |
213 | + | INI_WriteInt(file, "Weapon2", WeaponInfo[playerid][Weapon2]); |
214 | - | { |
214 | + | INI_WriteInt(file, "Weapon3", WeaponInfo[playerid][Weapon3]); |
215 | - | switch(listitem) |
215 | + | INI_WriteInt(file, "Weapon4", WeaponInfo[playerid][Weapon4]); |
216 | - | { |
216 | + | INI_WriteInt(file, "Weapon5", WeaponInfo[playerid][Weapon5]); |
217 | - | case 0: |
217 | + | INI_WriteInt(file, "Weapon6", WeaponInfo[playerid][Weapon6]); |
218 | - | { |
218 | + | INI_WriteInt(file, "Weapon7", WeaponInfo[playerid][Weapon7]); |
219 | - | if(GetPlayerMoney(playerid) <200) |
219 | + | INI_WriteInt(file, "Weapon8", WeaponInfo[playerid][Weapon8]); |
220 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
220 | + | INI_WriteInt(file, "Weapon9", WeaponInfo[playerid][Weapon9]); |
221 | - | GivePlayerMoney(playerid, -200); |
221 | + | INI_WriteInt(file, "Weapon10", WeaponInfo[playerid][Weapon10]); |
222 | - | GivePlayerWeapon(playerid,22,30); |
222 | + | INI_WriteInt(file, "Weapon11", WeaponInfo[playerid][Weapon11]); |
223 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a 9mm! ($200)"); |
223 | + | INI_WriteInt(file, "Weapon12", WeaponInfo[playerid][Weapon12]); |
224 | - | 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"); |
224 | + | // Ammo Save |
225 | - | } |
225 | + | INI_WriteInt(file, "Ammo1", WeaponInfo[playerid][Ammo1]); |
226 | INI_WriteInt(file, "Ammo2", WeaponInfo[playerid][Ammo2]); | |
227 | - | case 1: |
227 | + | INI_WriteInt(file, "Ammo3", WeaponInfo[playerid][Ammo3]); |
228 | - | { |
228 | + | INI_WriteInt(file, "Ammo4", WeaponInfo[playerid][Ammo4]); |
229 | - | if(GetPlayerMoney(playerid) <600) |
229 | + | INI_WriteInt(file, "Ammo5", WeaponInfo[playerid][Ammo5]); |
230 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
230 | + | INI_WriteInt(file, "Ammo6", WeaponInfo[playerid][Ammo6]); |
231 | - | GivePlayerMoney(playerid, -600); |
231 | + | INI_WriteInt(file, "Ammo7", WeaponInfo[playerid][Ammo7]); |
232 | - | GivePlayerWeapon(playerid,23,30); |
232 | + | INI_WriteInt(file, "Ammo8", WeaponInfo[playerid][Ammo8]); |
233 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Silenced 9mm! ($600)"); |
233 | + | INI_WriteInt(file, "Ammo9", WeaponInfo[playerid][Ammo9]); |
234 | - | 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"); |
234 | + | INI_WriteInt(file, "Ammo10", WeaponInfo[playerid][Ammo10]); |
235 | - | } |
235 | + | INI_WriteInt(file, "Ammo11", WeaponInfo[playerid][Ammo11]); |
236 | INI_WriteInt(file, "Ammo12", WeaponInfo[playerid][Ammo12]); | |
237 | - | case 2: |
237 | + | // Skill Save |
238 | - | { |
238 | + | INI_WriteInt(file, "SKILL_PISTOL", WeaponInfo[playerid][SKILL_PISTOL]); |
239 | - | if(GetPlayerMoney(playerid) <1200) |
239 | + | INI_WriteInt(file, "SKILL_PISTOL_SILENCED", WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); |
240 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
240 | + | INI_WriteInt(file, "SKILL_DESERT_EAGLE", WeaponInfo[playerid][SKILL_DESERT_EAGLE]); |
241 | - | GivePlayerMoney(playerid, -1200); |
241 | + | INI_WriteInt(file, "SKILL_SHOTGUN", WeaponInfo[playerid][SKILL_SHOTGUN]); |
242 | - | GivePlayerWeapon(playerid,24,30); |
242 | + | INI_WriteInt(file, "SKILL_SAWNOFF_SHOTGUN", WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); |
243 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Desert Eagle! ($1200)"); |
243 | + | INI_WriteInt(file, "SKILL_SPAS12_SHOTGUN", WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); |
244 | - | 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"); |
244 | + | INI_WriteInt(file, "SKILL_MICRO_UZI", WeaponInfo[playerid][SKILL_MICRO_UZI]); |
245 | - | } |
245 | + | INI_WriteInt(file, "SKILL_MP5", WeaponInfo[playerid][SKILL_MP5]); |
246 | - | } |
246 | + | INI_WriteInt(file, "SKILL_AK47", WeaponInfo[playerid][SKILL_AK47]); |
247 | - | return 1; |
247 | + | INI_WriteInt(file, "SKILL_M4", WeaponInfo[playerid][SKILL_M4]); |
248 | - | } |
248 | + | INI_WriteInt(file, "SKILL_SNIPERRIFLE", WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
249 | - | return 1; |
249 | + | |
250 | - | } |
250 | + | INI_Close(file); |
251 | } | |
252 | - | case WEAPONSHOP+2: |
252 | + | |
253 | - | { |
253 | + | |
254 | - | if(response) |
254 | + | |
255 | - | { |
255 | + | |
256 | - | switch(listitem) |
256 | + | |
257 | - | { |
257 | + | if(IsPlayerConnected(playerid)) |
258 | - | case 0: |
258 | + | |
259 | - | { |
259 | + | 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 | - | if(GetPlayerMoney(playerid) <300) |
260 | + | |
261 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
261 | + | |
262 | - | GivePlayerMoney(playerid, -300); |
262 | + | |
263 | - | GivePlayerWeapon(playerid,32,30); |
263 | + | |
264 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Tec9! ($300)"); |
264 | + | CMD:showskills(playerid, params[]) |
265 | - | 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"); |
265 | + | |
266 | - | } |
266 | + | if(IsPlayerConnected(playerid)) |
267 | { | |
268 | - | case 1: |
268 | + | new showskillz[476]; |
269 | - | { |
269 | + | new pName[MAX_PLAYER_NAME]; |
270 | - | if(GetPlayerMoney(playerid) <500) |
270 | + | GetPlayerName(playerid, pName, sizeof(pName)); |
271 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
271 | + | format (showskillz, sizeof(showskillz), "{FFFFFF}Player {FF0000}%s{FFFFFF} Stats \n",pName ); |
272 | - | GivePlayerMoney(playerid, -500); |
272 | + | 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]); |
273 | - | GivePlayerWeapon(playerid,28,30); |
273 | + | 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]); |
274 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Micro SMG! ($500)"); |
274 | + | 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]); |
275 | - | 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"); |
275 | + | format (showskillz, sizeof(showskillz), "{FFFFFF}M4:{FF0000}%i , {FFFFFF}Sniper Rifle:{FF0000}%i.",WeaponInfo[playerid][SKILL_M4], WeaponInfo[playerid][SKILL_SNIPERRIFLE]); |
276 | - | } |
276 | + | SendClientMessage(playerid, -1, showskillz); |
277 | - | } |
277 | + | |
278 | - | return 1; |
278 | + | |
279 | - | } |
279 | + | |
280 | - | return 1; |
280 | + | |
281 | - | } |
281 | + | |
282 | { | |
283 | - | case WEAPONSHOP+3: |
283 | + | switch(dialogid) |
284 | - | { |
284 | + | { |
285 | - | if(response) |
285 | + | case WEAPONSHOP: |
286 | - | { |
286 | + | { |
287 | - | switch(listitem) |
287 | + | if(response) |
288 | - | { |
288 | + | { |
289 | - | case 0: |
289 | + | switch(listitem) |
290 | - | { |
290 | + | { |
291 | - | if(GetPlayerMoney(playerid) <600) |
291 | + | 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 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
292 | + | 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 | - | GivePlayerMoney(playerid, -600); |
293 | + | 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 | - | GivePlayerWeapon(playerid,25,15); |
294 | + | case 3: ShowPlayerDialog(playerid, WEAPONSHOP+4, DIALOG_STYLE_LIST, "Armours", "Armour\t\t\t$200", "Select", "Cancel"); |
295 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Shotgun! ($600)"); |
295 | + | case 4: ShowPlayerDialog(playerid, WEAPONSHOP+5, DIALOG_STYLE_LIST, "SMG", "MP5\t\t\t$2000", "Select", "Cancel"); |
296 | - | 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"); |
296 | + | case 5: ShowPlayerDialog(playerid, WEAPONSHOP+6, DIALOG_STYLE_LIST, "Assault", "AK47\t\t$3500\nM4\t\t$4500", "Select", "Cancel"); |
297 | - | } |
297 | + | } |
298 | return 1; | |
299 | - | case 1: |
299 | + | } |
300 | - | { |
300 | + | return 1; |
301 | - | if(GetPlayerMoney(playerid) <800) |
301 | + | } |
302 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
302 | + | |
303 | - | GivePlayerMoney(playerid, -800); |
303 | + | case WEAPONSHOP+1: |
304 | - | GivePlayerWeapon(playerid,26,15); |
304 | + | { |
305 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Sawnoff Shotgun (800$)"); |
305 | + | if(response) |
306 | - | 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"); |
306 | + | { |
307 | - | } |
307 | + | switch(listitem) |
308 | { | |
309 | - | case 2: |
309 | + | case 0: |
310 | - | { |
310 | + | { |
311 | - | if(GetPlayerMoney(playerid) <1000) |
311 | + | if(GetPlayerMoney(playerid) <200) |
312 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
312 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
313 | - | GivePlayerMoney(playerid, -1000); |
313 | + | GivePlayerMoney(playerid, -200); |
314 | - | GivePlayerWeapon(playerid,27,15); |
314 | + | GivePlayerWeapon(playerid,22,30); |
315 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Combat Shotgun (1000$)"); |
315 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a 9mm! ($200)"); |
316 | - | 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"); |
316 | + | 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 | - | } |
317 | + | } |
318 | - | } |
318 | + | |
319 | - | return 1; |
319 | + | case 1: |
320 | - | } |
320 | + | { |
321 | - | return 1; |
321 | + | if(GetPlayerMoney(playerid) <600) |
322 | - | } |
322 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
323 | GivePlayerMoney(playerid, -600); | |
324 | - | case WEAPONSHOP+4: |
324 | + | GivePlayerWeapon(playerid,23,30); |
325 | - | { |
325 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Silenced 9mm! ($600)"); |
326 | - | if(response) |
326 | + | 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 | - | { |
327 | + | } |
328 | - | switch(listitem) |
328 | + | |
329 | - | { |
329 | + | case 2: |
330 | - | case 0: |
330 | + | { |
331 | - | { |
331 | + | if(GetPlayerMoney(playerid) <1200) |
332 | - | if(GetPlayerMoney(playerid) <200) |
332 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
333 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
333 | + | GivePlayerMoney(playerid, -1200); |
334 | - | GivePlayerMoney(playerid, -200); |
334 | + | GivePlayerWeapon(playerid,24,30); |
335 | - | SetPlayerArmour(playerid, 100); |
335 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Desert Eagle! ($1200)"); |
336 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Armour! ($200)"); |
336 | + | 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 | - | 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 | + | } |
338 | - | } |
338 | + | } |
339 | - | } |
339 | + | return 1; |
340 | - | return 1; |
340 | + | } |
341 | - | } |
341 | + | return 1; |
342 | - | return 1; |
342 | + | } |
343 | - | } |
343 | + | |
344 | case WEAPONSHOP+2: | |
345 | - | case WEAPONSHOP+5: |
345 | + | { |
346 | - | { |
346 | + | if(response) |
347 | - | if(response) |
347 | + | { |
348 | - | { |
348 | + | switch(listitem) |
349 | - | switch(listitem) |
349 | + | { |
350 | - | { |
350 | + | case 0: |
351 | - | case 0: |
351 | + | { |
352 | - | { |
352 | + | if(GetPlayerMoney(playerid) <300) |
353 | - | if(GetPlayerMoney(playerid) <2000) |
353 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
354 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
354 | + | GivePlayerMoney(playerid, -300); |
355 | - | GivePlayerMoney(playerid, -2000); |
355 | + | GivePlayerWeapon(playerid,32,30); |
356 | - | GivePlayerWeapon(playerid,29,30); |
356 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Tec9! ($300)"); |
357 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a MP5 (2000$)"); |
357 | + | 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 | - | 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 | + | } |
359 | - | } |
359 | + | |
360 | - | } |
360 | + | case 1: |
361 | - | return 1; |
361 | + | { |
362 | - | } |
362 | + | if(GetPlayerMoney(playerid) <500) |
363 | - | return 1; |
363 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
364 | - | } |
364 | + | GivePlayerMoney(playerid, -500); |
365 | GivePlayerWeapon(playerid,28,30); | |
366 | - | case WEAPONSHOP+6: |
366 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Micro SMG! ($500)"); |
367 | - | { |
367 | + | 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 | - | if(response) |
368 | + | } |
369 | - | { |
369 | + | } |
370 | - | switch(listitem) |
370 | + | return 1; |
371 | - | { |
371 | + | } |
372 | - | case 0: |
372 | + | return 1; |
373 | - | { |
373 | + | } |
374 | - | if(GetPlayerMoney(playerid) <3500) |
374 | + | |
375 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
375 | + | case WEAPONSHOP+3: |
376 | - | GivePlayerMoney(playerid, -3500); |
376 | + | { |
377 | - | GivePlayerWeapon(playerid,30,120); |
377 | + | if(response) |
378 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a AK47 (3500$)"); |
378 | + | { |
379 | - | 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"); |
379 | + | switch(listitem) |
380 | - | } |
380 | + | { |
381 | case 0: | |
382 | - | case 1: |
382 | + | { |
383 | - | { |
383 | + | if(GetPlayerMoney(playerid) <600) |
384 | - | if(GetPlayerMoney(playerid) <4500) |
384 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
385 | - | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
385 | + | GivePlayerMoney(playerid, -600); |
386 | - | GivePlayerMoney(playerid, -4500); |
386 | + | GivePlayerWeapon(playerid,25,15); |
387 | - | GivePlayerWeapon(playerid,31,120); |
387 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Shotgun! ($600)"); |
388 | - | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a M4 (4500$)"); |
388 | + | 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 | - | 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 | + | } |
390 | - | } |
390 | + | |
391 | - | } |
391 | + | case 1: |
392 | - | return 1; |
392 | + | { |
393 | - | } |
393 | + | if(GetPlayerMoney(playerid) <800) |
394 | - | return 1; |
394 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
395 | - | } |
395 | + | GivePlayerMoney(playerid, -800); |
396 | GivePlayerWeapon(playerid,26,15); | |
397 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Sawnoff Shotgun (800$)"); | |
398 | 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 | } | |
400 | ||
401 | case 2: | |
402 | { | |
403 | if(GetPlayerMoney(playerid) <1000) | |
404 | - | // Load Weapons |
404 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
405 | - | INI_Int("Weapon1", WeaponInfo[playerid][Weapon1]); |
405 | + | GivePlayerMoney(playerid, -1000); |
406 | - | INI_Int("Weapon2", WeaponInfo[playerid][Weapon2]); |
406 | + | GivePlayerWeapon(playerid,27,15); |
407 | - | INI_Int("Weapon3", WeaponInfo[playerid][Weapon3]); |
407 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Combat Shotgun (1000$)"); |
408 | - | INI_Int("Weapon4", WeaponInfo[playerid][Weapon4]); |
408 | + | 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 | - | INI_Int("Weapon5", WeaponInfo[playerid][Weapon5]); |
409 | + | } |
410 | - | INI_Int("Weapon6", WeaponInfo[playerid][Weapon6]); |
410 | + | } |
411 | - | INI_Int("Weapon7", WeaponInfo[playerid][Weapon7]); |
411 | + | return 1; |
412 | - | INI_Int("Weapon8", WeaponInfo[playerid][Weapon8]); |
412 | + | } |
413 | - | INI_Int("Weapon9", WeaponInfo[playerid][Weapon9]); |
413 | + | return 1; |
414 | - | INI_Int("Weapon10", WeaponInfo[playerid][Weapon10]); |
414 | + | } |
415 | - | INI_Int("Weapon11", WeaponInfo[playerid][Weapon11]); |
415 | + | |
416 | - | INI_Int("Weapon12", WeaponInfo[playerid][Weapon12]); |
416 | + | case WEAPONSHOP+4: |
417 | { | |
418 | - | // Load Ammo |
418 | + | if(response) |
419 | - | INI_Int("Ammo1", WeaponInfo[playerid][Ammo1]); |
419 | + | { |
420 | - | INI_Int("Ammo2", WeaponInfo[playerid][Ammo2]); |
420 | + | switch(listitem) |
421 | - | INI_Int("Ammo3", WeaponInfo[playerid][Ammo3]); |
421 | + | { |
422 | - | INI_Int("Ammo4", WeaponInfo[playerid][Ammo4]); |
422 | + | case 0: |
423 | - | INI_Int("Ammo5", WeaponInfo[playerid][Ammo5]); |
423 | + | { |
424 | - | INI_Int("Ammo6", WeaponInfo[playerid][Ammo6]); |
424 | + | if(GetPlayerMoney(playerid) <200) |
425 | - | INI_Int("Ammo7", WeaponInfo[playerid][Ammo7]); |
425 | + | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); |
426 | - | INI_Int("Ammo8", WeaponInfo[playerid][Ammo8]); |
426 | + | GivePlayerMoney(playerid, -200); |
427 | - | INI_Int("Ammo9", WeaponInfo[playerid][Ammo9]); |
427 | + | SetPlayerArmour(playerid, 100); |
428 | - | INI_Int("Ammo10", WeaponInfo[playerid][Ammo10]); |
428 | + | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a Armour! ($200)"); |
429 | - | INI_Int("Ammo11", WeaponInfo[playerid][Ammo11]); |
429 | + | 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 | - | INI_Int("Ammo12", WeaponInfo[playerid][Ammo12]); |
430 | + | } |
431 | } | |
432 | return 1; | |
433 | } | |
434 | return 1; | |
435 | } | |
436 | ||
437 | case WEAPONSHOP+5: | |
438 | { | |
439 | if(response) | |
440 | { | |
441 | switch(listitem) | |
442 | { | |
443 | case 0: | |
444 | { | |
445 | if(GetPlayerMoney(playerid) <2000) | |
446 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
447 | GivePlayerMoney(playerid, -2000); | |
448 | GivePlayerWeapon(playerid,29,30); | |
449 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a MP5 (2000$)"); | |
450 | 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 | } | |
453 | return 1; | |
454 | } | |
455 | return 1; | |
456 | } | |
457 | ||
458 | case WEAPONSHOP+6: | |
459 | { | |
460 | if(response) | |
461 | { | |
462 | switch(listitem) | |
463 | { | |
464 | case 0: | |
465 | { | |
466 | if(GetPlayerMoney(playerid) <3500) | |
467 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
468 | GivePlayerMoney(playerid, -3500); | |
469 | GivePlayerWeapon(playerid,30,120); | |
470 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a AK47 (3500$)"); | |
471 | 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 | } | |
473 | ||
474 | case 1: | |
475 | { | |
476 | if(GetPlayerMoney(playerid) <4500) | |
477 | return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to purchase this item!"); | |
478 | GivePlayerMoney(playerid, -4500); | |
479 | GivePlayerWeapon(playerid,31,120); | |
480 | SendClientMessage(playerid, COLOR_GREEN, "Thank you for purchasing a M4 (4500$)"); | |
481 | 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 | } | |
484 | return 1; | |
485 | } | |
486 | return 1; | |
487 | } | |
488 | } | |
489 | return 1; | |
490 | } | |
491 | ||
492 | //Loaduser Public | |
493 | forward LoadUser_data(playerid, name[], value[]); | |
494 | public LoadUser_data(playerid, name[], value[]) | |
495 | { | |
496 | // Load Weapons | |
497 | INI_Int("Weapon1", WeaponInfo[playerid][Weapon1]); | |
498 | INI_Int("Weapon2", WeaponInfo[playerid][Weapon2]); | |
499 | INI_Int("Weapon3", WeaponInfo[playerid][Weapon3]); | |
500 | INI_Int("Weapon4", WeaponInfo[playerid][Weapon4]); | |
501 | INI_Int("Weapon5", WeaponInfo[playerid][Weapon5]); | |
502 | INI_Int("Weapon6", WeaponInfo[playerid][Weapon6]); | |
503 | INI_Int("Weapon7", WeaponInfo[playerid][Weapon7]); | |
504 | INI_Int("Weapon8", WeaponInfo[playerid][Weapon8]); | |
505 | INI_Int("Weapon9", WeaponInfo[playerid][Weapon9]); | |
506 | INI_Int("Weapon10", WeaponInfo[playerid][Weapon10]); | |
507 | INI_Int("Weapon11", WeaponInfo[playerid][Weapon11]); | |
508 | INI_Int("Weapon12", WeaponInfo[playerid][Weapon12]); | |
509 | ||
510 | // Load Ammo | |
511 | INI_Int("Ammo1", WeaponInfo[playerid][Ammo1]); | |
512 | INI_Int("Ammo2", WeaponInfo[playerid][Ammo2]); | |
513 | INI_Int("Ammo3", WeaponInfo[playerid][Ammo3]); | |
514 | INI_Int("Ammo4", WeaponInfo[playerid][Ammo4]); | |
515 | INI_Int("Ammo5", WeaponInfo[playerid][Ammo5]); | |
516 | INI_Int("Ammo6", WeaponInfo[playerid][Ammo6]); | |
517 | INI_Int("Ammo7", WeaponInfo[playerid][Ammo7]); | |
518 | INI_Int("Ammo8", WeaponInfo[playerid][Ammo8]); | |
519 | INI_Int("Ammo9", WeaponInfo[playerid][Ammo9]); | |
520 | INI_Int("Ammo10", WeaponInfo[playerid][Ammo10]); | |
521 | INI_Int("Ammo11", WeaponInfo[playerid][Ammo11]); | |
522 | INI_Int("Ammo12", WeaponInfo[playerid][Ammo12]); | |
523 | ||
524 | // Load Skills | |
525 | INI_Int("SKILL_PISTOL", WeaponInfo[playerid][SKILL_PISTOL]); | |
526 | INI_Int("SKILL_PISTOL_SILENCED", WeaponInfo[playerid][SKILL_PISTOL_SILENCED]); | |
527 | INI_Int("SKILL_DESERT_EAGLE", WeaponInfo[playerid][SKILL_DESERT_EAGLE]); | |
528 | INI_Int("SKILL_SHOTGUN", WeaponInfo[playerid][SKILL_SHOTGUN]); | |
529 | INI_Int("SKILL_SAWNOFF_SHOTGUN", WeaponInfo[playerid][SKILL_SAWNOFF_SHOTGUN]); | |
530 | INI_Int("SKILL_SPAS12_SHOTGUN", WeaponInfo[playerid][SKILL_SPAS12_SHOTGUN]); | |
531 | INI_Int("SKILL_MICRO_UZI", WeaponInfo[playerid][SKILL_MICRO_UZI]); | |
532 | INI_Int("SKILL_MP5", WeaponInfo[playerid][SKILL_MP5]); | |
533 | INI_Int("SKILL_AK47", WeaponInfo[playerid][SKILL_AK47]); | |
534 | INI_Int("SKILL_M4", WeaponInfo[playerid][SKILL_M4]); | |
535 | INI_Int("SKILL_SNIPERRIFLE", WeaponInfo[playerid][SKILL_SNIPERRIFLE]); | |
536 | return 1; | |
537 | } | |
538 | ||
539 | //Stocks | |
540 | stock pWeaponSave(playerid) | |
541 | { | |
542 | new string[50]; | |
543 | format(string, sizeof(string), PATH, GetName(playerid)); | |
544 | return string; | |
545 | } | |
546 | ||
547 | stock GetName(playerid) | |
548 | { | |
549 | new name[24]; | |
550 | GetPlayerName(playerid, name, sizeof(name)); | |
551 | return name; | |
552 | } | |
553 | ||
554 | //------------------------------------------------------------------------------ | |
555 | //============================I Know You Will Change============================ | |
556 | //=========================Please Do Not Remove Credits========================= | |
557 | //------------------------------------------------------------------------------ |