· 8 years ago · Mar 17, 2018, 06:44 PM
1#include <a_samp>
2#include <streamer>
3#include <foreach>
4new bool:truckcheck[MAX_PLAYERS];
5new deliveringfor[MAX_PLAYERS];
6new nearshop[MAX_PLAYERS];
7new inshop[MAX_PLAYERS];
8enum stuff3
9{
10 inpickup,
11 Text3D: txt,
12 Text3D: ownr,
13 namef[60],
14 ownerf[60]
15};
16new shopproper[MAX_PLAYERS][stuff3];
17public OnGameModeInit()
18{
19 new shops, tmp2[60], str[128];
20 result = db_query(Database, "SELECT * FROM `Shops`");
21 shops = db_num_rows(result);
22 printf("Loading %d shops...", shops);
23 allshops = shops;
24 while (shops > 0)
25 {
26 db_get_field_assoc(result,"shopid",tmp2,sizeof(tmp2));
27 id = strval(tmp2);
28 db_get_field_assoc(result,"name",tmp2,sizeof(tmp2));
29 format(shopproper[id][namef], 51, "%s", tmp2);
30 db_get_field_assoc(result,"owner",tmp2,sizeof(tmp2));
31 format(shopproper[id][ownerf], 52, "%s", tmp2);
32 db_get_field_assoc(result,"x",tmp2,sizeof(tmp2));
33 x = floatstr(tmp2);
34 db_get_field_assoc(result,"y",tmp2,sizeof(tmp2));
35 y = floatstr(tmp2);
36 db_get_field_assoc(result,"z",tmp2,sizeof(tmp2));
37 z = floatstr(tmp2);
38 shopproper[id][inpickup] = CreateDynamicPickup(1275, 1, x, y, z, 0);
39 format(str, sizeof(str), "OWNER: %s", shopproper[id][namef]);
40 shopproper[id][txt] = CreateDynamic3DTextLabel(str, 0xAD3939FF, x, y, z-0.4, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
41 shopproper[id][ownr] = CreateDynamic3DTextLabel(shopproper[id][ownerf], 0xD490CEFF, x, y, z-0.5, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
42 db_next_row(result);
43 shops--;
44 }
45 return 1;
46}
47public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
48{
49 new str[125], Float:x1, Float:y1, Float:z1, interiorid, vw, DBResult:result;
50 new Float:x2, Float:y2, Float:z2, msg2[256];
51 if((newkeys & KEY_YES) && nearshop[playerid] != -1)
52 {
53 format(str, sizeof(str), "SELECT * FROM `Shops` WHERE `shopid` = %d", nearshop[playerid]);
54 result = db_query(Database, str);
55 db_get_field_assoc(result,"x1",str,sizeof(str));
56 x1 = floatstr(str);
57 db_get_field_assoc(result,"y1",str,sizeof(str));
58 y1 = floatstr(str);
59 db_get_field_assoc(result,"z1",str,sizeof(str));
60 z1 = floatstr(str);
61 db_get_field_assoc(result,"interiorid",str,sizeof(str));
62 interiorid = strval(str);
63 db_get_field_assoc(result,"vw",str,sizeof(str));
64 vw = strval(str);
65 SetPlayerInterior(playerid, interiorid);
66 SetPlayerVirtualWorld(playerid, vw);
67 SetPlayerPos(playerid, x1, y1, z1);
68 inshop[playerid] = nearshop[playerid];
69 format(msg2, sizeof(msg2), "You are now inshop id %d", inshop[playerid]);
70 SendClientMessage(playerid, ERRORCOLOR, msg2);
71 SetTimerEx("nearshoprm", 500, false, "i", playerid);
72 }
73 if((newkeys & KEY_YES) && inshop[playerid] != -1)
74 {
75 format(str, sizeof(str), "SELECT * FROM `Shops` WHERE `shopid` = %d", inshop[playerid]);
76 result = db_query(Database, str);
77 db_get_field_assoc(result,"x",str,sizeof(str));
78 x1 = floatstr(str);
79 db_get_field_assoc(result,"y",str,sizeof(str));
80 y1 = floatstr(str);
81 db_get_field_assoc(result,"z",str,sizeof(str));
82 z1 = floatstr(str);
83 db_get_field_assoc(result,"x2",str,sizeof(str));
84 x2 = floatstr(str);
85 db_get_field_assoc(result,"y2",str,sizeof(str));
86 y2 = floatstr(str);
87 db_get_field_assoc(result,"z2",str,sizeof(str));
88 z2 = floatstr(str);
89 if(IsPlayerInRangeOfPoint(playerid, 3, x2, y2, z2) && inshop[playerid] != -1)
90 {
91 SetPlayerInterior(playerid, 0);
92 SetPlayerVirtualWorld(playerid, 0);
93 SetPlayerPos(playerid, x1, y1, z1);
94 nearshop[playerid] = -1;
95 inshop[playerid] = -1;
96 }
97 }
98 return 1;
99}
100//
101db_query(Database, "CREATE TABLE IF NOT EXISTS `Shops` (`shopid`, `x`, `y`, `z`, `name`, `price`,`vw`, `interiorid`, `owner`, `x1`, `y1`, `z1`,`x2`, `y2`, `z2`, `facingan`)");
102//
103CMD:removeshop(playerid, params[])
104{
105 new str[147];
106 if (!AdminCheck(playerid, 5)) return 0;
107 if (nearshop[playerid] == -1) return SendClientMessage(playerid, ERRORCOLOR, "You are not close enough to any shop");
108 format(str, sizeof(str), "DELETE FROM `Shops` WHERE `shopid` = %d", nearshop[playerid]);
109 db_query(Database, str);
110 DestroyDynamicPickup(shopproper[nearshop[playerid]][inpickup]);
111 allshops--;
112 format(str, sizeof(str), "%s has deleted shop (ID:%d)", Name[playerid], nearshop[playerid]);
113 SendMessageToAdmins(4, str);
114 return 1;
115}
116CMD:addshop(playerid, params[])
117{
118 new Float:x, Float:y, Float:z, type;
119 new Float:x1, Float:y1, Float:z1, shopid, name[30], str[128];
120 new vw, DBResult:result, query[1000], Float:facingang;
121 if(!AdminCheck(playerid, 4)) return 0;
122// if(sscanf(params, "iiiffffff", vw, interiorid, pric,x1,y1,z1, x2,y2,z2)) return SendClientMessage(playerid, ERRORCOLOR, "Usage: /addshop [vw] [interiorid] [price] [x] [y] [z] [x2] [y2] [z2]");
123 if(sscanf(params, "is[30]", type, name)) return SendClientMessage(playerid, ERRORCOLOR, "Usage: /addshop [type] [name]");
124 GetPlayerPos(playerid, x,y,z);
125 GetPlayerFacingAngle(playerid, facingang);
126 for (new i = 0; i < MAX_SHOPS; i++)
127 {
128 format(query, sizeof(query), "SELECT * FROM `Shops` WHERE `shopid` = %d", i);
129 result = db_query(Database, query);
130 if (db_num_rows(result) == 0)
131 {
132 shopid = i;
133 break;
134 }
135 db_free_result(result);
136 }
137 for (new m = 0; m < MAX_SHOPS; m++)
138 {
139 format(query, sizeof(query), "SELECT * FROM `Shops` WHERE `vw` = %d", m);
140 result = db_query(Database, query);
141 if (db_num_rows(result) == 0)
142 {
143 vw = m;
144 break;
145 }
146 db_free_result(result);
147 }
148 if(type == 1)
149 {
150 format(query, sizeof(query),"INSERT INTO `Shops` (`shopid`, `x`, `y`, `z`, `name`, `price`, `vw`, `interiorid`, `owner`, `x1`, `y1`, `z1`,`x2`, `y2`, `z2`, `facingan`) VALUES (%d, %.2f, %.2f, %.2f, '%s', -1,%d, 7, '%s', 314.820983, -141.431991, 999.601562,314.820983, -141.431991, 999.601562, %.2f)", shopid, x, y, z, DB_Escape(name), vw, DB_Escape(Name[playerid]), facingang);
151 db_query(Database, query);
152 format(query, sizeof(query), "%s has created a shop with name %s(ID:%d) type: Ammunation 3, exit points : %.2f ,%.2f ,%.2f", Name[playerid], name, shopid, x1, y1, z1);
153 SendMessageToAdmins(5, query);
154 shopproper[shopid][inpickup] = CreateDynamicPickup(1275, 1,x, y, z);
155 shopproper[shopid][txt] = CreateDynamic3DTextLabel(name, 0xAD3939FF, x, y, z-0.3, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
156 format(str, sizeof(str), "{D490CE}OWNER: %s", Name[playerid]);
157 shopproper[shopid][ownr] = CreateDynamic3DTextLabel(str, 0xD490CEFF, x, y, z-0.5, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
158 }
159 else if(type == 2)
160 {
161 format(query, sizeof(query),"INSERT INTO `Shops` (`shopid`, `x`, `y`, `z`, `name`, `price`, `vw`, `interiorid`, `owner`, `x1`, `y1`, `z1`,`x2`, `y2`, `z2`, `facingan`) VALUES (%d, %.2f, %.2f, %.2f, '%s', -1,%d, 7, '%s', 314.820983, -141.431991, 999.601562,314.820983, -141.431991, 999.601562, %.2f)", shopid, x, y, z, DB_Escape(name), vw, DB_Escape(Name[playerid]), facingang);
162 db_query(Database, query);
163 format(query, sizeof(query), "%s has created a shop with name %s(ID:%d) type: Ammunation 4, exit points : %.2f ,%.2f ,%.2f", Name[playerid], name, shopid, x1, y1, z1);
164 SendMessageToAdmins(5, query);
165 shopproper[shopid][inpickup] = CreateDynamicPickup(1275, 1,x, y, z);
166 shopproper[shopid][txt] = CreateDynamic3DTextLabel(name, 0xAD3939FF, x, y, z-0.3, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
167 format(str, sizeof(str), "{D490CE}OWNER: %s", Name[playerid]);
168 shopproper[shopid][ownr] = CreateDynamic3DTextLabel(str, 0xD490CEFF, x, y, z-0.5, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
169 allshops++;
170 }
171 else if(type == 3)
172 {
173 format(query, sizeof(query),"INSERT INTO `Shops` (`shopid`, `x`, `y`, `z`, `name`, `price`, `vw`, `interiorid`, `owner`, `x1`, `y1`, `z1`,`x2`, `y2`, `z2`, `facingan`) VALUES (%d, %.2f, %.2f, %.2f, '%s', -1,%d, 7, '%s', 314.820983, -141.431991, 999.601562,314.820983, -141.431991, 999.601562, %.2f)", shopid, x, y, z, DB_Escape(name), vw, DB_Escape(Name[playerid]), facingang);
174 db_query(Database, query);
175 format(query, sizeof(query), "%s has created a shop with name %s(ID:%d) type: Ammunation 4, exit points : %.2f ,%.2f ,%.2f", Name[playerid], name, shopid, x1, y1, z1);
176 SendMessageToAdmins(5, query);
177 shopproper[shopid][inpickup] = CreateDynamicPickup(1275, 1,x, y, z);
178 shopproper[shopid][txt] = CreateDynamic3DTextLabel(name, 0xAD3939FF, x, y, z-0.3, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
179 format(str, sizeof(str), "{D490CE}OWNER: %s", Name[playerid]);
180 shopproper[shopid][ownr] = CreateDynamic3DTextLabel(str, 0xD490CEFF, x, y, z-0.5, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
181 allshops++;
182 }
183 else if(type == 4)
184 {
185 format(query, sizeof(query),"INSERT INTO `Shops` (`shopid`, `x`, `y`, `z`, `name`, `price`, `vw`, `interiorid`, `owner`, `x1`, `y1`, `z1`,`x2`, `y2`, `z2`, `facingan`) VALUES (%d, %.2f, %.2f, %.2f, '%s', -1,%d, 7, '%s', 314.820983, -141.431991, 999.601562,314.820983, -141.431991, 999.601562, %.2f)", shopid, x, y, z, DB_Escape(name), vw, DB_Escape(Name[playerid]), facingang);
186 db_query(Database, query);
187 format(query, sizeof(query), "%s has created a shop with name %s(ID:%d) type: Ammunation 4, exit points : %.2f ,%.2f ,%.2f", Name[playerid], name, shopid, x1, y1, z1);
188 SendMessageToAdmins(5, query);
189 shopproper[shopid][inpickup] = CreateDynamicPickup(1275, 1,x, y, z);
190 shopproper[shopid][txt] = CreateDynamic3DTextLabel(name, 0xAD3939FF, x, y, z-0.3, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
191 format(str, sizeof(str), "{D490CE}OWNER: %s", Name[playerid]);
192 shopproper[shopid][ownr] = CreateDynamic3DTextLabel(str, 0xD490CEFF, x, y, z-0.5, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
193 allshops++;
194 }
195 else if(type == 5)
196 {
197 format(query, sizeof(query),"INSERT INTO `Shops` (`shopid`, `x`, `y`, `z`, `name`, `price`, `vw`, `interiorid`, `owner`, `x1`, `y1`, `z1`,`x2`, `y2`, `z2`, `facingan`) VALUES (%d, %.2f, %.2f, %.2f, '%s', -1,%d, 7, '%s', 314.820983, -141.431991, 999.601562,314.820983, -141.431991, 999.601562, %.2f)", shopid, x, y, z, DB_Escape(name), vw, DB_Escape(Name[playerid]), facingang);
198 db_query(Database, query);
199 format(query, sizeof(query), "%s has created a shop with name %s(ID:%d) type: Ammunation 4, exit points : %.2f ,%.2f ,%.2f", Name[playerid], name, shopid, x1, y1, z1);
200 SendMessageToAdmins(5, query);
201 shopproper[shopid][inpickup] = CreateDynamicPickup(1275, 1,x, y, z);
202 shopproper[shopid][txt] = CreateDynamic3DTextLabel(name, 0xAD3939FF, x, y, z-0.3, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
203 format(str, sizeof(str), "{D490CE}OWNER: %s", Name[playerid]);
204 shopproper[shopid][ownr] = CreateDynamic3DTextLabel(str, 0xD490CEFF, x, y, z-0.5, 20, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0);
205 allshops++;
206 }
207 return 1;
208}
209CMD:buyshop(playerid, params[])
210{
211 new query[500], price, DBResult: result;
212 if(nearshop[playerid] == -1) return SendClientMessage(playerid, ERRORCOLOR, "You are not near any shop");
213 format(query, sizeof(query), "SELECT * FROM `Shops` WHERE `shopid` = %d", nearshop[playerid])
214 result = db_query(Database, query);
215 db_get_field_assoc(result,"price",query,sizeof(query));
216 price = strval(query);
217 if(price == -1) return SendClientMessage(playerid, ERRORCOLOR, "This shop is not saled");
218 if(GetPlayerMoney(playerid) < price) return SendClientMessage(playerid, ERRORCOLOR, "invalid amount");
219 format(query, sizeof(query), "UPDATE `Shops` SET `owner` = '%s', `price` = %d WHERE `shopid` = %d", DB_Escape(Name[playerid]), -1, nearshop[playerid]);
220 db_query(Database, query);
221 SetPlayerMoney(playerid, GetPlayerMoney(playerid) - price);
222 SendClientMessage(playerid, -1, "Pruchase completed");
223 return 1;
224}
225CMD:sale(playerid, params[])
226{
227 new query[500], price, DBResult: result, owner[82];
228 if(sscanf(params, "i", price)) return SendClientMessage(playerid, ERRORCOLOR, "Usage: /sale [price]");
229 if(inshop[playerid] == -1) return SendClientMessage(playerid, ERRORCOLOR, "You are not in any shop");
230 format(query, sizeof(query), "SELECT * FROM `Shops` WHERE `shopid` = %d", inshop[playerid]);
231 result = db_query(Database, query);
232 db_get_field_assoc(result,"owner",query,sizeof(query));
233 format(owner, sizeof(owner),"%s", query);
234 if(strcmp(Name[playerid], "owner", false) == 0) return SendClientMessage(playerid, ERRORCOLOR, "You don't own this shop");
235 format(query, sizeof(query), "UDPATE `Shops` SET `price` = %d WHERE `shopid` = %d", price,inshop[playerid]);
236 db_query(Database, query);
237 format(query, sizeof(query),"You have setted your shop on sale for %d");
238 SendClientMessage(playerid, ERRORCOLOR, query);
239 return 1;
240}
241IRCCMD:setname(botid, channel[], user[], host[], params[])
242{
243 if (!IRC_IsAdmin(botid, channel, user)) return 1;
244 new DBResult: result, oldname[30], newname[30], msg[256], find[500], id;
245 if (strlen(params) > 41) return IRC_SendMessageToAdmins(4, "4Either the old or new name is too long.");
246 if (sscanf(params, "s[30]s[30]", oldname, newname)) return IRC_SendMessageToAdmins(4, "4Usage: !setname [oldname or playerid] [newname]");
247 if (strlen(newname) < 3) return IRC_SendMessageToAdmins(4, "4The new name is too short.");
248 if (newname[0] <= '9' && newname[0] >= '0') return IRC_SendMessageToAdmins(4, "4The new name is too short.");
249 if (strlen(oldname) > 20 || strlen(newname) > 20) return IRC_SendMessageToAdmins(4, "4Either the old or new name is too long.");
250 if (strfind(newname, " ", true, 0) != -1) return IRC_SendMessageToAdmins(4, "4Invalid name.");
251 format(msg, sizeof(msg), "SELECT * FROM `User` WHERE `Name` = '%s'", DB_Escape(newname));
252 result = db_query(Database, msg);
253 if (db_num_rows(result))
254 {
255 db_free_result(result);
256 return IRC_SendMessageToAdmins(4, "4This name is already regisered.");
257 }
258 db_free_result(result);
259 if (IsNumeric(oldname))
260 {
261 id = strval(oldname);
262 if (!IsPlayerConnected(id)) return IRC_SendMessageToAdmins(4, "4Invalid playerid.");
263 if (!logged_{id}) return IRC_SendMessageToAdmins(4, "4This player is not registerd.");
264 format(oldname, sizeof(oldname), "%s", Name[id]);
265 if (strcmp(newname, oldname, true) == 0) return IRC_SendMessageToAdmins(4, "4Current name and new name may not be the same.");
266 SetPlayerName(id, newname);
267 format(Name[id], 24, "%s", newname);
268 format(msg, sizeof(msg), "An Admin has changed your name to %s", newname);
269 SendClientMessage(id, 0xFFFF00FF, msg);
270 }
271 else
272 {
273 format(msg, sizeof(msg), "SELECT * FROM `User` WHERE `Name` = '%s'", DB_Escape(oldname));
274 result = db_query(Database, msg);
275 if (!db_num_rows(result))
276 {
277 db_free_result(result);
278 return IRC_SendMessageToAdmins(4, "4This player is not registerd.");
279 }
280 id = GetPlayerID(oldname);
281 if (IsPlayerConnected(id)) if (!logged_{id}) return IRC_SendMessageToAdmins(4, "4This player is not registerd.");
282 if (strcmp(newname, oldname, true) == 0) return IRC_SendMessageToAdmins(4, "4Current name and new name may not be the same.");
283 }
284 if (IsPlayerConnected(id)) { SetPlayerName(id, newname); format(Name[id], 24, "%s", newname); }
285 format(find, sizeof(find), "SELECT * FROM `Shops` WHERE `owner` = '%s'", oldname);
286 esult = db_query(Database, find);
287 if(db_num_rows(result))
288 {
289 format(find, sizeof(find), "UPDATE `Shops` SET `owner` = '%s' WHERE `owner` = '%s'",DB_Escape(newname), DB_Escape(oldname));
290 db_query(Database, query);
291 }
292 format(msg, sizeof(msg), "UPDATE `User` SET `Name` = '%s' WHERE `Name` = '%s'",DB_Escape(newname), DB_Escape(oldname));
293 db_query(Database, msg);
294 format(msg, sizeof(msg), "%s has changed the name %s to %s", user, oldname, newname);
295 SendMessageToAdmins(4, msg);
296 strins(msg, "10", 0);
297 IRC_SendMessageToAdmins(4, msg);
298 return 1;
299}
300public OnPlayerExitVehicle(playerid, vehicleid)
301{
302 switch(GetVehicleModel(vehicleid))
303 {
304 case 455, 515:
305 {
306 SendClientMessage(playerid, ERRORCOLOR, "you are no longer on trucker duty");
307 DisablePlayerCheckpoint(playerid);
308 deliveringfor[playerid] = -1;
309 truckcheck[playerid] = false;
310 }
311 }
312}
313public OnPlayerStateChange(playerid, oldstate, newstate)
314{
315 if (newstate == PLAYER_STATE_DRIVER)
316 {
317 if (GetVehicleModel(vehicleid) == 515 || GetVehicleModel(vehicleid) == 455)
318 {
319 new Float:x, Float:y,Float:z;
320 new query[259], DBResult: result;
321 format(query, sizeof(query), "SELECT * FROM `Shops` ORDER by Random() LIMIT 1");
322 result = db_query(Database, query);
323 SendClientMessage(playerid, ERRORCOLOR, "You are now in trucker");
324 db_get_field_assoc(result, "x", query, sizeof(query));
325 x = floatstr(query);
326 db_get_field_assoc(result, "y", query, sizeof(query));
327 y = floatstr(query);
328 db_get_field_assoc(result, "z", query, sizeof(query));
329 z = floatstr(query);
330 db_get_field_assoc(result, "owner", query, sizeof(query));
331 format(deliveringfor[playerid], 50, "%s", query);
332 SetPlayerCheckpoint(playerid, x, y, z, 7.0);
333 truckcheck[playerid] = true;
334 }
335 }
336}
337public OnPlayerEnterCheckpoint(playerid, checkpointid)
338{
339 if (truckcheck[playerid])
340 {
341 new query[128], DBResult:result;
342 new Float:xf, Float:yf,Float:zf;
343 new idf;
344 GivePlayerMoney(playerid, 5000);
345 idf = GetPlayerID(deliveringfor[playerid]);
346 if(IsPlayerConnected(idf))
347 {
348 SendClientMessage(idf, ERRORCOLOR, "You have taken 10000$ for the delivered packs!");
349 GivePlayerMoney(idf, 10000);
350 }
351 else format(query, sizeof(query),"UPDATE `User` SET `bank` = `bank` + 10000 WHERE `Name` = '%s'", deliveringfor[playerid]);
352 db_query(Database, query);
353 DisablePlayerCheckpoint(playerid);
354 truckcheck[playerid] = false;
355 format(query, sizeof(query), "SELECT * FROM `Shops` ORDER by Random() LIMIT 1");
356 result = db_query(Database, query);
357 db_get_field_assoc(result, "x", query, sizeof(query));
358 xf = floatstr(query);
359 db_get_field_assoc(result, "y", query, sizeof(query));
360 yf = floatstr(query);
361 db_get_field_assoc(result, "z", query, sizeof(query));
362 zf= floatstr(query);
363 SetPlayerCheckpoint(playerid, xf, yf, zf, 7.0);
364 truckcheck[playerid] = true;
365 db_get_field_assoc(result, "owner", query, sizeof(query));
366 format(deliveringfor[playerid], 50, "%s", query);
367 }
368 return 1;
369}
370public OnPlayerPickupDynamicPickup(playerid, pickupid)
371{
372 for (new i = 0; i < MAX_SHOPS; i++)
373 {
374 if (shopproper[i][inpickup] == pickupid)
375 {
376 SendClientMessage(playerid, ERRORCOLOR, "You are in shop Pickup !");
377 nearshop[playerid] = i;
378 SetTimerEx("removingnear", 1000, false, "i", playerid);
379 break;
380 }
381 }
382}
383forward nearshoprm(playerid);
384public nearshoprm(playerid)
385{
386 nearshop[playerid] = -1;
387 return 1;
388}
389forward removingnear(playerid);
390public removingnear(playerid)
391{
392 nearshop[playerid] = -1;
393 return 1;
394}