· 9 years ago · Nov 30, 2016, 05:46 PM
1/*
2 __________________________________________________
3 | |
4 | Base SQLite Script |
5 | ------------------ |
6 | Created by: Norrin |
7 | http://creativecommons.org/licenses/by-nc-nd/4.0 |
8 |__________________________________________________|
9
10*/
11//------------------------------------------------------------------------------
12// INCLUDES
13//------------------------------------------------------------------------------
14#include <a_samp>
15#include <sscanf2>
16#include <streamer>
17#include <zcmd>
18#include <YSI\y_timers>
19//------------------------------------------------------------------------------
20// SERVER CONFIGURATION
21//------------------------------------------------------------------------------
22#define SERVER_NAME "Roleplay Script"
23#define SERVER_RCON "goodroleplayserver"
24#define SERVER_PASSWORD "0"
25#define SERVER_VERSION "v0.1"
26#define SERVER_MAP "Los Santos"
27#define SERVER_WEBSITE "N/A"
28#define SERVER_TEAMSPEAK "N/A"
29//------------------------------------------------------------------------------
30// DEFINITIONS
31//------------------------------------------------------------------------------
32#define COLOR_WHITE 0xFFFFFFAA
33#define COLOR_BLACK 0x000000FF
34#define COLOR_GREY 0xB4B5B7FF
35#define COLOR_YELLOW 0xFFFF00AA
36#define COLOR_RED 0xAA3333AA
37#define COLOR_ORANGE 0xF69521AA
38#define COLOR_GREEN 0x33AA33AA
39#define COLOR_PURPLE 0xC2A2DAAA
40#define COLOR_CYAN 0x00FFFFFF
41#define COLOR_GOLD 0xFFD700FF
42#define COLOR_LIME 0x00FF00FF
43#define COLOR_TEAL 0x008080AA
44#define COLOR_HOTPINK 0xFF69B4FF
45#define COLOR_LAVENDER 0xE6E6FAFF
46#define COLOR_LIGHTRED 0xFF6347AA
47#define COLOR_CYANBLUE 0x01FCFFC8
48#define COLOR_LIGHTBLUE 0x33CCFFAA
49#define COLOR_NEWBIE 0xBED9EFFF
50#define COLOR_FADE1 0xE6E6E6E6
51#define COLOR_FADE2 0xC8C8C8C8
52#define COLOR_FADE3 0xAAAAAAAA
53#define COLOR_FADE4 0x8C8C8C8C
54#define COLOR_FADE5 0x6E6E6E6E
55#define DIALOG_REGISTER (1)
56#define DIALOG_LOGIN (2)
57#define DIALOG_BANINFO (3)
58#define DIALOG_AGE (4)
59#define DIALOG_GENDER (5)
60#define DIALOG_SKIN (6)
61#define MAX_DOORS (100)
62
63//------------------------------------------------------------------------------
64// MACROS
65//------------------------------------------------------------------------------
66#define IsPlayerLogged(%0) GetPVarInt(%0, "gLogged")
67#define IsPlayerTabbed(%0) gettime() > (PlayerInfo[%0][pLastUpdate] + 2)
68
69//------------------------------------------------------------------------------
70// NATIVES
71//------------------------------------------------------------------------------
72native WP_Hash(buffer[], len, const str[]);
73
74//------------------------------------------------------------------------------
75// VARIABLES
76//------------------------------------------------------------------------------
77new DB:Database;
78new WorldTime[3];
79
80new Text:StopAnim;
81new Text:BoxNotice;
82new Text:LoadingNotice;
83
84enum pInfo {
85 pID,
86 pUsername[MAX_PLAYER_NAME],
87 pAge,
88 pGender,
89 pRegistered,
90 pMember,
91 pRank,
92 pLeader,
93 pTogNewbie,
94 pIP[16],
95 pBanned,
96 pBanReason[64],
97 pBanExpiry,
98 pJailTime,
99 pJailReason[64],
100 pNMute,
101 pRMute,
102 pAdmin,
103 pTester,
104 pSecondaryTask,
105 pMoney,
106 Float:pPositionX,
107 Float:pPositionY,
108 Float:pPositionZ,
109 Float:pFacingAngle,
110 pInterior,
111 pVirtualWorld,
112 pSkin,
113 Float:pHealth,
114 Float:pArmour,
115 pReport[128],
116 pLastUpdate,
117 PlayerAnimLibsPreloaded,
118 gPlayerUsingLoopingAnim,
119 CurrentDialog
120}
121new PlayerInfo[MAX_PLAYERS][pInfo];
122
123enum dInfo {
124 Float:dExteriorX,
125 Float:dExteriorY,
126 Float:dExteriorZ,
127 Float:dExteriorAngle,
128 dExteriorInt,
129 dExteriorVir,
130 Float:dInteriorX,
131 Float:dInteriorY,
132 Float:dInteriorZ,
133 Float:dInteriorAngle,
134 dInteriorInt,
135 dInteriorVir,
136 dName[64],
137 dPickup,
138 Text3D:dDynamicText
139}
140new DoorInfo[MAX_DOORS][dInfo];
141
142//------------------------------------------------------------------------------
143// FORWARDS
144//------------------------------------------------------------------------------
145// NIL
146//------------------------------------------------------------------------------
147// FUNCTIONS
148//------------------------------------------------------------------------------
149main()
150{
151 SendRconCommand("hostname "SERVER_NAME);
152 SendRconCommand("rcon_password "SERVER_RCON);
153 SendRconCommand("gamemodetext "SERVER_VERSION);
154 SendRconCommand("mapname "SERVER_MAP);
155 SendRconCommand("weburl "SERVER_WEBSITE);
156 SendRconCommand("password "SERVER_PASSWORD);
157 printf(""SERVER_NAME" ("SERVER_VERSION"), has been loaded successfully.");
158}
159//------------------------------------------------------------------------------
160// CALLBACKS
161//------------------------------------------------------------------------------
162public OnGameModeInit()
163{
164 AntiDeAMX();
165
166 Database = db_open("database.db");
167 new string[1024];
168 strcat(string, "CREATE TABLE IF NOT EXISTS Accounts(");
169 strcat(string, "UserID INTEGER PRIMARY KEY AUTOINCREMENT,");
170 strcat(string, "Username VARCHAR(24) COLLATE NOCASE,");
171 strcat(string, "Password VARCHAR(128),");
172 strcat(string, "IP VARCHAR(16),");
173 strcat(string, "Age INTEGER DEFAULT 0 NOT NULL,");
174 strcat(string, "Gender INTEGER DEFAULT 0 NOT NULL,");
175 strcat(string, "Registered INTEGER DEFAULT 0 NOT NULL,");
176 strcat(string, "Member INTEGER DEFAULT 0 NOT NULL,");
177 strcat(string, "Rank INTEGER DEFAULT 0 NOT NULL,");
178 strcat(string, "Leader INTEGER DEFAULT 0 NOT NULL,");
179 strcat(string, "Banned INTEGER DEFAULT 0 NOT NULL,");
180 strcat(string, "BanReason VARCHAR(64),");
181 strcat(string, "BanExpiry INTEGER DEFAULT 0 NOT NULL,");
182 strcat(string, "JailTime INTEGER DEFAULT 0 NOT NULL,");
183 strcat(string, "JailReason VARCHAR(64),");
184 strcat(string, "NMute INTEGER DEFAULT 0 NOT NULL,");
185 strcat(string, "RMute INTEGER DEFAULT 0 NOT NULL,");
186 strcat(string, "AdminLevel INTEGER DEFAULT 0 NOT NULL,");
187 strcat(string, "TesterLevel INTEGER DEFUALT 0 NOT NULL,");
188 strcat(string, "SecondaryTask INTEGER DEFAULT 0 NOT NULL,");
189 strcat(string, "Money INTEGER DEFAULT 0 NOT NULL,");
190 strcat(string, "PositionX FLOAT DEFAULT 0.0,");
191 strcat(string, "PositionY FLOAT DEFAULT 0.0,");
192 strcat(string, "PositionZ FLOAT DEFAULT 0.0,");
193 strcat(string, "FacingAngle FLOAT DEFAULT 0.0,");
194 strcat(string, "Interior INTEGER DEFAULT 0 NOT NULL,");
195 strcat(string, "VirtualWorld INTEGER DEFAULT 0 NOT NULL,");
196 strcat(string, "Health FLOAT DEFAULT 0.0,");
197 strcat(string, "Armour FLOAT DEFAULT 0.0,");
198 strcat(string, "Skin INTEGER DEFAULT 0 NOT NULL)");
199 db_query(Database, string);
200
201 format(string, sizeof(string), "");
202 strcat(string, "CREATE TABLE IF NOT EXISTS Doors(");
203 strcat(string, "TITLE VARCHAR(24),");
204 strcat(string, "EXTERIOR_POSX FLOAT DEFAULT 0.0,");
205 strcat(string, "EXTERIOR_POSY FLOAT DEFAULT 0.0,");
206 strcat(string, "EXTERIOR_POSZ FLOAT DEFAULT 0.0,");
207 strcat(string, "EXTERIOR_INT INTEGER DEFAULT 0 NOT NULL,");
208 strcat(string, "EXTERIOR_VW INTEGER DEFAULT 0 NOT NULL,");
209 strcat(string, "EXTERIOR_ANGLE FLOAT DEFAULT 0.0,");
210 strcat(string, "INTERIOR_POSX FLOAT DEFAULT 0.0,");
211 strcat(string, "INTERIOR_POSY FLOAT DEFAULT 0.0,");
212 strcat(string, "INTERIOR_POSZ FLOAT DEFAULT 0.0,");
213 strcat(string, "INTERIOR_INT INTEGER DEFAULT 0 NOT NULL,");
214 strcat(string, "INTERIOR_VW INTEGER DEFAULT 0 NOT NULL,");
215 strcat(string, "INTERIOR_ANGLE FLOAT DEFAULT 0.0)");
216 db_query(Database, string);
217
218 format(string, sizeof(string), "");
219 strcat(string, "CREATE TABLE IF NOT EXISTS Groups(");
220 strcat(string, "Name VARCHAR(24),");
221 strcat(string, "Type INTEGER DEFAULT 0 NOT NULL,");
222 strcat(string, "Rank0 INTEGER DEFAULT 0 NOT NULL,");
223 strcat(string, "Rank1 INTEGER DEFAULT 0 NOT NULL,");
224 strcat(string, "Rank2 INTEGER DEFAULT 0 NOT NULL,");
225 strcat(string, "Rank3 INTEGER DEFAULT 0 NOT NULL,");
226 strcat(string, "Rank4 INTEGER DEFAULT 0 NOT NULL,");
227 strcat(string, "Rank5 INTEGER DEFAULT 0 NOT NULL,");
228 strcat(string, "Rank6 INTEGER DEFAULT 0 NOT NULL)");
229 db_query(Database, string);
230
231 EnableStuntBonusForAll(0);
232 SetNameTagDrawDistance(15.0);
233 ShowPlayerMarkers(0);
234 DisableInteriorEnterExits();
235
236 LoadTextdraws();
237
238 gettime(WorldTime[0], WorldTime[1], WorldTime[2]);
239 SetWorldTime(WorldTime[0]);
240 return 1;
241}
242
243public OnGameModeExit()
244{
245 db_close(Database);
246 return 1;
247}
248
249public OnPlayerConnect(playerid)
250{
251 SetPlayerColor(playerid, COLOR_WHITE);
252 ResetPlayerVariables(playerid);
253 ClearScreen(playerid);
254 TogglePlayerSpectating(playerid, true);
255
256 SetPVarInt(playerid, "gLogged", 0);
257 SetPVarInt(playerid, "FailedLoginAttempt", 0);
258
259 // Remove every sprunk and vending machine
260 RemoveBuildingForPlayer(playerid, 955, 0, 0, 0, 25000);
261 RemoveBuildingForPlayer(playerid, 956, 0, 0, 0, 25000);
262
263 // Account loading and registering
264 new DBResult:dbresult, szQuery[128];
265 GetPlayerName(playerid, PlayerInfo[playerid][pUsername], MAX_PLAYER_NAME);
266 format(szQuery, sizeof(szQuery), "SELECT * FROM Accounts WHERE Username = '%s'", DB_Escape(PlayerInfo[playerid][pUsername]));
267 dbresult = db_query(Database, szQuery);
268 if(db_num_rows(dbresult) > 0) ShowPlayerDialogEx(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{F59207}"SERVER_NAME" -- LOGIN", "{FFFFFF}Bine ai revenit pe "SERVER_NAME".\nIntrodu-ti parola de la cont mai jos:", "-->", "<--");
269 else ShowPlayerDialogEx(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{F59207}"SERVER_NAME" -- REGISTER", "{FFFFFF}Bine ai venit pe "SERVER_NAME".\nTe rog introdu-ti o parola mai jos pentru a te putea inregistra:", "-->", "<--");
270 db_free_result(dbresult);
271 return 1;
272}
273
274public OnPlayerDisconnect(playerid, reason)
275{
276 SavePlayerAccount(playerid);
277 return 1;
278}
279
280public OnPlayerRequestClass(playerid, classid)
281{
282 if(!IsPlayerLogged(playerid)) return Kick(playerid);
283 SetSpawnInfo(playerid, NO_TEAM, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ], PlayerInfo[playerid][pFacingAngle], 0, 0, 0, 0, 0, 0);
284 SpawnPlayer(playerid);
285 return 1;
286}
287
288public OnPlayerSpawn(playerid)
289{
290 SetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
291 SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
292 SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
293 SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]);
294 SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
295 SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
296 SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
297 if(!PlayerInfo[playerid][PlayerAnimLibsPreloaded])
298 {
299 PreloadAnimLib(playerid);
300 PlayerInfo[playerid][PlayerAnimLibsPreloaded] = 1;
301 }
302 TogglePlayerControllable(playerid, true);
303 TextDrawHideForPlayer(playerid, BoxNotice);
304 TextDrawHideForPlayer(playerid, LoadingNotice);
305 return 1;
306}
307
308public OnPlayerDeath(playerid, killerid, reason)
309{
310 if(!PlayerInfo[playerid][gPlayerUsingLoopingAnim]) return 1;
311 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 0;
312 TextDrawHideForPlayer(playerid, StopAnim);
313 return 1;
314}
315
316public OnPlayerText(playerid, text[])
317{
318 new string[128];
319 format(string, sizeof(string), "%s says: %s", GetPlayerNameEx(playerid), text);
320 SetPlayerChatBubble(playerid, text, COLOR_WHITE, 20.0, 10000);
321 ProxDetector(20.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
322}
323
324public OnPlayerUpdate(playerid)
325{
326 PlayerInfo[playerid][pLastUpdate] = gettime();
327 return 1;
328}
329
330public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
331{
332 if(IsKeyJustDown(KEY_SPRINT, newkeys, oldkeys))
333 {
334 if(PlayerInfo[playerid][gPlayerUsingLoopingAnim])
335 {
336 StopLoopingAnim(playerid);
337 TextDrawHideForPlayer(playerid, StopAnim);
338 }
339 }
340 return 1;
341}
342
343public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
344{
345 if(PlayerInfo[playerid][CurrentDialog] != dialogid)
346 {
347 printf("%s may have attempted to spoof dialog ID %d, and has been kicked.", PlayerInfo[playerid][pUsername], dialogid);
348 return Kick(playerid);
349 }
350 switch(dialogid)
351 {
352 case DIALOG_REGISTER:
353 {
354 if(!response)
355 {
356 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Ai primit kick pentru ca nu ai completat rand-ul.");
357 Kick(playerid);
358 }
359 if(!IsValidPassword(inputtext))
360 {
361 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Parola este invalida. Incearca sa folosesti numai litere si numere." );
362 return ShowPlayerDialogEx(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{F59207}"SERVER_NAME" -- REGISTER", "{FFFFFF}Bine ai venit pe "SERVER_NAME".\nTe rog introdu-ti parola mai jos:", "-->", "<--");
363 }
364 if(strlen(inputtext) < 3 || strlen(inputtext) > 24)
365 {
366 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Parola trebuie sa fie intre 3 si 24 caractere!" );
367 return ShowPlayerDialogEx(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{F59207}"SERVER_NAME" -- REGISTER", "{FFFFFF}Bine ai venit pe "SERVER_NAME".\nTe rog introdu-ti parola mai jos:", "-->", "<---");
368 }
369 new szQuery[256];
370 format(szQuery, sizeof(szQuery), "INSERT INTO Accounts (Username, Password) VALUES ('%s', '%s')", DB_Escape(PlayerInfo[playerid][pUsername]), DB_Escape(HashInput(inputtext)));
371 db_query(Database, szQuery);
372 TogglePlayerSpectating(playerid, true);
373 SetPlayerInterior(playerid, 1);
374 SetPlayerCameraPos(playerid, 2.384830, 33.103397, 1199.849976);
375 SetPlayerCameraLookAt(playerid, 2.384830, 33.103397, 1199.849976);
376 SetTimerEx("aterizare", 5000, false, "i", playerid);
377 SendClientMessage(playerid, -1, "[DIFUZOARE AVION] Avionul aterizeaza in 5 minute. Va rugam sa va puneti centurile.");
378 }
379 case DIALOG_LOGIN:
380 {
381 if(!response)
382 {
383 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Ai primit kick ca n-ai raspuns.");
384 Kick(playerid);
385 }
386 new DBResult:dbresult, szQuery[256];
387 format(szQuery, sizeof(szQuery), "SELECT * FROM Accounts WHERE Username = '%s' AND Password = '%s'", DB_Escape(PlayerInfo[playerid][pUsername]), DB_Escape(HashInput(inputtext)));
388 dbresult = db_query(Database, szQuery);
389 if(db_num_rows(dbresult) > 0)
390 {
391 SetPVarInt(playerid, "gLogged", 1);
392 if(LoadPlayerAccount(playerid)) SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Te-ai logat.");
393 if(PlayerInfo[playerid][pRegistered] == 0) ShowPlayerDialogEx(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" - Age Selection", "{FFFFFF}You have just arrived in the famous City of "SERVER_MAP".\n{FFDD00}The Customs Officers{FFFFFF} are looking at your passport, and trying to identify you.\nHow old is your character? (Enter an age between the range of 18 and 80)", "Submit", "Quit");
394 else if(PlayerInfo[playerid][pBanned])
395 {
396 new string[128];
397 if(gettime() - PlayerInfo[playerid][pBanExpiry] > 0)
398 {
399 SendClientMessageEx(playerid, COLOR_WHITE, "Perioada ban-ului a trecut iar acum poti juca din nou.");
400 PlayerInfo[playerid][pBanned] = 0;
401 format(PlayerInfo[playerid][pBanReason], 64, "(null)");
402 PlayerInfo[playerid][pBanExpiry] = 0;
403 }
404 else
405 {
406 format(string, sizeof(string), "{FFFFFF}Contul tau este banat!\nNume: %s\nIP: %s\nMotiv: %s\nExpira: %s\n\nDaca crezi ca ai fost nedreptatit, poti face o reevaluare pe forum. ("SERVER_WEBSITE").", PlayerInfo[playerid][pUsername], PlayerInfo[playerid][pIP], PlayerInfo[playerid][pBanReason], gettimestamp(PlayerInfo[playerid][pBanExpiry], 3));
407 ShowPlayerDialogEx(playerid, DIALOG_BANINFO, DIALOG_STYLE_MSGBOX, "{FF0000}"SERVER_NAME" -- BAN", string, "<-->","");
408 Kick(playerid);
409 }
410 }
411 else
412 {
413 DeletePVar(playerid, "FailedLoginAttempt");
414 TextDrawShowForPlayer(playerid, BoxNotice);
415 TextDrawShowForPlayer(playerid, LoadingNotice);
416 TogglePlayerSpectating(playerid, false);
417 new score = (gettime() - PlayerInfo[playerid][pRegistered])/86400;
418 floatround(score, floatround_round);
419 SetPlayerScore(playerid, score);
420 if(PermissionCheck(playerid, 1))
421 {
422 new string[128];
423 format(string, sizeof(string), "SERVER: Te-ai logat ca %s.", GetAdminRank(playerid));
424 SendClientMessageEx(playerid, COLOR_WHITE, string);
425 format(string, sizeof(string), "SERVER: %s s-a logat ca %s.", GetPlayerNameEx(playerid), GetAdminRank(playerid));
426 SendAdminMessage(COLOR_WHITE, 4, string);
427 }
428 }
429 }
430 else
431 {
432 if(GetPVarInt(playerid, "FailedLoginAttempt") == 0)
433 {
434 SetPVarInt(playerid, "FailedLoginAttempt", 1);
435 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Parola incorecta. Trei incercari ramase.");
436 }
437 else if(GetPVarInt(playerid, "FailedLoginAttempt") == 1)
438 {
439 SetPVarInt(playerid, "FailedLoginAttempt", 2);
440 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Parola incorecta. Doua incercari ramase.");
441 }
442 else if(GetPVarInt(playerid, "FailedLoginAttempt") == 2)
443 {
444 SetPVarInt(playerid, "FailedLoginAttempt", 3);
445 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Parola incorecta. O incercare ramasa.");
446 }
447 else if(GetPVarInt(playerid, "FailedLoginAttempt") == 3)
448 {
449 DeletePVar(playerid, "FailedLoginAttempt");
450 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Ai gresit de 3 ori parola si ai primit kick.");
451 Kick(playerid);
452 }
453 ShowPlayerDialogEx(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{F59207}"SERVER_NAME" -- LOGIN", "{FFFFFF}Bine ai venit pe "SERVER_NAME".\nTe rog introdu-ti parola mai jos:", "-->", "<--");
454
455 }
456 db_free_result(dbresult);
457 }
458 case DIALOG_BANINFO: Kick(playerid);
459 case DIALOG_AGE:
460 {
461 if(!response)
462 {
463 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Ai primit kick pentru ca nu ai raspuns intrebairi.");
464 Kick(playerid);
465 }
466 new string[128];
467 if(strval(inputtext) < 5 || strval(inputtext) > 80)
468 {
469 SendClientMessageEx(playerid, COLOR_WHITE, "Varsta trebuie sa fie intre 5 si 80!");
470 return ShowPlayerDialogEx(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" -- VARSTA", "{FFFFFF}Ai ajuns in marele oras "SERVER_MAP". Personalul de la aeroport vrea sa stie ce varsta ai.(INTRE 5 si 80).\nIntrodu-ti varsta mai jos:", "-->", "<--");
471 }
472 PlayerInfo[playerid][pAge] = strval(inputtext);
473 format(string, sizeof(string), "{FFDD00}VARSTA CARACTERULUI:{FFFFFF} Ai %i ani.", PlayerInfo[playerid][pAge]);
474 SendClientMessageEx(playerid, COLOR_WHITE, string);
475
476 ShowPlayerDialogEx(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "{0000FF}"SERVER_NAME" -- GENUL CARACTERULUI", "Barbat\r\n{F593BA}Femeie", "-->", "<--");
477 }
478 case DIALOG_GENDER:
479 {
480 if(!response)
481 {
482 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Ai primit kick pentru ca nu ai raspuns la dialog.");
483 Kick(playerid);
484 }
485 switch(listitem)
486 {
487 case 0:
488 {
489 PlayerInfo[playerid][pGender] = 1;
490 SendClientMessageEx(playerid, COLOR_WHITE, "{FFDD00}GENUL CARACTERULUI:{FFFFFF} Caracterul tau este barbat.");
491 }
492 case 1:
493 {
494 PlayerInfo[playerid][pGender] = 2;
495 SendClientMessageEx(playerid, COLOR_WHITE, "{FFDD00}GENUL CARACTERULUI:{FFFFFF} Caracterul tau este femeie.");
496 }
497 }
498 ShowPlayerDialogEx(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" -- HAINE/CUSTOMIZARE", "{FFFFFF}Infatisarea caracterului tau inca este un mister.\nTe rog specifica ID-ul skin-ului tau.\n{FFFFFF}http://wiki.sa-mp.com/wiki/Skins:All, daca vrei sa vezi lita cu skin-uri.(1-299)", "-->", "<--");
499 }
500 case DIALOG_SKIN:
501 {
502 if(!response)
503 {
504 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Ai primit kick pentru ca nu ai raspuns.");
505 Kick(playerid);
506 }
507 if((strval(inputtext) >= 265 && strval(inputtext) <= 267) || (strval(inputtext) >= 274 && strval(inputtext) <= 288))
508 {
509 SendClientMessageEx(playerid, COLOR_WHITE, "Ai introdus un ID invalid ori un skin care nu este permis.");
510 return ShowPlayerDialogEx(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" -- HAINE/CUSTOMIZARE", "{FFFFFF}Infatisarea caracterului tau inca este un mister.\nTe rog specifica ID-ul skin-ului tau.\n{FFFFFF}http://wiki.sa-mp.com/wiki/Skins:All, daca vrei sa vezi lita cu skin-uri.(1-299)", "-->", "<--");
511 }
512 new string[128];
513 PlayerInfo[playerid][pSkin] = strval(inputtext);
514 SetPVarInt(playerid, "gLogged", 1);
515 TextDrawShowForPlayer(playerid, BoxNotice);
516 TextDrawShowForPlayer(playerid, LoadingNotice);
517 TogglePlayerSpectating(playerid, false);
518
519 // First spawn parameters
520 PlayerInfo[playerid][pRegistered] = gettime();
521 PlayerInfo[playerid][pPositionX] = 1734.563;
522 PlayerInfo[playerid][pPositionY] = -1951.414;
523 PlayerInfo[playerid][pPositionZ] = 14.117;
524 PlayerInfo[playerid][pFacingAngle] = 0.000;
525 PlayerInfo[playerid][pInterior] = 0;
526 PlayerInfo[playerid][pVirtualWorld] = 0;
527 PlayerInfo[playerid][pHealth] = 100.0;
528 PlayerInfo[playerid][pArmour] = 0.0;
529
530 ClearScreen(playerid);
531 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
532 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Welcome to "SERVER_MAP"!");
533 format(string, sizeof(string), "{FFDD00}Customs Officer:{FFFFFF} Asa cum apara si in pasaport, numele tau este %s, si ai %d ani.", GetPlayerNameEx(playerid), PlayerInfo[playerid][pAge]);
534 SendClientMessageEx(playerid, COLOR_WHITE, string);
535 format(string, sizeof(string), "{FFDD00}Customs Officer:{FFFFFF} Ai primit actele necesare pentru a putea sta in "SERVER_MAP" cat si un green-card.");
536 SendClientMessageEx(playerid, COLOR_WHITE, string);
537 format(string, sizeof(string), "{FFDD00}Customs Officer:{FFFFFF} Ai venit cu $500 in "SERVER_MAP".");
538 SendClientMessageEx(playerid, COLOR_WHITE, string);
539 format(string, sizeof(string), "{FFDD00}Customs Officer:{FFFFFF} De acum ai permisiunea sa stai in acest oras. O zi buna.");
540 SendClientMessageEx(playerid, COLOR_WHITE, string);
541 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
542 SetPlayerPos(playerid, 1734.563, -1951.414, 14.117);
543 SetPlayerHealth(playerid, 100);
544 }
545 }
546 return 1;
547}
548public OnPlayerCommandPerformed(playerid, cmdtext[], success)
549{
550 if(!success) return SendClientMessageEx(playerid, COLOR_WHITE, "You have entered an invalid command, please type /help for a list of valid commands.");
551 return 1;
552}
553forward aterizare(playerid);
554public aterizare(playerid)
555{
556 SetPlayerInterior(playerid, 14);
557 SetPlayerCameraLookAt(playerid, -1855.568725, 41.263156, 1061.143554);
558 SetPlayerCameraPos(playerid, -1855.568725, 41.263156, 1061.143554);
559 SendClientMessage(playerid, -1, "--> Avionul a aterizat. Personalul de la aeroport te va intreba mai multe lucruri despre datele personale.");
560 ShowPlayerDialogEx(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" -- PASAPORT", "{FFFFFF}"SERVER_MAP" este un oras mare.\nPersonalul de la aeroport vrea sa stie ce varsta ai.\nIntrodu mai jos varsta caracterului tau (intre 5 si 80):", "-->", "<--");
561}
562//------------------------------------------------------------------------------
563// COMMANDS
564//------------------------------------------------------------------------------
565CMD:setleader(playerid, params[])
566{
567 if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, -1, "Nu esti administrator.");
568 new targetid, factid;
569 if(sscanf(params, "ud", targetid, factid)) return SendClientMessage(playerid, -1, "SYNTAX: /setleader [playerid] [factionid]");
570 if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "ERROR: Jucatorul specificat nu este conectat.");
571 if(factid == PlayerInfo[playerid][pLeader]) return SendClientMessage(playerid, -1, "ERROR: Jucatorul specificat este deja lider la aceasta factiune.");
572 new playern[MAX_PLAYER_NAME], targetn[MAX_PLAYER_NAME], factname[35];
573 GetPlayerName(playerid, playern, sizeof(playern));
574 GetPlayerName(targetid, targetn, sizeof(targetn));
575 switch(factid)
576 {
577 case 1: factname = "Los Santos Police Department"; // Departament or Department?
578 case 2: factname = "Emergency Medical Services"; // 2. LSFD ?
579 case 3: factname = "Los Santos Government";
580 case 4: factname = "Los Santos News";
581 case 5: factname = "Los Santos Auto";
582 case 6: factname = "Unknown";
583 case 7: factname = "Unknown";
584 case 8: factname = "Unknown";
585 case 9: factname = "Unknown";
586 case 10: factname = "Unknown";
587 case 11: factname = "Unknown";
588 case 12: factname = "Unknown";
589 case 13: factname = "Unknown";
590 case 14: factname = "Unknown";
591 default:
592 {
593 SendClientMessage(playerid, -1, "Ai specificat un ID invalid de factiune. Minimul este 1 si maximul ete 16.");
594 SendClientMessage(playerid, -1, "Factiuni: 1. LSPD 2. LSFD 3. LSGOV 4. LSNEWS 5. LSA 6. Unknown 7. Unknown 8. Unknown 9. Unknown");
595 SendClientMessage(playerid, -1, "10. Unknown 11. Unknown 12. Unknown 13. Unknown 14. Unknown");
596 return 1;
597 }
598 }
599 new str[128];
600 format(str, 128, "{82C2FA}Ai fost promovat de catre %s ca lider %s!", playern, factname);
601 SendClientMessage(targetid, -1, str);
602 format(str, 128, "{82C2FA}L-ai promovat pe %s[ID: %d] ca lider %s!", targetn, targetid, factname);
603 SendClientMessage(playerid, -1, str);
604 PlayerInfo[targetid][pLeader] = factid;
605 return 1;
606}
607CMD:info(playerid, params[]) return cmd_information(playerid, params);
608CMD:information(playerid, params[])
609{
610 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
611 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" -- INFORMATII");
612 SendClientMessageEx(playerid, COLOR_WHITE, "SCRIPT VERSION: "SERVER_VERSION"");
613 SendClientMessageEx(playerid, COLOR_WHITE, "WEBSITE: "SERVER_WEBSITE"");
614 SendClientMessageEx(playerid, COLOR_WHITE, "TEAMSPEAK: "SERVER_TEAMSPEAK"");
615 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
616 return 1;
617}
618CMD:finvite(playerid, params[])
619{
620 return 1;
621}
622CMD:help(playerid, params[])
623{
624 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
625 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" -- HELP");
626 SendClientMessageEx(playerid, COLOR_WHITE, "GENERAL: /stats, /me, /do, /my, /amy, /ame, /report, /helpme - /newbie, /animlist, /admins, /testers");
627 SendClientMessageEx(playerid, COLOR_WHITE, "GENERAL: /shout, /low, /whisper, /enter, /exit");
628 SendClientMessageEx(playerid, COLOR_WHITE, "FACTION: /fon ; /f(action) ; /factionhelp");
629 SendClientMessageEx(playerid, COLOR_WHITE, "LEADER: /fkick, /finvite, /fsetrank, /leaderhelp");
630 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
631 return 1;
632}
633
634CMD:ah(playerid, params[])return cmd_ahelp(playerid, params);
635CMD:ahelp(playerid, params[])
636{
637 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
638 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
639 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Administrative Help");
640 if (PlayerInfo[playerid][pAdmin] == 1)
641 {
642 SendClientMessageEx(playerid, COLOR_WHITE, "As a {FFFF00}Server Moderator{FFFFFF}, you are to help players on /n(ewbie).");
643 SendClientMessageEx(playerid, COLOR_WHITE, "You are authorized to enforce the server rules punish players who break rules using the commands below:");
644 SendClientMessageEx(playerid, COLOR_WHITE, "{FFFF00}Server Moderator:{FFFFFF} /a, /kick, /jail, /nmute");
645 }
646 if(PlayerInfo[playerid][pAdmin] >= 2)
647 {
648 SendClientMessageEx(playerid, COLOR_WHITE, "{9370DB}Trial Admin{FFFFFF}: /a, /kick, /ban, /jail, /reports, /ar, /tr, /cr, /rmute, /gotoid, /gethere, gotoco");
649 }
650 if(PlayerInfo[playerid][pAdmin] >= 3)
651 {
652 SendClientMessageEx(playerid, COLOR_WHITE, "{7CFC00}Junior Admin{FFFFFF}: /setskin");
653 }
654 if(PlayerInfo[playerid][pAdmin] >= 4)
655 {
656 SendClientMessageEx(playerid, COLOR_WHITE, "{F4A460}Senior Admin{FFFFFF}: /unban, /ddcreate, /ddremove, /ddedit, /ddname");
657 }
658 if(PlayerInfo[playerid][pAdmin] >= 5)
659 {
660 SendClientMessageEx(playerid, COLOR_WHITE, "{FF0000}Lead Admin{FFFFFF}: /makeadmin");
661 }
662 SendClientMessageEx(playerid, COLOR_WHITE, "-------------------------------------------------------------------");
663 return 1;
664}
665
666CMD:report(playerid, params[])
667{
668 new string[128];
669 if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /report [text]");
670 else if(gettime() - PlayerInfo[playerid][pRMute] < 0 && !PermissionCheck(playerid, 2))
671 {
672 format(string, sizeof(string), "Please wait %i seconds before submitting another report.", PlayerInfo[playerid][pRMute] - gettime());
673 return SendClientMessageEx(playerid, COLOR_GREY, string);
674 }
675 else if(strlen(PlayerInfo[playerid][pReport]) > 0) return SendClientMessageEx(playerid, COLOR_GREY, "You already have an existing report, type /cancel report to cancel it.");
676 if(PermissionCheck(playerid, 1)) PlayerInfo[playerid][pRMute] = gettime() + 15;
677 else PlayerInfo[playerid][pRMute] = gettime() + 30;
678 format(PlayerInfo[playerid][pReport], 128, params);
679 format(string, sizeof(string), "{FFFF00}Report from %s (ID: %d): %s", GetPlayerNameEx(playerid), playerid, params);
680 SendAdminMessage(COLOR_YELLOW, 2, string);
681 SendClientMessageEx(playerid, COLOR_YELLOW, "Your report message has been sent to online administrators.");
682 return 1;
683}
684
685CMD:time(playerid, params[])
686{
687 new string[128], mtext[20], year, month, day;
688 getdate(year, month, day);
689 if(month == 1) { mtext = "January"; }
690 else if(month == 2) { mtext = "February"; }
691 else if(month == 3) { mtext = "March"; }
692 else if(month == 4) { mtext = "April"; }
693 else if(month == 5) { mtext = "May"; }
694 else if(month == 6) { mtext = "June"; }
695 else if(month == 7) { mtext = "July"; }
696 else if(month == 8) { mtext = "August"; }
697 else if(month == 9) { mtext = "September"; }
698 else if(month == 10) { mtext = "October"; }
699 else if(month == 11) { mtext = "November"; }
700 else if(month == 12) { mtext = "December"; }
701 format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, WorldTime[0], WorldTime[1]);
702 GameTextForPlayer(playerid, string, 5000, 1);
703 return 1;
704}
705
706CMD:me(playerid, params[])
707{
708 new string[128];
709 if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /me [action]");
710 format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), params);
711 ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
712 return 1;
713}
714
715CMD:do(playerid, params[])
716{
717 new string[128];
718 if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /do [action]");
719 else if (strlen(params) > 99)
720 {
721 format(string, sizeof(string), "The message cannot be more than 99 characters in length, please shorten it by %d characters.", strlen(params) - 99);
722 return SendClientMessageEx(playerid, COLOR_GREY, string);
723 }
724 format(string, sizeof(string), "%s (( %s ))", params, GetPlayerNameEx(playerid));
725 ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
726 return 1;
727}
728
729CMD:s(playerid, params[]) return cmd_shout(playerid, params);
730CMD:shout(playerid, params[])
731{
732 new string[128];
733 if(sscanf(params, "{s[128]}")) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /s(hout) [message]");
734 format(string, sizeof(string), "%s shouts: %s!", GetPlayerNameEx(playerid), params);
735 ProxDetector(30.0, playerid, string, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_FADE1, COLOR_FADE2);
736 return 1;
737}
738
739CMD:l(playerid, params[]) return cmd_low(playerid, params);
740CMD:low(playerid, params[])
741{
742 new string[128];
743 if(sscanf(params, "{s[128]}")) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /l(ocal) [message]");
744 format(string, sizeof(string), "%s quietly: %s", GetPlayerNameEx(playerid), params);
745 ProxDetector(5.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
746 return 1;
747}
748
749CMD:w(playerid, params[]) return cmd_whisper(playerid, params);
750CMD:whisper(playerid, params[])
751{
752 new string[128], message[128], targetid;
753 if(sscanf(params, "us[128]", targetid, message)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /w(hisper) [playerid] [message]");
754 else if(!IsPlayerConnectedEx(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
755 else if(!IsPlayerInRangeOfPlayer(playerid, targetid) && PlayerInfo[playerid][pAdmin] < 2) return SendClientMessageEx(playerid, COLOR_GREY, "You must be near the specified player to use this command!");
756 else if(playerid == targetid) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot use this command on yourself!");
757 format(string, sizeof(string), "(ID %d) %s whispers to you: %s", playerid, GetPlayerNameEx(playerid), message);
758 SendClientMessageEx(targetid, COLOR_YELLOW, string);
759 format(string, sizeof(string), "You whispered to (ID %d) %s: %s", targetid, GetPlayerNameEx(targetid), message);
760 SendClientMessageEx(playerid, COLOR_YELLOW, string);
761 return 1;
762}
763
764CMD:enter(playerid, params[])
765{
766 for(new i=0; i < MAX_DOORS; i++)
767 {
768 if(!IsPlayerInRangeOfPoint(playerid, 2.0, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]) && DoorInfo[i][dExteriorInt] == GetPlayerInterior(playerid) && DoorInfo[i][dExteriorVir] == GetPlayerVirtualWorld(playerid)) continue;
769 SetPlayerInterior(playerid, DoorInfo[i][dInteriorInt]);
770 SetPlayerVirtualWorld(playerid, DoorInfo[i][dInteriorVir]);
771 SetPlayerPos(playerid, DoorInfo[i][dInteriorX], DoorInfo[i][dInteriorY], DoorInfo[i][dInteriorZ]);
772 SetPlayerFacingAngle(playerid, DoorInfo[i][dInteriorAngle]);
773 SetCameraBehindPlayer(playerid);
774// LoadInterior(playerid);
775 }
776 return 1;
777}
778
779CMD:exit(playerid, params[])
780{
781 for(new i=0; i < MAX_DOORS; i++)
782 {
783 if(!IsPlayerInRangeOfPoint(playerid, 2.0, DoorInfo[i][dInteriorX], DoorInfo[i][dInteriorY], DoorInfo[i][dInteriorZ]) && DoorInfo[i][dInteriorInt] == GetPlayerInterior(playerid) && DoorInfo[i][dInteriorVir] == GetPlayerVirtualWorld(playerid)) continue;
784 SetPlayerInterior(playerid, DoorInfo[i][dExteriorInt]);
785 SetPlayerVirtualWorld(playerid, DoorInfo[i][dExteriorVir]);
786 SetPlayerPos(playerid, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]);
787 SetPlayerFacingAngle(playerid, DoorInfo[i][dExteriorAngle]);
788 SetCameraBehindPlayer(playerid);
789 }
790 return 1;
791}
792
793CMD:a(playerid, params[])return cmd_admin(playerid, params);
794CMD:admin(playerid, params[])
795{
796 new szMessage[128];
797 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
798 else if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: (/a)dmin [text]");
799 format(szMessage, sizeof(szMessage), "* %s: %s: %s", GetAdminRank(playerid), GetPlayerNameEx(playerid), params);
800 SendAdminMessage(COLOR_CYANBLUE, 1, szMessage);
801 return 1;
802}
803
804CMD:kick(playerid, params[])
805{
806 new targetid, reason[64], string[128];
807 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
808 else if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /kick [playerid] [reason]");
809 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
810 else if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot kick administrators of a higher rank.");
811 format(string, sizeof(string), "SERVER: %s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
812 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
813 format(string, sizeof(string), "%s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
814 Log("kick.txt", string);
815 Kick(targetid);
816 return 1;
817}
818
819CMD:jail(playerid, params[])
820{
821 new string[128], targetid, minutes, reason[64];
822 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
823 else if(sscanf(params, "uis[64]", targetid, minutes, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /jail [playerid] [minutes] [reason]");
824 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
825 else if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot jail an administrator higher than your rank!");
826 else if(minutes <= 0)
827 {
828 // Releasement from prison
829 format(string, sizeof(string), "SERVER: %s was released by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
830 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
831 format(string, sizeof(string), "%s was released by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
832 Log("jail.txt", string);
833
834 PlayerInfo[targetid][pJailTime] = 0;
835 format(PlayerInfo[playerid][pJailReason], 64, "(null");
836
837 SetPlayerPos(targetid, 1568.2250, -1693.5483, 5.8906);
838 SetPlayerFacingAngle(targetid, 177.0983);
839 SetPlayerInterior(targetid, 0);
840 SetPlayerVirtualWorld(targetid, 0);
841 }
842
843 format(string, sizeof(string), "SERVER: %s was jailed by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
844 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
845 format(string, sizeof(string), "%s was jailed by %s for %d minutes, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), minutes, reason);
846 Log("jail.txt", string);
847
848 PlayerInfo[targetid][pJailTime] = minutes;
849 format(PlayerInfo[playerid][pJailReason], 64, reason);
850/*
851 new jailPos = random(sizeof(JailPositions));
852 SetPlayerPos(targetid, JailPositions[jailPos][0], JailPositions[jailPos][1], JailPositions[jailPos][2]);
853 SetPlayerFacingAngle(targetid, 177.0983;
854 SetPlayerInteriorEx(targetid, 6);
855 SetPlayerVirtualWorldEx(targetid, 777);
856
857 ResetPlayerWeapons(targetid);
858 stop JailTimerEx[targetid];
859 JailTimerEx[targetid] = repeat JailTimer(targetid);
860 for(new i=0; i < 12; i++)
861 {
862 PlayerInfo[targetid][pWeapons][i] = 0;
863 }
864 TogglePlayerControllable(targetid, false);
865 SetPVarInt(targetid, "ActionRestriction", 1);
866 TextDrawShowForPlayer(targetid, LoadingObjectTextDraw);
867 TextDrawShowForPlayer(targetid, LoadingObjectBox);
868 defer HideLoadingTextdraws(targetid);
869
870 TextDrawShowForPlayer(targetid, JailTimerTD[targetid]);
871 */
872 return 1;
873}
874
875CMD:ban(playerid, params[])
876{
877 new targetid, string[128], reason[64], days;
878 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
879 else if(sscanf(params, "uis[64]", targetid, days, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ban [playerid] [days] [reason]");
880 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
881 format(string, sizeof(string), "SERVER: %s was banned by %s for %d days, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), days, reason);
882 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
883 format(string, sizeof(string), "%s was banned by %s for %d days, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), days, reason);
884 Log("ban.txt", string);
885 BanPlayerEx(targetid, reason, days);
886 return 1;
887}
888
889CMD:unban(playerid, params[])
890{
891 new target[MAX_PLAYER_NAME], string[128], reason[64];
892 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
893 else if(sscanf(params, "s[24]s[64]", target, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /unban [playername] [reason]");
894 else if(!UnbanPlayerEx(target)) return SendClientMessageEx(playerid, COLOR_GREY, "The specified player could not be found in the ban database, please check the name for any typos.");
895 format(string, sizeof(string), "SERVER: %s was unbanned by %s,reason: %s", target, GetPlayerNameEx(playerid), reason);
896 SendAdminMessage(COLOR_LIGHTRED, 2, string);
897 format(string, sizeof(string), "%s was unbanned by %s, reason: %s", target, GetPlayerNameEx(playerid));
898 Log("ban.txt", string);
899 return 1;
900}
901
902CMD:setskin(playerid,params[])
903{
904 new string[128], targetid, skin;
905 if(!PermissionCheck(playerid, 3)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
906 else if(sscanf(params, "ud", targetid, skin)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /setskin [playerid] [skin]");
907 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
908 else if(skin < 0 || skin > 299) return SendClientMessageEx(playerid, COLOR_GREY, "Please select a skin in between the range 0 to 299.");
909 PlayerInfo[targetid][pSkin] = skin;
910 SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]);
911 SendClientMessageEx(targetid, COLOR_GREY, "An administrator has changed your skin.");
912 SendClientMessageEx(playerid, COLOR_GREY, "You have changed the skin of the specified player.");
913 format(string, sizeof(string), "%s has changed %s's skin to %d.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), skin);
914 Log("skin.txt", string);
915 return 1;
916}
917
918CMD:gotoid(playerid,params[])
919{
920 new targetid, Float:Position[3];
921 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
922 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /gotoid [playerid]");
923 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
924 else if(targetid == playerid) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot use this command on yourself!");
925 GetPlayerPos(targetid, Position[0], Position[1], Position[2]);
926 SetPlayerInterior(playerid, GetPlayerInterior(targetid));
927 SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
928 SetPlayerPos(playerid, Position[0] + 1, Position[1], Position[2]);
929 SendClientMessageEx(playerid, COLOR_GREY, "You have teleported to the specified player.");
930 return 1;
931}
932
933CMD:gethere(playerid,params[])
934{
935 new targetid, Float:Position[3];
936 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
937 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /gethere [playerid]");
938 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
939 else if(targetid == playerid) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot use this command on yourself!");
940 if(IsPlayerInAnyVehicle(targetid))
941 {
942 RemovePlayerFromVehicle(targetid);
943 ClearAnimations(targetid);
944 }
945 GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
946 SetPlayerInterior(targetid, GetPlayerInterior(playerid));
947 SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid));
948 SetPlayerPos(targetid, Position[0], Position[1], Position[2]);
949 SendClientMessageEx(targetid, COLOR_FADE1, "You have been teleported!");
950 SendClientMessageEx(playerid, COLOR_GREY, "You have teleported the specified player to your location.");
951 return 1;
952}
953
954CMD:gotoco(playerid,params[])
955{
956 new Float:x,Float:y,Float:z,i;
957 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
958 else if(sscanf(params,"fffi",x,y,z,i)) return SendClientMessageEx(playerid,COLOR_GREY,"Usage: /gotoco [xcoord] [ycoord] [zcoord] [interior]");
959 SetPlayerInterior(playerid, i);
960 SetPlayerPos(playerid,x,y,z);
961 SendClientMessageEx(playerid, COLOR_GREY, "You have teleported to the specified coordinates.");
962 return 1;
963}
964
965CMD:reports(playerid, params[])
966{
967 new string[128], reportCount;
968 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
969 SendClientMessageEx(playerid, COLOR_WHITE, "-------------------------------------------------------------------------------------------------------------------------------");
970 foreach(Player, i)
971 {
972 if(strlen(PlayerInfo[i][pReport]) > 0)
973 {
974 format(string, sizeof(string), "Report from %s (ID: %d): %s", GetPlayerNameEx(i), i, PlayerInfo[i][pReport]);
975 SendClientMessageEx(playerid, COLOR_YELLOW, string);
976 reportCount++;
977 }
978 }
979 if(reportCount != 0)
980 {
981 format(string, sizeof(string), "Active Reports: %d", reportCount);
982 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
983 }
984 else SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "There are no reports available at the moment.");
985 SendClientMessageEx(playerid, COLOR_WHITE, "-------------------------------------------------------------------------------------------------------------------------------");
986 return 1;
987}
988
989CMD:ar(playerid, params[])
990{
991 new string[128], targetid;
992 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
993 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ar [playerid]");
994 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
995 else if(strlen(PlayerInfo[targetid][pReport]) == 0) return SendClientMessageEx(playerid, COLOR_GREY, "There is no active report from that player at the moment.");
996 format(string, sizeof(string), "SERVER: %s has accepted the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid));
997 SendAdminMessage(COLOR_YELLOW, 2, string);
998 format(string, sizeof(string), "%s has accepted your report and is now reviewing it. Please be patient till you are contacted.", GetPlayerNameEx(playerid));
999 SendClientMessageEx(targetid, COLOR_WHITE, string);
1000 format(PlayerInfo[targetid][pReport], 128, "");
1001 return 1;
1002}
1003CMD:tr(playerid, params[])
1004{
1005 new string[128], targetid;
1006 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1007 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /tr [playerid]");
1008 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
1009 else if(strlen(PlayerInfo[targetid][pReport]) == 0) return SendClientMessageEx(playerid, COLOR_GREY, "There is no active report from that player at the moment.");
1010 format(string, sizeof(string), "SERVER: %s has trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid));
1011 SendAdminMessage(COLOR_YELLOW, 2, string);
1012 format(string, sizeof(string), "%s has trashed your report and it will not be reviewed. Please refrain from misusing the report command.", GetPlayerNameEx(playerid));
1013 SendClientMessageEx(targetid, COLOR_WHITE, string);
1014 format(PlayerInfo[targetid][pReport], 128, "");
1015 return 1;
1016}
1017
1018CMD:nmute(playerid, params[])
1019{
1020 new targetid, minutes, reason[64], string[128];
1021 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1022 else if(sscanf(params, "uis[64]", targetid, minutes, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /nmute [playerid] [minutes] [reason]");
1023 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
1024 else if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot mute administrators of a higher rank.");
1025 else if(minutes <= 5 && minutes >= 15 && PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot mute someone for less than 5 minutes or more than 15 minutes.");
1026 if(minutes <= 0 && PermissionCheck(playerid, 2))
1027 {
1028 PlayerInfo[targetid][pNMute] = 0;
1029 format(string, sizeof(string), "You have unmuted %s from the newbie chat, reason: %s.", GetPlayerNameEx(targetid), reason);
1030 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1031 format(string, sizeof(string), "You have been unmuted from the newbie chat by %s, reason: %s.", GetPlayerNameEx(playerid), reason);
1032 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1033 format(string, sizeof(string), "%s was unmuted from the newbie chat by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
1034 Log("mute.txt", string);
1035 return 1;
1036 }
1037 PlayerInfo[targetid][pNMute] = gettime() + minutes*60;
1038 format(string, sizeof(string), "You have muted %s from the newbie chat for %d minutes, reason: %s.", GetPlayerNameEx(targetid), minutes, reason);
1039 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1040 format(string, sizeof(string), "You have been muted from the newbie chat by %s for %d minutes, reason: %s.", GetPlayerNameEx(playerid), minutes, reason);
1041 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1042 format(string, sizeof(string), "SERVER: %s was muted from the newbie chat by %s due to abuse.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid));
1043 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
1044 format(string, sizeof(string), "%s was muted from the newbie chat by %s for %d minutes, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), minutes, reason);
1045 Log("mute.txt", string);
1046 return 1;
1047}
1048
1049CMD:rmute(playerid, params[])
1050{
1051 new targetid, minutes, reason[64], string[128];
1052 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1053 else if(sscanf(params, "uis[64]", targetid, minutes, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /rmute [playerid] [minutes] [reason]");
1054 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
1055 else if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot mute administrators of a higher rank.");
1056 else if(minutes <= 5 && minutes >= 15 && PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot mute someone for less than 5 minutes or more than 15 minutes.");
1057 if(minutes <= 0 && PermissionCheck(playerid, 2))
1058 {
1059 PlayerInfo[targetid][pRMute] = 0;
1060 format(string, sizeof(string), "You have unmuted %s from using reports, reason: %s.", GetPlayerNameEx(targetid), reason);
1061 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1062 format(string, sizeof(string), "You have been unmuted from using reports by %s, reason: %s.", GetPlayerNameEx(playerid), reason);
1063 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1064 format(string, sizeof(string), "SERVER: %s was unmuted from using reports by %s.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid));
1065 SendAdminMessage(COLOR_YELLOW, 2, string);
1066 format(string, sizeof(string), "%s was unmuted from using reports by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
1067 Log("mute.txt", string);
1068 return 1;
1069 }
1070 PlayerInfo[targetid][pRMute] = gettime() + minutes*60;
1071 format(string, sizeof(string), "You have muted %s from using reports for %d minutes, reason: %s.", GetPlayerNameEx(targetid), minutes, reason);
1072 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1073 format(string, sizeof(string), "You have been muted from using reports by %s for %d minutes, reason: %s.", GetPlayerNameEx(playerid), minutes, reason);
1074 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1075 format(string, sizeof(string), "SERVER: %s was muted from using reports by %s due to abuse.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid));
1076 SendAdminMessage(COLOR_YELLOW, 2, string);
1077 format(string, sizeof(string), "%s was muted from using reports by %s for %d minutes, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), minutes, reason);
1078 Log("mute.txt", string);
1079 return 1;
1080}
1081
1082CMD:makeadmin(playerid, params[])
1083{
1084 new targetid, level, string[128];
1085 if(!PermissionCheck(playerid, 5) && !IsPlayerAdmin(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1086 else if(sscanf(params, "ui", targetid, level)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /makeadmin [playerid] [0-5]");
1087 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
1088 else if(level < 0 || level > 5) return SendClientMessageEx(playerid, COLOR_GREY, "You have enter an invalid administrator level.");
1089 PlayerInfo[targetid][pAdmin] = level;
1090 format(string, sizeof(string), "* You have been made a %s by %s %s.", GetAdminRank(targetid), GetAdminRank(playerid), GetPlayerNameEx(playerid));
1091 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1092 format(string, sizeof(string), "You have made %s a %s.", GetPlayerNameEx(targetid), GetAdminRank(targetid));
1093 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1094 return 1;
1095}
1096
1097CMD:ddcreate(playerid, params[])
1098{
1099 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1100 else if(sscanf(params, "{s[64]}")) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddcreate [name]");
1101 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
1102 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
1103 CreateDoor(params, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), PlayerInfo[playerid][pFacingAngle]);
1104 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: You have created and placed a new dynamic door.");
1105 return 1;
1106}
1107
1108CMD:ddremove(playerid, params[])
1109{
1110 new value;
1111 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1112 else if(sscanf(params, "i", value)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddremove [id]");
1113 else if(value >= MAX_DOORS) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1114 else if(DoorInfo[value][dExteriorX] == 0 && DoorInfo[value][dExteriorY] == 0 && DoorInfo[value][dExteriorZ] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1115 DeleteDoor(DoorInfo[value][dExteriorX], DoorInfo[value][dExteriorY]);
1116 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: You have deleted the specified Dynamic Door.");
1117 return 1;
1118}
1119
1120CMD:ddname(playerid, params[])
1121{
1122 new DoorID, NewName[64], string[128];
1123 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1124 else if(sscanf(params, "is[64]", DoorID, NewName)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddname [id] [name]");
1125 else if(DoorID >= MAX_DOORS) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1126 else if(DoorInfo[DoorID][dExteriorX] == 0 && DoorInfo[DoorID][dExteriorY] == 0 && DoorInfo[DoorID][dExteriorZ] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1127 format(string, sizeof(string), "UPDATE `Doors` SET `TITLE`='%s' WHERE `EXTERIOR_POSX`='%f' AND `EXTERIOR_POSY`='%f'", NewName, DoorInfo[DoorID][dExteriorX], DoorInfo[DoorID][dExteriorY]);
1128 db_free_result(db_query(Database, string));
1129 ReloadDoors();
1130 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: You have modified the specified door's title.");
1131 return 1;
1132}
1133
1134CMD:ddedit(playerid, params[])
1135{
1136 new option[32], value, string[256];
1137 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
1138 else if(sscanf(params, "is[32]", value, option)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddedit [doorid] [interior, exterior]");
1139 else if(value >= MAX_DOORS) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1140 else if(DoorInfo[value][dExteriorX] == 0 && DoorInfo[value][dExteriorY] == 0 && DoorInfo[value][dExteriorZ] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1141 if(!strcmp(option, "interior", true))
1142 {
1143 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
1144 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
1145 format(string, sizeof(string), "UPDATE `Doors` SET `INTERIOR_POSX`='%f',`INTERIOR_POSY`='%f',`INTERIOR_POSZ`='%f',`INTERIOR_INT`='%i',`INTERIOR_VW`='%i',`INTERIOR_ANGLE`='%i' WHERE `EXTERIOR_POSX`='%f' AND `EXTERIOR_POSY`='%f'", PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), PlayerInfo[playerid][pFacingAngle], DoorInfo[value][dExteriorX], DoorInfo[value][dExteriorY]);
1146 db_free_result(db_query(Database, string));
1147 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: You have modified the specified door's interior.");
1148 }
1149 else if(!strcmp(option, "exterior", true))
1150 {
1151 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
1152 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
1153 format(string, sizeof(string), "UPDATE `Doors` SET `EXTERIOR_POSX`='%f',`EXTERIOR_POSY`='%f',`EXTERIOR_POSZ`='%f',`EXTERIOR_INT`='%i',`EXTERIOR_VW`='%i',`EXTERIOR_ANGLE`='%i' WHERE `EXTERIOR_POSX`='%f' AND `EXTERIOR_POSY`='%f'", PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), PlayerInfo[playerid][pFacingAngle], DoorInfo[value][dExteriorX], DoorInfo[value][dExteriorY]);
1154 db_free_result(db_query(Database, string));
1155 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: You have modified the specified door's exterior position.");
1156 }
1157 else return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddedit [doorid] [interior, exterior]");
1158 ReloadDoors();
1159 return 1;
1160}
1161
1162CMD:anims(playerid, params[]) return cmd_animhelp(playerid, params);
1163CMD:animhelp(playerid, params[])
1164{
1165 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
1166 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Animations");
1167 SendClientMessageEx(playerid, COLOR_WHITE, "/handsup /drunk /bomb /rob /laugh /lookout /robman /crossarms /sit /siteat /hide /vomit /eat");
1168 SendClientMessageEx(playerid, COLOR_WHITE, "/wave /slapass /deal /taichi /crack /smoke /chat /dance /fucku /drinkwater /pedmove /bat");
1169 SendClientMessageEx(playerid, COLOR_WHITE, "/checktime /sleep /blob /opendoor /wavedown /shakehand /reload /cpr /dive /showoff /box /tag");
1170 SendClientMessageEx(playerid, COLOR_WHITE, "/goggles /cry /dj /cheer /throw /robbed /hurt /nobreath /bar /getjiggy /fallover /rap /piss");
1171 SendClientMessageEx(playerid, COLOR_WHITE, "/salute /crabs /washhands /signal /stop /gesture /jerkoff /idles /lowrider /car");
1172 SendClientMessageEx(playerid, COLOR_WHITE, "/blowjob /spank /sunbathe /kiss /snatch /sneak /copa /sexy /holdup /misc /bodypush /walkstyle");
1173 SendClientMessageEx(playerid, COLOR_WHITE, "/lowbodypush /headbutt /airkick /doorkick /leftslap /elbow /coprun /sitonchair /lean /wank");
1174 SendClientMessageEx(playerid, COLOR_GREY, "Use /stopanim to clear your animations.");
1175 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
1176 return 1;
1177}
1178
1179CMD:stopanim(playerid, params[])
1180{
1181 if(GetPVarInt(playerid, "ActionRestriction") == 1)
1182 {
1183 SendClientMessageEx(playerid, COLOR_GREY, "You can't do that at this time!");
1184 return 1;
1185 }
1186 if(IsPlayerInAnyVehicle(playerid) == 1)
1187 {
1188 SendClientMessageEx(playerid, COLOR_GREY, "This command requires you to be outside a vehicle.");
1189 return 1;
1190 }
1191 ClearAnimations(playerid);
1192 SetPlayerSkin(playerid, GetPlayerSkin(playerid));
1193 SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
1194 return 1;
1195}
1196
1197CMD:bodypush(playerid, params[])
1198{
1199 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1200 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1201 ApplyAnimation(playerid,"GANGS","shake_cara",4.0,0,0,0,0,0);
1202 return 1;
1203}
1204
1205CMD:lowbodypush(playerid, params[])
1206{
1207 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1208 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1209 ApplyAnimation(playerid,"GANGS","shake_carSH",4.0,0,0,0,0,0);
1210 return 1;
1211}
1212
1213CMD:headbutt(playerid, params[])
1214{
1215 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1216 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1217 ApplyAnimation(playerid,"WAYFARER","WF_Fwd",4.0,0,0,0,0,0);
1218 return 1;
1219}
1220
1221CMD:airkick(playerid, params[])
1222{
1223 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1224 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1225 ApplyAnimation(playerid,"FIGHT_C","FightC_M",4.0,0,1,1,0,0);
1226 return 1;
1227}
1228
1229CMD:doorkick(playerid, params[])
1230{
1231 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1232 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1233 ApplyAnimation(playerid,"POLICE","Door_Kick",4.0,0,0,0,0,0);
1234 return 1;
1235}
1236
1237CMD:leftslap(playerid, params[])
1238{
1239 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1240 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1241 ApplyAnimation(playerid,"PED","BIKE_elbowL",4.0,0,0,0,0,0);
1242 return 1;
1243}
1244
1245CMD:elbow(playerid, params[])
1246{
1247 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1248 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1249 ApplyAnimation(playerid,"FIGHT_D","FightD_3",4.0,0,1,1,0,0);
1250 return 1;
1251}
1252
1253CMD:coprun(playerid, params[])
1254{
1255 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1256 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1257 ApplyAnimation(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
1258 return 1;
1259}
1260
1261CMD:handsup(playerid, params[])
1262{
1263 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1264 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1265 SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
1266 return 1;
1267}
1268
1269CMD:piss(playerid, params[])
1270{
1271 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1272 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1273 SetPlayerSpecialAction(playerid, 68);
1274 return 1;
1275}
1276
1277CMD:sneak(playerid, params[])
1278{
1279 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1280 LoopingAnim(playerid, "PED", "Player_Sneak", 4.1, 1, 1, 1, 1, 1, 1);
1281 return 1;
1282}
1283
1284CMD:drunk(playerid, params[])
1285{
1286 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1287 LoopingAnim(playerid, "PED", "WALK_DRUNK", 4.0, 1, 1, 1, 1, 1, 1);
1288 return 1;
1289}
1290
1291CMD:bomb(playerid, params[])
1292{
1293 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1294 PlayAnim(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0, 1);
1295 return 1;
1296}
1297
1298CMD:rob(playerid, params[])
1299{
1300 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1301 LoopingAnim(playerid, "ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 1, 1);
1302 return 1;
1303}
1304
1305CMD:laugh(playerid, params[])
1306{
1307 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1308 LoopingAnim(playerid, "RAPPING", "Laugh_01", 4.0, 1, 0, 0, 0, 0, 1);
1309 return 1;
1310}
1311
1312CMD:lookout(playerid, params[])
1313{
1314 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1315 PlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0, 1);
1316 return 1;
1317}
1318
1319CMD:robman(playerid, params[])
1320{
1321 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1322 LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0, 1);
1323 return 1;
1324}
1325
1326CMD:hide(playerid, params[])
1327{
1328 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1329 LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0, 1);
1330 return 1;
1331}
1332
1333CMD:vomit(playerid, params[])
1334{
1335 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1336 LoopingAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 1, 0, 0, 0, 0, 1);
1337 return 1;
1338}
1339
1340CMD:eat(playerid, params[])
1341{
1342 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1343 LoopingAnim(playerid, "FOOD", "EAT_Burger", 3.0, 1, 0, 0, 0, 0, 1);
1344 return 1;
1345}
1346
1347CMD:slapass(playerid, params[])
1348{
1349 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1350 PlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0, 1);
1351 return 1;
1352}
1353
1354CMD:crack(playerid, params[])
1355{
1356 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1357 LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
1358 return 1;
1359}
1360
1361CMD:fucku(playerid, params[])
1362{
1363 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1364 PlayAnim(playerid, "PED", "fucku", 4.0, 0, 0, 0, 0, 0, 1);
1365 return 1;
1366}
1367
1368CMD:taichi(playerid, params[])
1369{
1370 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1371 LoopingAnim(playerid, "PARK", "Tai_Chi_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1372 return 1;
1373}
1374
1375CMD:drinkwater(playerid, params[])
1376{
1377 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1378 LoopingAnim(playerid, "BAR", "dnk_stndF_loop", 4.0, 1, 0, 0, 0, 0, 1);
1379 return 1;
1380}
1381
1382CMD:checktime(playerid, params[])
1383{
1384 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1385 PlayAnim(playerid, "COP_AMBIENT", "Coplook_watch", 4.0, 0, 0, 0, 0, 0, 1);
1386 return 1;
1387}
1388
1389CMD:sleep(playerid, params[])
1390{
1391 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1392 LoopingAnim(playerid, "CRACK", "crckdeth4", 4.0, 0, 1, 1, 1, 0, 1);
1393 return 1;
1394}
1395
1396CMD:blob(playerid, params[])
1397{
1398 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1399 LoopingAnim(playerid, "CRACK", "crckidle1", 4.0, 0, 1, 1, 1, 0, 1);
1400 return 1;
1401}
1402
1403CMD:opendoor(playerid, params[])
1404{
1405 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1406 PlayAnim(playerid, "AIRPORT", "thrw_barl_thrw", 4.0, 0, 0, 0, 0, 0, 1);
1407 return 1;
1408}
1409
1410CMD:wavedown(playerid, params[])
1411{
1412 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1413 PlayAnim(playerid, "BD_FIRE", "BD_Panic_01", 4.0, 0, 0, 0, 0, 0, 1);
1414 return 1;
1415}
1416
1417CMD:cpr(playerid, params[])
1418{
1419 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1420 PlayAnim(playerid, "MEDIC", "CPR", 4.0, 0, 0, 0, 0, 0, 1);
1421 return 1;
1422}
1423
1424CMD:dive(playerid, params[])
1425{
1426 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1427 LoopingAnim(playerid, "DODGE", "Crush_Jump", 4.0, 0, 1, 1, 1, 0, 1);
1428 return 1;
1429}
1430
1431CMD:showoff(playerid, params[])
1432{
1433 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1434 LoopingAnim(playerid, "Freeweights", "gym_free_celebrate", 4.0, 1, 0, 0, 0, 0, 1);
1435 return 1;
1436}
1437
1438CMD:goggles(playerid, params[])
1439{
1440 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1441 PlayAnim(playerid, "goggles", "goggles_put_on", 4.0, 0, 0, 0, 0, 0, 1);
1442 return 1;
1443}
1444
1445CMD:cry(playerid, params[])
1446{
1447 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1448 LoopingAnim(playerid, "GRAVEYARD", "mrnF_loop", 4.0, 1, 0, 0, 0, 0, 1);
1449 return 1;
1450}
1451
1452CMD:throw(playerid, params[])
1453{
1454 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1455 PlayAnim(playerid, "GRENADE", "WEAPON_throw", 4.0, 0, 0, 0, 0, 0, 1);
1456 return 1;
1457}
1458
1459CMD:robbed(playerid, params[])
1460{
1461 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1462 LoopingAnim(playerid, "SHOP", "SHP_Rob_GiveCash", 4.0, 1, 0, 0, 0, 0, 1);
1463 return 1;
1464}
1465
1466CMD:hurt(playerid, params[])
1467{
1468 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1469 LoopingAnim(playerid, "SWAT", "gnstwall_injurd", 4.0, 1, 0, 0, 0, 0, 1);
1470 return 1;
1471}
1472
1473CMD:box(playerid, params[])
1474{
1475 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1476 LoopingAnim(playerid, "GYMNASIUM", "GYMshadowbox", 4.0, 1, 0, 0, 0, 0, 1);
1477 return 1;
1478}
1479
1480CMD:washhands(playerid, params[])
1481{
1482 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1483 LoopingAnim(playerid, "BD_FIRE", "wash_up", 4.0, 1, 0, 0, 0, 0, 1);
1484 return 1;
1485}
1486
1487CMD:crabs(playerid, params[])
1488{
1489 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1490 LoopingAnim(playerid, "MISC", "Scratchballs_01", 4.0, 1, 0, 0, 0, 0, 1);
1491 return 1;
1492}
1493
1494CMD:salute(playerid, params[])
1495{
1496 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1497 LoopingAnim(playerid, "ON_LOOKERS", "Pointup_loop", 4.0, 1, 0, 0, 0, 0, 1);
1498 return 1;
1499}
1500
1501CMD:jerkoff(playerid, params[])
1502{
1503 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1504 LoopingAnim(playerid, "PAULNMAC", "wank_out", 4.0, 1, 0, 0, 0, 0, 1);
1505 return 1;
1506}
1507
1508CMD:stop(playerid, params[])
1509{
1510 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1511 LoopingAnim(playerid, "PED", "endchat_01", 4.0, 1, 0, 0, 0, 0, 1);
1512 return 1;
1513}
1514
1515CMD:rap(playerid, params[])
1516{
1517 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1518 switch(strval(params))
1519 {
1520 case 1: LoopingAnim(playerid, "RAPPING", "RAP_A_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1521 case 2: LoopingAnim(playerid, "RAPPING", "RAP_B_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1522 case 3: LoopingAnim(playerid, "RAPPING", "RAP_C_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1523 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /rap [1-3]");
1524 }
1525 return 1;
1526}
1527
1528CMD:wank(playerid, params[])
1529{
1530 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1531 switch(strval(params))
1532 {
1533 case 1: LoopingAnim(playerid, "PAULNMAC", "wank_in", 4.0, 1, 0, 0, 0, 0, 1);
1534 case 2: LoopingAnim(playerid, "PAULNMAC", "wank_loop", 4.0, 1, 0, 0, 0, 0, 1);
1535 case 3: LoopingAnim(playerid, "PAULNMAC", "wank_out", 4.0, 1, 0, 0, 0, 0, 1);
1536 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /wank [1-3]");
1537 }
1538 return 1;
1539}
1540
1541CMD:chat(playerid, params[])
1542{
1543 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1544 switch(strval(params))
1545 {
1546 case 1: LoopingAnim(playerid, "PED", "IDLE_CHAT", 4.0, 1, 0, 0, 0, 0, 1);
1547 case 2: LoopingAnim(playerid, "GANGS", "prtial_gngtlkA", 4.0, 1, 0, 0, 0, 0, 1);
1548 case 3: LoopingAnim(playerid, "GANGS", "prtial_gngtlkB", 4.0, 1, 0, 0, 0, 0, 1);
1549 case 4: LoopingAnim(playerid, "GANGS", "prtial_gngtlkE", 4.0, 1, 0, 0, 0, 0, 1);
1550 case 5: LoopingAnim(playerid, "GANGS", "prtial_gngtlkF", 4.0, 1, 0, 0, 0, 0, 1);
1551 case 6: LoopingAnim(playerid, "GANGS", "prtial_gngtlkG", 4.0, 1, 0, 0, 0, 0, 1);
1552 case 7: LoopingAnim(playerid, "GANGS", "prtial_gngtlkH", 4.0, 1, 0, 0, 0, 0, 1);
1553 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /chat [1-7]");
1554 }
1555 return 1;
1556}
1557
1558CMD:sitdown(playerid, params[]) return cmd_sitonchair(playerid, params);
1559CMD:sitonchair(playerid, params[])
1560{
1561 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1562 switch(strval(params))
1563 {
1564 case 1: LoopingAnim(playerid, "Attractors", "Stepsit_in", 4.0, 0, 0, 0, 1, 0, 1);
1565 case 2: LoopingAnim(playerid, "CRIB", "PED_Console_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1566 case 3: LoopingAnim(playerid, "INT_HOUSE", "LOU_In", 4.0, 0, 0, 0, 1, 1, 1);
1567 case 4: LoopingAnim(playerid, "MISC", "SEAT_LR", 4.0, 1, 0, 0, 0, 0, 1);
1568 case 5: LoopingAnim(playerid, "MISC", "Seat_talk_01", 4.0, 1, 0, 0, 0, 0, 1);
1569 case 6: LoopingAnim(playerid, "MISC", "Seat_talk_02", 4.0, 1, 0, 0, 0, 0, 1);
1570 case 7: LoopingAnim(playerid, "ped", "SEAT_down", 4.0, 0, 0, 0, 1, 1, 1);
1571 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sitonchair [1-7]");
1572 }
1573 return 1;
1574}
1575
1576CMD:bat(playerid, params[])
1577{
1578 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1579 switch(strval(params))
1580 {
1581 case 1: LoopingAnim(playerid,"BASEBALL","Bat_IDLE",4.1, 0, 1, 1, 1, 1, 1);
1582 case 2: LoopingAnim(playerid, "CRACK", "Bbalbat_Idle_01", 4.0, 1, 0, 0, 0, 0, 1);
1583 case 3: LoopingAnim(playerid, "CRACK", "Bbalbat_Idle_02", 4.0, 1, 0, 0, 0, 0, 1);
1584 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bat [1-3]");
1585 }
1586 return 1;
1587}
1588
1589CMD:lean(playerid, params[])
1590{
1591 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1592 switch(strval(params))
1593 {
1594 case 1: LoopingAnim(playerid, "GANGS", "leanIDLE", 4.0, 0, 0, 0, 1, 0, 1);
1595 case 2: LoopingAnim(playerid, "MISC", "Plyrlean_loop", 4.0, 0, 0, 0, 1, 0, 1);
1596 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /lean [1-2]");
1597 }
1598 return 1;
1599}
1600
1601CMD:gesture(playerid, params[])
1602{
1603 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1604 switch(strval(params))
1605 {
1606 case 1: PlayAnim(playerid, "GHANDS", "gsign1", 4.0, 0, 0, 0, 0, 0, 1);
1607 case 2: PlayAnim(playerid, "GHANDS", "gsign1LH", 4.0, 0, 0, 0, 0, 0, 1);
1608 case 3: PlayAnim(playerid, "GHANDS", "gsign2", 4.0, 0, 0, 0, 0, 0, 1);
1609 case 4: PlayAnim(playerid, "GHANDS", "gsign2LH", 4.0, 0, 0, 0, 0, 0, 1);
1610 case 5: PlayAnim(playerid, "GHANDS", "gsign3", 4.0, 0, 0, 0, 0, 0, 1);
1611 case 6: PlayAnim(playerid, "GHANDS", "gsign3LH", 4.0, 0, 0, 0, 0, 0, 1);
1612 case 7: PlayAnim(playerid, "GHANDS", "gsign4", 4.0, 0, 0, 0, 0, 0, 1);
1613 case 8: PlayAnim(playerid, "GHANDS", "gsign4LH", 4.0, 0, 0, 0, 0, 0, 1);
1614 case 9: PlayAnim(playerid, "GHANDS", "gsign5", 4.0, 0, 0, 0, 0, 0, 1);
1615 case 10: PlayAnim(playerid, "GHANDS", "gsign5", 4.0, 0, 0, 0, 0, 0, 1);
1616 case 11: PlayAnim(playerid, "GHANDS", "gsign5LH", 4.0, 0, 0, 0, 0, 0, 1);
1617 case 12: PlayAnim(playerid, "GANGS", "Invite_No", 4.0, 0, 0, 0, 0, 0, 1);
1618 case 13: PlayAnim(playerid, "GANGS", "Invite_Yes", 4.0, 0, 0, 0, 0, 0, 1);
1619 case 14: PlayAnim(playerid, "GANGS", "prtial_gngtlkD", 4.0, 0, 0, 0, 0, 0, 1);
1620 case 15: PlayAnim(playerid, "GANGS", "smkcig_prtl", 4.0, 0, 0, 0, 0, 0, 1);
1621 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /gesture [1-15]");
1622 }
1623 return 1;
1624}
1625
1626CMD:lay(playerid, params[])
1627{
1628 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1629 switch(strval(params))
1630 {
1631 case 1: LoopingAnim(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0, 1);
1632 case 2: LoopingAnim(playerid, "BEACH", "Lay_Bac_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1633 case 3: LoopingAnim(playerid, "BEACH", "SitnWait_loop_W", 4.0, 1, 0, 0, 0, 0, 1);
1634 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /lay [1-3]");
1635 }
1636 return 1;
1637}
1638
1639CMD:wave(playerid, params[])
1640{
1641 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1642 switch(strval(params))
1643 {
1644 case 1: LoopingAnim(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0, 1);
1645 case 2: LoopingAnim(playerid, "KISSING", "gfwave2", 4.0, 1, 0, 0, 0, 0, 1);
1646 case 3: LoopingAnim(playerid, "PED", "endchat_03", 4.0, 1, 0, 0, 0, 0, 1);
1647 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /wave [1-3]");
1648 }
1649 return 1;
1650}
1651
1652CMD:signal(playerid, params[])
1653{
1654 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1655 switch(strval(params))
1656 {
1657 case 1: LoopingAnim(playerid, "POLICE", "CopTraf_Come", 4.0, 1, 0, 0, 0, 0, 1);
1658 case 2: LoopingAnim(playerid, "POLICE", "CopTraf_Stop", 4.0, 1, 0, 0, 0, 0, 1);
1659 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /signal [1-2]");
1660 }
1661 return 1;
1662}
1663
1664CMD:nobreath(playerid, params[])
1665{
1666 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1667 switch(strval(params))
1668 {
1669 case 1: LoopingAnim(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0, 1);
1670 case 2: LoopingAnim(playerid, "PED", "IDLE_tired", 4.0, 1, 0, 0, 0, 0, 1);
1671 case 3: LoopingAnim(playerid, "FAT", "IDLE_tired", 4.0, 1, 0, 0, 0, 0, 1);
1672 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /nobreath [1-3]");
1673 }
1674 return 1;
1675}
1676
1677CMD:fallover(playerid, params[])
1678{
1679 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1680 switch(strval(params))
1681 {
1682 case 1: LoopingAnim(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
1683 case 2: LoopingAnim(playerid, "PED", "KO_shot_face", 4.0, 0, 1, 1, 1, 0, 1);
1684 case 3: LoopingAnim(playerid, "PED", "KO_shot_stom", 4.0, 0, 1, 1, 1, 0, 1);
1685 case 4: LoopingAnim(playerid, "PED", "BIKE_fallR", 4.1, 0, 1, 1, 1, 0, 1);
1686 case 5: LoopingAnim(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
1687 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /fallover [1-5]");
1688 }
1689 return 1;
1690}
1691
1692CMD:pedmove(playerid, params[])
1693{
1694 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1695 switch(strval(params))
1696 {
1697 case 1: LoopingAnim(playerid, "PED", "JOG_femaleA", 4.0, 1, 1, 1, 1, 1, 1);
1698 case 2: LoopingAnim(playerid, "PED", "JOG_maleA", 4.0, 1, 1, 1, 1, 1, 1);
1699 case 3: LoopingAnim(playerid, "PED", "WOMAN_walkfatold", 4.0, 1, 1, 1, 1, 1, 1);
1700 case 4: LoopingAnim(playerid, "PED", "run_fat", 4.0, 1, 1, 1, 1, 1, 1);
1701 case 5: LoopingAnim(playerid, "PED", "run_fatold", 4.0, 1, 1, 1, 1, 1, 1);
1702 case 6: LoopingAnim(playerid, "PED", "run_old", 4.0, 1, 1, 1, 1, 1, 1);
1703 case 7: LoopingAnim(playerid, "PED", "Run_Wuzi", 4.0, 1, 1, 1, 1, 1, 1);
1704 case 8: LoopingAnim(playerid, "PED", "swat_run", 4.0, 1, 1, 1, 1, 1, 1);
1705 case 9: LoopingAnim(playerid, "PED", "WALK_fat", 4.0, 1, 1, 1, 1, 1, 1);
1706 case 10: LoopingAnim(playerid, "PED", "WALK_fatold", 4.0, 1, 1, 1, 1, 1, 1);
1707 case 11: LoopingAnim(playerid, "PED", "WALK_gang1", 4.0, 1, 1, 1, 1, 1, 1);
1708 case 12: LoopingAnim(playerid, "PED", "WALK_gang2", 4.0, 1, 1, 1, 1, 1, 1);
1709 case 13: LoopingAnim(playerid, "PED", "WALK_old", 4.0, 1, 1, 1, 1, 1, 1);
1710 case 14: LoopingAnim(playerid, "PED", "WALK_shuffle", 4.0, 1, 1, 1, 1, 1, 1);
1711 case 15: LoopingAnim(playerid, "PED", "woman_run", 4.0, 1, 1, 1, 1, 1, 1);
1712 case 16: LoopingAnim(playerid, "PED", "WOMAN_runbusy", 4.0, 1, 1, 1, 1, 1, 1);
1713 case 17: LoopingAnim(playerid, "PED", "WOMAN_runfatold", 4.0, 1, 1, 1, 1, 1, 1);
1714 case 18: LoopingAnim(playerid, "PED", "woman_runpanic", 4.0, 1, 1, 1, 1, 1, 1);
1715 case 19: LoopingAnim(playerid, "PED", "WOMAN_runsexy", 4.0, 1, 1, 1, 1, 1, 1);
1716 case 20: LoopingAnim(playerid, "PED", "WOMAN_walkbusy", 4.0, 1, 1, 1, 1, 1, 1);
1717 case 21: LoopingAnim(playerid, "PED", "WOMAN_walkfatold", 4.0, 1, 1, 1, 1, 1, 1);
1718 case 22: LoopingAnim(playerid, "PED", "WOMAN_walknorm", 4.0, 1, 1, 1, 1, 1, 1);
1719 case 23: LoopingAnim(playerid, "PED", "WOMAN_walkold", 4.0, 1, 1, 1, 1, 1, 1);
1720 case 24: LoopingAnim(playerid, "PED", "WOMAN_walkpro", 4.0, 1, 1, 1, 1, 1, 1);
1721 case 25: LoopingAnim(playerid, "PED", "WOMAN_walksexy", 4.0, 1, 1, 1, 1, 1, 1);
1722 case 26: LoopingAnim(playerid, "PED", "WOMAN_walkshop", 4.0, 1, 1, 1, 1, 1, 1);
1723 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /pedmove [1-26]");
1724 }
1725 return 1;
1726}
1727
1728CMD:getjiggy(playerid, params[])
1729{
1730 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1731 switch(strval(params))
1732 {
1733 case 1: LoopingAnim(playerid, "DANCING", "DAN_Down_A", 4.0, 1, 0, 0, 0, 0, 1);
1734 case 2: LoopingAnim(playerid, "DANCING", "DAN_Left_A", 4.0, 1, 0, 0, 0, 0, 1);
1735 case 3: LoopingAnim(playerid, "DANCING", "DAN_Loop_A", 4.0, 1, 0, 0, 0, 0, 1);
1736 case 4: LoopingAnim(playerid, "DANCING", "DAN_Right_A", 4.0, 1, 0, 0, 0, 0, 1);
1737 case 5: LoopingAnim(playerid, "DANCING", "DAN_Up_A", 4.0, 1, 0, 0, 0, 0, 1);
1738 case 6: LoopingAnim(playerid, "DANCING", "dnce_M_a", 4.0, 1, 0, 0, 0, 0, 1);
1739 case 7: LoopingAnim(playerid, "DANCING", "dnce_M_b", 4.0, 1, 0, 0, 0, 0, 1);
1740 case 8: LoopingAnim(playerid, "DANCING", "dnce_M_c", 4.0, 1, 0, 0, 0, 0, 1);
1741 case 9: LoopingAnim(playerid, "DANCING", "dnce_M_c", 4.0, 1, 0, 0, 0, 0, 1);
1742 case 10: LoopingAnim(playerid, "DANCING", "dnce_M_d", 4.0, 1, 0, 0, 0, 0, 1);
1743 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /getjiggy [1-10]");
1744 }
1745 return 1;
1746}
1747
1748CMD:stripclub(playerid, params[])
1749{
1750 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1751 switch(strval(params))
1752 {
1753 case 1: LoopingAnim(playerid, "STRIP", "PLY_CASH", 4.0, 1, 0, 0, 0, 0, 1);
1754 case 2: LoopingAnim(playerid, "STRIP", "PUN_CASH", 4.0, 1, 0, 0, 0, 0, 1);
1755 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /stripclub [1-2]");
1756 }
1757 return 1;
1758}
1759
1760CMD:smoke(playerid, params[])
1761{
1762 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1763 switch(strval(params))
1764 {
1765 case 1: PlayAnim(playerid, "SMOKING", "M_smk_in", 4.0, 0, 0, 0, 0, 0, 1);
1766 case 2: LoopingAnim(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0, 1);
1767 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /smoke [1-2]");
1768 }
1769 return 1;
1770}
1771
1772CMD:dj(playerid, params[])
1773{
1774 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1775 switch(strval(params))
1776 {
1777 case 1: LoopingAnim(playerid, "SCRATCHING", "scdldlp", 4.0, 1, 0, 0, 0, 0, 1);
1778 case 2: LoopingAnim(playerid, "SCRATCHING", "scdlulp", 4.0, 1, 0, 0, 0, 0, 1);
1779 case 3: LoopingAnim(playerid, "SCRATCHING", "scdrdlp", 4.0, 1, 0, 0, 0, 0, 1);
1780 case 4: LoopingAnim(playerid, "SCRATCHING", "scdrulp", 4.0, 1, 0, 0, 0, 0, 1);
1781 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /dj [1-4]");
1782 }
1783 return 1;
1784}
1785
1786CMD:reload(playerid, params[])
1787{
1788 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1789 switch(strval(params))
1790 {
1791 case 1: PlayAnim(playerid, "BUDDY", "buddy_reload", 4.0, 0, 0, 0, 0, 0, 1);
1792 case 2: PlayAnim(playerid, "PYTHON", "python_reload", 4.0, 0, 0, 0, 0, 0, 1);
1793 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /reload [1-2]");
1794 }
1795 return 1;
1796}
1797
1798CMD:tag(playerid, params[])
1799{
1800 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1801 switch(strval(params))
1802 {
1803 case 1: LoopingAnim(playerid, "GRAFFITI", "graffiti_Chkout", 4.0, 1, 0, 0, 0, 0, 1);
1804 case 2: LoopingAnim(playerid, "GRAFFITI", "spraycan_fire", 4.0, 1, 0, 0, 0, 0, 1);
1805 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /tag [1-2]");
1806 }
1807 return 1;
1808}
1809
1810CMD:deal(playerid, params[])
1811{
1812 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1813 switch(strval(params))
1814 {
1815 case 1: LoopingAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 0, 0, 0, 0, 1);
1816 case 2: LoopingAnim(playerid, "DEALER", "shop_pay", 4.0, 1, 0, 0, 0, 0, 1);
1817 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /deal [1-2]");
1818 }
1819 return 1;
1820}
1821
1822CMD:crossarms(playerid, params[])
1823{
1824 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1825 switch(strval(params))
1826 {
1827 case 1: LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1, 1);
1828 case 2: LoopingAnim(playerid, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1);
1829 case 3: LoopingAnim(playerid, "GRAVEYARD", "mrnM_loop", 4.0, 1, 0, 0, 0, 0, 1);
1830 case 4: LoopingAnim(playerid, "GRAVEYARD", "prst_loopa", 4.0, 1, 0, 0, 0, 0, 1);
1831 case 5: LoopingAnim(playerid, "DEALER", "DEALER_IDLE_01", 4.0, 1, 0, 0, 0, 0, 1);
1832 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /crossarms [1-5]");
1833 }
1834 return 1;
1835}
1836
1837CMD:cheer(playerid, params[])
1838{
1839 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1840 switch(strval(params))
1841 {
1842 case 1: LoopingAnim(playerid, "ON_LOOKERS", "shout_01", 4.0, 1, 0, 0, 0, 0, 1);
1843 case 2: LoopingAnim(playerid, "ON_LOOKERS", "shout_02", 4.0, 1, 0, 0, 0, 0, 1);
1844 case 3: LoopingAnim(playerid, "ON_LOOKERS", "shout_in", 4.0, 1, 0, 0, 0, 0, 1);
1845 case 4: LoopingAnim(playerid, "RIOT", "RIOT_ANGRY_B", 4.0, 1, 0, 0, 0, 0, 1);
1846 case 5: LoopingAnim(playerid, "RIOT", "RIOT_CHANT", 4.0, 1, 0, 0, 0, 0, 1);
1847 case 6: LoopingAnim(playerid, "RIOT", "RIOT_shout", 4.0, 1, 0, 0, 0, 0, 1);
1848 case 7: LoopingAnim(playerid, "STRIP", "PUN_HOLLER", 4.0, 1, 0, 0, 0, 0, 1);
1849 case 8: LoopingAnim(playerid, "OTB", "wtchrace_win", 4.0, 1, 0, 0, 0, 0, 1);
1850 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /cheer [1-8]");
1851 }
1852 return 1;
1853}
1854
1855CMD:sit(playerid, params[])
1856{
1857 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1858 switch(strval(params))
1859 {
1860 case 1: LoopingAnim(playerid, "BEACH", "bather", 4.0, 1, 0, 0, 0, 0, 1);
1861 case 2: LoopingAnim(playerid, "BEACH", "Lay_Bac_Loop", 4.0, 1, 0, 0, 0, 0, 1);
1862 case 3: LoopingAnim(playerid, "BEACH", "ParkSit_W_loop", 4.0, 1, 0, 0, 0, 0, 1);
1863 case 4: LoopingAnim(playerid, "BEACH", "SitnWait_loop_W", 4.0, 1, 0, 0, 0, 0, 1);
1864 case 5: LoopingAnim(playerid, "BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0, 1);
1865 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sit [1-5]");
1866 }
1867 return 1;
1868}
1869
1870CMD:siteat(playerid, params[])
1871{
1872 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1873 LoopingAnim(playerid, "FOOD", "FF_Sit_Eat3", 4.0, 1, 0, 0, 0, 0, 1);
1874 return 1;
1875}
1876
1877CMD:bar(playerid, params[])
1878{
1879 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1880 switch(strval(params))
1881 {
1882 case 1: PlayAnim(playerid, "BAR", "Barcustom_get", 4.0, 0, 1, 0, 0, 0, 1);
1883 case 2: PlayAnim(playerid, "BAR", "Barserve_bottle", 4.0, 0, 0, 0, 0, 0, 1);
1884 case 3: PlayAnim(playerid, "BAR", "Barserve_give", 4.0, 0, 0, 0, 0, 0, 1);
1885 case 4: PlayAnim(playerid, "BAR", "dnk_stndM_loop", 4.0, 0, 0, 0, 0, 0, 1);
1886 case 5: LoopingAnim(playerid, "BAR", "BARman_idle", 4.0, 1, 0, 0, 0, 0, 1);
1887 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bar [1-5]");
1888 }
1889 return 1;
1890}
1891
1892CMD:dance(playerid, params[])
1893{
1894 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1895 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
1896 switch(strval(params))
1897 {
1898 case 1: SetPlayerSpecialAction(playerid, 5);
1899 case 2: SetPlayerSpecialAction(playerid, 6);
1900 case 3: SetPlayerSpecialAction(playerid, 7);
1901 case 4: SetPlayerSpecialAction(playerid, 8);
1902 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /dance [1-4]");
1903 }
1904 return 1;
1905}
1906
1907CMD:spank(playerid, params[])
1908{
1909 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1910 switch(strval(params))
1911 {
1912 case 1: LoopingAnim(playerid, "SNM", "SPANKINGW", 4.1, 1, 0, 0, 0, 0, 1);
1913 case 2: LoopingAnim(playerid, "SNM", "SPANKINGP", 4.1, 1, 0, 0, 0, 0, 1);
1914 case 3: LoopingAnim(playerid, "SNM", "SPANKEDW", 4.1, 1, 0, 0, 0, 0, 1);
1915 case 4: LoopingAnim(playerid, "SNM", "SPANKEDP", 4.1, 1, 0, 0, 0, 0, 1);
1916 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /spank [1-4]");
1917 }
1918 return 1;
1919}
1920
1921CMD:sexy(playerid, params[])
1922{
1923 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1924 switch(strval(params))
1925 {
1926 case 1: LoopingAnim(playerid, "STRIP", "strip_E", 4.1, 1, 0, 0, 0, 0, 1);
1927 case 2: LoopingAnim(playerid, "STRIP", "strip_G", 4.1, 1, 0, 0, 0, 0, 1);
1928 case 3: PlayAnim(playerid, "STRIP", "STR_A2B", 4.1, 0, 0, 0, 0, 0, 1);
1929 case 4: LoopingAnim(playerid, "STRIP", "STR_Loop_A", 4.1, 1, 0, 0, 0, 0, 1);
1930 case 5: LoopingAnim(playerid, "STRIP", "STR_Loop_B", 4.1, 1, 0, 0, 0, 0, 1);
1931 case 6: LoopingAnim(playerid, "STRIP", "STR_Loop_C", 4.1, 1, 0, 0, 0, 0, 1);
1932 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sexy [1-6]");
1933 }
1934 return 1;
1935}
1936
1937CMD:holdup(playerid, params[])
1938{
1939 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1940 switch(strval(params))
1941 {
1942 case 1: LoopingAnim(playerid, "POOL", "POOL_ChalkCue", 4.1, 0, 1, 1, 1, 1, 1);
1943 case 2: LoopingAnim(playerid, "POOL", "POOL_Idle_Stance", 4.1, 0, 1, 1, 1, 1, 1);
1944 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /holdup [1-2]");
1945 }
1946 return 1;
1947}
1948
1949CMD:copa(playerid, params[])
1950{
1951 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1952 switch(strval(params))
1953 {
1954 case 1: PlayAnim(playerid, "POLICE", "CopTraf_Away", 4.1, 0, 0, 0, 0, 0, 1);
1955 case 2: PlayAnim(playerid, "POLICE", "CopTraf_Come", 4.1, 0, 0, 0, 0, 0, 1);
1956 case 3: PlayAnim(playerid, "POLICE", "CopTraf_Left", 4.1, 0, 0, 0, 0, 0, 1);
1957 case 4: PlayAnim(playerid, "POLICE", "CopTraf_Stop", 4.1, 0, 0, 0, 0, 0, 1);
1958 case 5: LoopingAnim(playerid, "POLICE", "Cop_move_FWD", 4.1, 1, 1, 1, 1, 1, 1);
1959 case 6: LoopingAnim(playerid, "POLICE", "crm_drgbst_01", 4.1, 0, 0, 0, 1, 5000, 1);
1960 case 7: PlayAnim(playerid, "POLICE", "Door_Kick", 4.1, 0, 1, 1, 1, 1, 1);
1961 case 8: PlayAnim(playerid, "POLICE", "plc_drgbst_01", 4.1, 0, 0, 0, 0, 5000, 1);
1962 case 9: PlayAnim(playerid, "POLICE", "plc_drgbst_02", 4.1, 0, 0, 0, 0, 0, 1);
1963 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /copa [1-9]");
1964 }
1965 return 1;
1966}
1967
1968CMD:misc(playerid, params[])
1969{
1970 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1971 switch(strval(params))
1972 {
1973 case 1: LoopingAnim(playerid, "CAR", "Fixn_Car_Loop", 4.1, 1, 0, 0, 0, 0, 1);
1974 case 2: PlayAnim(playerid, "CAR", "flag_drop", 4.1, 0, 0, 0, 0, 0, 1);
1975 case 3: PlayAnim(playerid, "PED", "bomber", 4.1, 0, 0, 0, 0, 0, 1);
1976 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /misc [1-3]");
1977 }
1978 return 1;
1979}
1980
1981CMD:snatch(playerid, params[])
1982{
1983 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1984 switch(strval(params))
1985 {
1986 case 1: PlayAnim(playerid, "PED", "BIKE_elbowL", 4.1, 0, 0, 0, 0, 0, 1);
1987 case 2: PlayAnim(playerid, "PED", "BIKE_elbowR", 4.1, 0, 0, 0, 0, 0, 1);
1988 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /snatch [1-2]");
1989 }
1990 return 1;
1991}
1992
1993CMD:blowjob(playerid, params[])
1994{
1995 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
1996 switch(strval(params))
1997 {
1998 case 1: LoopingAnim(playerid, "BLOWJOBZ", "BJ_COUCH_LOOP_P", 4.1, 1, 0, 0, 0, 0, 1);
1999 case 2: LoopingAnim(playerid, "BLOWJOBZ", "BJ_STAND_LOOP_P", 4.1, 1, 0, 0, 0, 0, 1);
2000 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /blowjob [1-2]");
2001 }
2002 return 1;
2003}
2004
2005CMD:kiss(playerid, params[])
2006{
2007 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
2008 switch(strval(params))
2009 {
2010 case 1: PlayAnim(playerid, "KISSING", "Playa_Kiss_01", 4.1, 0, 0, 0, 0, 0, 1);
2011 case 2: PlayAnim(playerid, "KISSING", "Playa_Kiss_02", 4.1, 0, 0, 0, 0, 0, 1);
2012 case 3: PlayAnim(playerid, "KISSING", "Playa_Kiss_03", 4.1, 0, 0, 0, 0, 0, 1);
2013 case 4: PlayAnim(playerid, "KISSING", "Grlfrd_Kiss_01", 4.1, 0, 0, 0, 0, 0, 1);
2014 case 5: PlayAnim(playerid, "KISSING", "Grlfrd_Kiss_02", 4.1, 0, 0, 0, 0, 0, 1);
2015 case 6: PlayAnim(playerid, "KISSING", "Grlfrd_Kiss_03", 4.1, 0, 0, 0, 0, 0, 1);
2016 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /kiss [1-6]");
2017 }
2018 return 1;
2019}
2020
2021CMD:idles(playerid, params[])
2022{
2023 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
2024 switch(strval(params))
2025 {
2026 case 1: LoopingAnim(playerid, "PLAYIDLES", "shift", 4.1, 1, 1, 1, 1, 1, 1);
2027 case 2: LoopingAnim(playerid, "PLAYIDLES", "shldr", 4.1, 1, 1, 1, 1, 1, 1);
2028 case 3: LoopingAnim(playerid, "PLAYIDLES", "stretch", 4.1, 1, 1, 1, 1, 1, 1);
2029 case 4: LoopingAnim(playerid, "PLAYIDLES", "strleg", 4.1, 1, 1, 1, 1, 1, 1);
2030 case 5: LoopingAnim(playerid, "PLAYIDLES", "time", 4.1, 1, 1, 1, 1, 1, 1);
2031 case 6: LoopingAnim(playerid, "COP_AMBIENT", "Copbrowse_loop", 4.1, 1, 0, 0, 0, 0, 1);
2032 case 7: LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.1, 1, 0, 0, 0, 0, 1);
2033 case 8: LoopingAnim(playerid, "COP_AMBIENT", "Coplook_shake", 4.1, 1, 0, 0, 0, 0, 1);
2034 case 9: LoopingAnim(playerid, "COP_AMBIENT", "Coplook_think", 4.1, 1, 0, 0, 0, 0, 1);
2035 case 10: LoopingAnim(playerid, "COP_AMBIENT", "Coplook_watch", 4.1, 1, 0, 0, 0, 0, 1);
2036 case 11: LoopingAnim(playerid, "PED", "roadcross", 4.1, 1, 0, 0, 0, 0, 1);
2037 case 12: LoopingAnim(playerid, "PED", "roadcross_female", 4.1, 1, 0, 0, 0, 0, 1);
2038 case 13: LoopingAnim(playerid, "PED", "roadcross_gang", 4.1, 1, 0, 0, 0, 0, 1);
2039 case 14: LoopingAnim(playerid, "PED", "roadcross_old", 4.1, 1, 0, 0, 0, 0, 1);
2040 case 15: LoopingAnim(playerid, "PED", "woman_idlestance", 4.1, 1, 0, 0, 0, 0, 1);
2041 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /idles [1-15]");
2042 }
2043 return 1;
2044}
2045CMD:sunbathe(playerid, params[])
2046{
2047 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot do this right now.");
2048 switch(strval(params))
2049 {
2050 case 1: LoopingAnim(playerid, "SUNBATHE", "batherdown", 4.1, 0, 1, 1, 1, 1, 1);
2051 case 2: LoopingAnim(playerid, "SUNBATHE", "batherup", 4.1, 0, 1, 1, 1, 1, 1);
2052 case 3: LoopingAnim(playerid, "SUNBATHE", "Lay_Bac_in", 4.1, 0, 1, 1, 1, 1, 1);
2053 case 4: LoopingAnim(playerid, "SUNBATHE", "Lay_Bac_out", 4.1, 0, 1, 1, 1, 1, 1);
2054 case 5: LoopingAnim(playerid, "SUNBATHE", "ParkSit_M_IdleA", 4.1, 0, 1, 1, 1, 1, 1);
2055 case 6: LoopingAnim(playerid, "SUNBATHE", "ParkSit_M_IdleB", 4.1, 0, 1, 1, 1, 1, 1);
2056 case 7: LoopingAnim(playerid, "SUNBATHE", "ParkSit_M_IdleC", 4.1, 0, 1, 1, 1, 1, 1);
2057 case 8: LoopingAnim(playerid, "SUNBATHE", "ParkSit_M_in", 4.1, 0, 1, 1, 1, 1, 1);
2058 case 9: LoopingAnim(playerid, "SUNBATHE", "ParkSit_M_out", 4.1, 0, 1, 1, 1, 1, 1);
2059 case 10: LoopingAnim(playerid, "SUNBATHE", "ParkSit_W_idleA", 4.1, 0, 1, 1, 1, 1, 1);
2060 case 11: LoopingAnim(playerid, "SUNBATHE", "ParkSit_W_idleB", 4.1, 0, 1, 1, 1, 1, 1);
2061 case 12: LoopingAnim(playerid, "SUNBATHE", "ParkSit_W_idleC", 4.1, 0, 1, 1, 1, 1, 1);
2062 case 13: LoopingAnim(playerid, "SUNBATHE", "ParkSit_W_in", 4.1, 0, 1, 1, 1, 1, 1);
2063 case 14: LoopingAnim(playerid, "SUNBATHE", "ParkSit_W_out", 4.1, 0, 1, 1, 1, 1, 1);
2064 case 15: LoopingAnim(playerid, "SUNBATHE", "SBATHE_F_LieB2Sit", 4.1, 0, 1, 1, 1, 1, 1);
2065 case 16: LoopingAnim(playerid, "SUNBATHE", "SBATHE_F_Out", 4.1, 0, 1, 1, 1, 1, 1);
2066 case 17: LoopingAnim(playerid, "SUNBATHE", "SitnWait_in_W", 4.1, 0, 1, 1, 1, 1, 1);
2067 case 18: LoopingAnim(playerid, "SUNBATHE", "SitnWait_out_W", 4.1, 0, 1, 1, 1, 1, 1);
2068 default: SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /sunbathe [1-18]");
2069 }
2070 return 1;
2071}
2072
2073//------------------------------------------------------------------------------
2074// TIMERS
2075//------------------------------------------------------------------------------
2076
2077// Sync Server - Execution: 1 minute
2078task SyncServer[60000]()
2079{
2080 foreach(Player, i)
2081 {
2082 if(PlayerInfo[i][pJailTime] > 0)
2083 {
2084 PlayerInfo[i][pJailTime]--;
2085 }
2086 SavePlayerAccount(i);
2087 SetPlayerTime(i, WorldTime[0], WorldTime[1]);
2088 }
2089}
2090
2091// Heartbeat - Execution: 1 second
2092task Heartbeat[1000]()
2093{
2094 gettime(WorldTime[0], WorldTime[1], WorldTime[2]);
2095 foreach(Player, i)
2096 {
2097 if(IsPlayerLogged(i))
2098 {
2099 // Server-Side Money
2100 ResetPlayerMoney(i);
2101 GivePlayerMoney(i, PlayerInfo[i][pMoney]);
2102 // Anti-Jetpack
2103 if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
2104 {
2105 if(GetPVarInt(i, "JetpackAuthorized") == 0)
2106 {
2107 new string[128];
2108 format(string, sizeof(string), "AdmCmd: %s was banned for 365 days, string: Jetpack Hacking", GetPlayerNameEx(i));
2109 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
2110 BanPlayerEx(i, "Jetpack Hacking", 365);
2111 }
2112 }
2113 }
2114 }
2115}
2116//------------------------------------------------------------------------------
2117// STOCKS
2118//------------------------------------------------------------------------------
2119
2120stock LoadPlayerAccount(playerid)
2121{
2122 if(IsPlayerLogged(playerid))
2123 {
2124 new DBResult:dbresult, szQuery[256];
2125 format(szQuery, sizeof(szQuery), "SELECT * FROM Accounts WHERE Username = '%s'", DB_Escape(PlayerInfo[playerid][pUsername]));
2126 dbresult = db_query(Database, szQuery);
2127 if(db_num_rows(dbresult) > 0)
2128 {
2129 new szValue[64];
2130 db_get_field_assoc(dbresult, "Age", szValue, sizeof(szValue));
2131 PlayerInfo[playerid][pAge] = strval(szValue);
2132 db_get_field_assoc(dbresult, "Gender", szValue, sizeof(szValue));
2133 PlayerInfo[playerid][pGender] = strval(szValue);
2134 db_get_field_assoc(dbresult, "Registered", szValue, sizeof(szValue));
2135 PlayerInfo[playerid][pRegistered] = strval(szValue);
2136 db_get_field_assoc(dbresult, "Member", szValue, sizeof(szValue));
2137 PlayerInfo[playerid][pMember] = strval(szValue);
2138 db_get_field_assoc(dbresult, "Rank", szValue, sizeof(szValue));
2139 PlayerInfo[playerid][pRank] = strval(szValue);
2140 db_get_field_assoc(dbresult, "Leader", szValue, sizeof(szValue));
2141 PlayerInfo[playerid][pLeader] = strval(szValue);
2142 db_get_field_assoc(dbresult, "Banned", szValue, sizeof(szValue));
2143 PlayerInfo[playerid][pBanned] = strval(szValue);
2144 db_get_field_assoc(dbresult, "BanReason", PlayerInfo[playerid][pBanReason], 64);
2145 db_get_field_assoc(dbresult, "JailTime", szValue, sizeof(szValue));
2146 PlayerInfo[playerid][pJailTime] = strval(szValue);
2147 db_get_field_assoc(dbresult, "JailReason", PlayerInfo[playerid][pJailReason], 64);
2148 db_get_field_assoc(dbresult, "BanExpiry", szValue, sizeof(szValue));
2149 PlayerInfo[playerid][pBanExpiry] = strval(szValue);
2150 db_get_field_assoc(dbresult, "NMute", szValue, sizeof(szValue));
2151 PlayerInfo[playerid][pNMute] = strval(szValue);
2152 db_get_field_assoc(dbresult, "RMute", szValue, sizeof(szValue));
2153 PlayerInfo[playerid][pRMute] = strval(szValue);
2154 db_get_field_assoc(dbresult, "AdminLevel", szValue, sizeof(szValue));
2155 PlayerInfo[playerid][pAdmin] = strval(szValue);
2156 db_get_field_assoc(dbresult, "SecondaryTask", szValue, sizeof(szValue));
2157 PlayerInfo[playerid][pSecondaryTask] = strval(szValue);
2158 db_get_field_assoc(dbresult, "Money", szValue, sizeof(szValue));
2159 PlayerInfo[playerid][pMoney] = strval(szValue);
2160 db_get_field_assoc(dbresult, "PositionX", szValue, sizeof(szValue));
2161 PlayerInfo[playerid][pPositionX] = floatstr(szValue);
2162 db_get_field_assoc(dbresult, "PositionY", szValue, sizeof(szValue));
2163 PlayerInfo[playerid][pPositionY] = floatstr(szValue);
2164 db_get_field_assoc(dbresult, "PositionZ", szValue, sizeof(szValue));
2165 PlayerInfo[playerid][pPositionZ] = floatstr(szValue);
2166 db_get_field_assoc(dbresult, "FacingAngle", szValue, sizeof(szValue));
2167 PlayerInfo[playerid][pFacingAngle] = floatstr(szValue);
2168 db_get_field_assoc(dbresult, "Interior", szValue, sizeof(szValue));
2169 PlayerInfo[playerid][pInterior] = strval(szValue);
2170 db_get_field_assoc(dbresult, "VirtualWorld", szValue, sizeof(szValue));
2171 PlayerInfo[playerid][pVirtualWorld] = strval(szValue);
2172 db_get_field_assoc(dbresult, "Skin", szValue, sizeof(szValue));
2173 PlayerInfo[playerid][pSkin] = strval(szValue);
2174 db_get_field_assoc(dbresult, "Health", szValue, sizeof(szValue));
2175 PlayerInfo[playerid][pHealth] = floatstr(szValue);
2176 db_get_field_assoc(dbresult, "Armour", szValue, sizeof(szValue));
2177 PlayerInfo[playerid][pArmour] = floatstr(szValue);
2178 }
2179 db_free_result(dbresult);
2180 return 1;
2181 }
2182 return 0;
2183}
2184
2185stock SavePlayerAccount(playerid)
2186{
2187 if(IsPlayerLogged(playerid))
2188 {
2189 new szQuery[256];
2190 GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
2191 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
2192 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
2193 PlayerInfo[playerid][pInterior] = GetPlayerInterior(playerid);
2194 PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
2195 PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
2196 GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
2197 GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
2198
2199 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Age='%i' WHERE Username='%s'", PlayerInfo[playerid][pAge], DB_Escape(PlayerInfo[playerid][pUsername]));
2200 db_free_result(db_query(Database, szQuery));
2201 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Gender='%i' WHERE Username='%s'", PlayerInfo[playerid][pGender], DB_Escape(PlayerInfo[playerid][pUsername]));
2202 db_free_result(db_query(Database, szQuery));
2203 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Registered='%i' WHERE Username='%s'", PlayerInfo[playerid][pRegistered], DB_Escape(PlayerInfo[playerid][pUsername]));
2204 db_free_result(db_query(Database, szQuery));
2205 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Member='%i' WHERE Username='%s'", PlayerInfo[playerid][pMember], DB_Escape(PlayerInfo[playerid][pUsername]));
2206 db_free_result(db_query(Database, szQuery));
2207 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Rank='%i' WHERE Username='%s'", PlayerInfo[playerid][pRank], DB_Escape(PlayerInfo[playerid][pUsername]));
2208 db_free_result(db_query(Database, szQuery));
2209 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Leader='%i' WHERE Username='%s'", PlayerInfo[playerid][pLeader], DB_Escape(PlayerInfo[playerid][pUsername]));
2210 db_free_result(db_query(Database, szQuery));
2211 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET IP='%s' WHERE Username='%s'", PlayerInfo[playerid][pIP], DB_Escape(PlayerInfo[playerid][pUsername]));
2212 db_free_result(db_query(Database, szQuery));
2213 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Banned='%i' WHERE Username='%s'", PlayerInfo[playerid][pBanned], DB_Escape(PlayerInfo[playerid][pUsername]));
2214 db_free_result(db_query(Database, szQuery));
2215 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET BanReason='%s' WHERE Username='%s'", PlayerInfo[playerid][pBanReason], DB_Escape(PlayerInfo[playerid][pUsername]));
2216 db_free_result(db_query(Database, szQuery));
2217 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET BanExpiry='%i' WHERE Username='%s'", PlayerInfo[playerid][pBanExpiry], DB_Escape(PlayerInfo[playerid][pUsername]));
2218 db_free_result(db_query(Database, szQuery));
2219 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET JailTime='%i' WHERE Username='%s'", PlayerInfo[playerid][pBanned], DB_Escape(PlayerInfo[playerid][pUsername]));
2220 db_free_result(db_query(Database, szQuery));
2221 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET JailReason='%s' WHERE Username='%s'", PlayerInfo[playerid][pJailReason], DB_Escape(PlayerInfo[playerid][pUsername]));
2222 db_free_result(db_query(Database, szQuery));
2223 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET NMute='%i' WHERE Username='%s'", PlayerInfo[playerid][pNMute], DB_Escape(PlayerInfo[playerid][pUsername]));
2224 db_free_result(db_query(Database, szQuery));
2225 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET RMute='%i' WHERE Username='%s'", PlayerInfo[playerid][pRMute], DB_Escape(PlayerInfo[playerid][pUsername]));
2226 db_free_result(db_query(Database, szQuery));
2227 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET AdminLevel='%i' WHERE Username='%s'", PlayerInfo[playerid][pAdmin], DB_Escape(PlayerInfo[playerid][pUsername]));
2228 db_free_result(db_query(Database, szQuery));
2229 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET TesterLevel='%i' WHERE Username='%s'", PlayerInfo[playerid][pTester], DB_Escape(PlayerInfo[playerid][pUsername]));
2230 db_free_result(db_query(Database, szQuery));
2231 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET SecondaryTask='%i' WHERE Username='%s'", PlayerInfo[playerid][pSecondaryTask], DB_Escape(PlayerInfo[playerid][pUsername]));
2232 db_free_result(db_query(Database, szQuery));
2233 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Money='%i' WHERE Username='%s'", PlayerInfo[playerid][pMoney], DB_Escape(PlayerInfo[playerid][pUsername]));
2234 db_free_result(db_query(Database, szQuery));
2235 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET PositionX='%f' WHERE Username='%s'", PlayerInfo[playerid][pPositionX], DB_Escape(PlayerInfo[playerid][pUsername]));
2236 db_free_result(db_query(Database, szQuery));
2237 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET PositionY='%f' WHERE Username='%s'", PlayerInfo[playerid][pPositionY], DB_Escape(PlayerInfo[playerid][pUsername]));
2238 db_free_result(db_query(Database, szQuery));
2239 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET PositionZ='%f' WHERE Username='%s'", PlayerInfo[playerid][pPositionZ], DB_Escape(PlayerInfo[playerid][pUsername]));
2240 db_free_result(db_query(Database, szQuery));
2241 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET FacingAngle='%f' WHERE Username='%s'", PlayerInfo[playerid][pFacingAngle], DB_Escape(PlayerInfo[playerid][pUsername]));
2242 db_free_result(db_query(Database, szQuery));
2243 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Interior='%i' WHERE Username='%s'", PlayerInfo[playerid][pInterior], DB_Escape(PlayerInfo[playerid][pUsername]));
2244 db_free_result(db_query(Database, szQuery));
2245 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET VirtualWorld='%i' WHERE Username='%s'", PlayerInfo[playerid][pVirtualWorld], DB_Escape(PlayerInfo[playerid][pUsername]));
2246 db_free_result(db_query(Database, szQuery));
2247 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Skin='%i' WHERE Username='%s'", PlayerInfo[playerid][pSkin], DB_Escape(PlayerInfo[playerid][pUsername]));
2248 db_free_result(db_query(Database, szQuery));
2249 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Health='%f' WHERE Username='%s'", PlayerInfo[playerid][pHealth], DB_Escape(PlayerInfo[playerid][pUsername]));
2250 db_free_result(db_query(Database, szQuery));
2251 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Armour='%f' WHERE Username='%s'", PlayerInfo[playerid][pArmour], DB_Escape(PlayerInfo[playerid][pUsername]));
2252 db_free_result(db_query(Database, szQuery));
2253 return 1;
2254 }
2255 return 0;
2256}
2257
2258stock ResetPlayerVariables(playerid)
2259{
2260
2261 DeletePVar(playerid, "FailedLoginAttempt");
2262 PlayerInfo[playerid][pAge] = 0;
2263 PlayerInfo[playerid][pGender] = 0;
2264 PlayerInfo[playerid][pRegistered] = 0;
2265 PlayerInfo[playerid][pMember] = 0;
2266 PlayerInfo[playerid][pRank] = 0;
2267 PlayerInfo[playerid][pLeader] = 0;
2268 GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
2269 PlayerInfo[playerid][pBanned] = 0;
2270 format(PlayerInfo[playerid][pBanReason], 64, "");
2271 PlayerInfo[playerid][pBanExpiry] = 0;
2272 PlayerInfo[playerid][pJailTime] = 0;
2273 format(PlayerInfo[playerid][pJailReason], 64, "");
2274 PlayerInfo[playerid][pNMute] = 0;
2275 PlayerInfo[playerid][pRMute] = 0;
2276 PlayerInfo[playerid][pAdmin] = 0;
2277 PlayerInfo[playerid][pTester] = 0;
2278 PlayerInfo[playerid][pSecondaryTask] = 0;
2279 PlayerInfo[playerid][pMoney] = 0;
2280 PlayerInfo[playerid][pPositionX] = 0.0;
2281 PlayerInfo[playerid][pPositionY] = 0.0;
2282 PlayerInfo[playerid][pPositionZ] = 0.0;
2283 PlayerInfo[playerid][pFacingAngle] = 0.0;
2284 PlayerInfo[playerid][pInterior] = 0;
2285 PlayerInfo[playerid][pVirtualWorld] = 0;
2286 PlayerInfo[playerid][pSkin] = 0;
2287 PlayerInfo[playerid][pHealth] = 0.0;
2288 PlayerInfo[playerid][pArmour] = 0.0;
2289
2290 format(PlayerInfo[playerid][pReport], 128, "");
2291 PlayerInfo[playerid][pTogNewbie] = 1;
2292 PlayerInfo[playerid][pLastUpdate] = 0;
2293 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 0;
2294 PlayerInfo[playerid][PlayerAnimLibsPreloaded] = 0;
2295 return 1;
2296}
2297
2298stock BanPlayerEx(playerid, reason[], days)
2299{
2300 new szQuery[128], banLength = gettime();
2301 banLength += days * 86400;
2302 PlayerInfo[playerid][pBanned] = 1;
2303 PlayerInfo[playerid][pBanExpiry] = banLength;
2304 format(PlayerInfo[playerid][pBanReason], 64, reason);
2305 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Banned = '%i', BanReason = '%s', BanExpiry = '%i' WHERE Username='%s'", PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pBanReason], PlayerInfo[playerid][pBanExpiry], DB_Escape(PlayerInfo[playerid][pUsername]));
2306 db_query(Database, szQuery);
2307 format(szQuery, sizeof(szQuery), "banip %s", PlayerInfo[playerid][pIP]);
2308 SendRconCommand(szQuery); SendRconCommand("reloadbans");
2309 Kick(playerid);
2310}
2311
2312stock UnbanPlayerEx(name[])
2313{
2314 new DBResult:dbresult, szQuery[128], IP[16];
2315 format(szQuery, sizeof(szQuery), "SELECT * FROM Accounts WHERE Username = '%s' AND Banned = '1'", DB_Escape(name));
2316 dbresult = db_query(Database, szQuery);
2317 if(db_num_rows(dbresult) > 0)
2318 {
2319 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Banned = '0', BanReason = '(null)', BanExpiry = '0' WHERE Username='%s'", DB_Escape(name));
2320 db_query(Database, szQuery);
2321 db_free_result(dbresult);
2322 db_get_field_assoc(dbresult, "IP", IP, sizeof(IP));
2323 format(szQuery, sizeof(szQuery), "unbanip %s", szQuery);
2324 SendRconCommand(szQuery); SendRconCommand("reloadbans");
2325 return 1;
2326 }
2327 db_free_result(dbresult);
2328 return 0;
2329}
2330
2331stock Log(sz_fileName[], sz_input[])
2332{
2333 new sz_logEntry[156], i_dateTime[2][3], File: fileHandle = fopen(sz_fileName, io_append);
2334
2335 gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
2336 getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
2337
2338 format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
2339 fwrite(fileHandle, sz_logEntry);
2340 return fclose(fileHandle);
2341}
2342
2343stock SendAdminMessage(color, level, text[])
2344{
2345 foreach(Player, i) if(PermissionCheck(i, level)) SendClientMessageEx(i, color, text);
2346 return 1;
2347}
2348stock SendAllAdminMessage(color, text[])
2349{
2350 foreach(Player, i) if(PlayerInfo[i][pAdmin] > 0) SendClientMessageEx(i, color, text);
2351 return 1;
2352}
2353stock SendTeterMessage(color, text[])
2354{
2355 foreach(Player, i) if(PlayerInfo[i][pTester] == 1) SendClientMessageEx(i, color, text);
2356 return 1;
2357}
2358stock SendFactionMessage(color, faction, text[])
2359{
2360 foreach(Player, i) if(PlayerInfo[i][pMember] == faction && PlayerInfo[playerid][pLeader] == faction) SendClientMessageEx(i, color, text);
2361 return 1;
2362}
2363
2364stock GetAdminRank(i)
2365{
2366 new tmpString[32];
2367 switch(PlayerInfo[i][pAdmin])
2368 {
2369 case 0: format(tmpString, sizeof(tmpString), "Player");
2370 case 1: format(tmpString, sizeof(tmpString), "Asistent");
2371 case 2: format(tmpString, sizeof(tmpString), "Moderator");
2372 case 3: format(tmpString, sizeof(tmpString), "Administrator Senior");
2373 case 4: format(tmpString, sizeof(tmpString), "Administrator Coordonator");
2374 case 5: format(tmpString, sizeof(tmpString), "Administrator Principal");
2375 default: format(tmpString, sizeof(tmpString), "Fondator");
2376 }
2377 return tmpString;
2378}
2379
2380stock PermissionCheck(playerid, level)
2381{
2382 return PlayerInfo[playerid][pAdmin] >= level;
2383}
2384
2385stock IsPlayerConnectedEx(playerid)
2386{
2387 return playerid >= 0 && playerid < GetMaxPlayers() && IsPlayerConnected(playerid) && !IsPlayerNPC(playerid);
2388}
2389
2390stock IsPlayerInRangeOfPlayer(playerid, targetid, Float:range=2.0)
2391{
2392 new Float:Position[3];
2393 GetPlayerPos(targetid, Position[0], Position[1], Position[2]);
2394 return (IsPlayerInRangeOfPoint(playerid, range, Position[0], Position[1], Position[2]));
2395}
2396
2397stock ReloadDoors()
2398{
2399 for(new i=0; i < MAX_DOORS; i++)
2400 {
2401 DestroyDynamicPickup(DoorInfo[i][dPickup]);
2402 DestroyDynamic3DTextLabel(DoorInfo[i][dDynamicText]);
2403 for(new dInfo:p; p < dInfo; p++) DoorInfo[i][p] = 0;
2404 }
2405 LoadDoors();
2406}
2407
2408stock CreateDoor(title[], Float:exteriorposx, Float:exteriorposy, Float:exteriorposz, exteriorint, exteriorvw, Float:exteriorangle)
2409{
2410 new string[256];
2411 format(string, sizeof(string), "INSERT INTO Doors (TITLE, EXTERIOR_POSX, EXTERIOR_POSY, EXTERIOR_POSZ, EXTERIOR_INT, EXTERIOR_VW, EXTERIOR_ANGLE) VALUES ('%s','%f','%f','%f','%i','%i','%i')", title, exteriorposx, exteriorposy, exteriorposz, exteriorint, exteriorvw, exteriorangle);
2412 db_free_result(db_query(Database, string));
2413 ReloadDoors();
2414}
2415
2416stock DeleteDoor(Float:exteriorposx, Float:exteriorposy)
2417{
2418 new string[128];
2419 format(string, sizeof(string), "DELETE FROM Doors WHERE EXTERIOR_POSX='%f' AND EXTERIOR_POSY='%f'", exteriorposx, exteriorposy);
2420 db_free_result(db_query(Database, string));
2421 ReloadDoors();
2422}
2423
2424stock LoadDoors()
2425{
2426 new DBResult:query = db_query(Database, "SELECT * FROM Doors"), szValue[64], dTitle[128];
2427 for(new i=0; i < db_num_rows(query); i++)
2428 {
2429 db_get_field_assoc(query, "TITLE", szValue, sizeof(szValue));
2430 format(DoorInfo[i][dName], 64, "%s", szValue);
2431
2432 db_get_field_assoc(query, "EXTERIOR_POSX", szValue, 64);
2433 DoorInfo[i][dExteriorX] = floatstr(szValue);
2434 db_get_field_assoc(query, "EXTERIOR_POSY", szValue, 64);
2435 DoorInfo[i][dExteriorY] = floatstr(szValue);
2436 db_get_field_assoc(query, "EXTERIOR_POSZ", szValue, 64);
2437 DoorInfo[i][dExteriorZ] = floatstr(szValue);
2438 db_get_field_assoc(query, "EXTERIOR_ANGLE", szValue, 64);
2439 DoorInfo[i][dExteriorAngle] = floatstr(szValue);
2440 db_get_field_assoc(query, "EXTERIOR_INT", szValue, 64);
2441 DoorInfo[i][dExteriorInt] = strval(szValue);
2442 db_get_field_assoc(query, "EXTERIOR_VW", szValue, 64);
2443 DoorInfo[i][dExteriorVir] = strval(szValue);
2444
2445 db_get_field_assoc(query, "INTERIOR_POSX", szValue, 64);
2446 DoorInfo[i][dInteriorX] = floatstr(szValue);
2447 db_get_field_assoc(query, "INTERIOR_POSY", szValue, 64);
2448 DoorInfo[i][dInteriorY] = floatstr(szValue);
2449 db_get_field_assoc(query, "INTERIOR_POSZ", szValue, 64);
2450 DoorInfo[i][dInteriorZ] = floatstr(szValue);
2451 db_get_field_assoc(query, "INTERIOR_ANGLE", szValue, 64);
2452 DoorInfo[i][dInteriorAngle] = floatstr(szValue);
2453 db_get_field_assoc(query, "INTERIOR_INT", szValue, 64);
2454 DoorInfo[i][dInteriorInt] = strval(szValue);
2455 db_get_field_assoc(query, "INTERIOR_VW", szValue, 64);
2456 DoorInfo[i][dInteriorVir] = strval(szValue);
2457
2458 DoorInfo[i][dPickup] = CreateDynamicPickup(1318, 1, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]);
2459 format(dTitle, sizeof(dTitle), "(ID: %i)\n%s", i, DoorInfo[i][dName]);
2460 DoorInfo[i][dDynamicText] = CreateDynamic3DTextLabel(dTitle, COLOR_WHITE, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ], 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1);
2461
2462 db_next_row(query);
2463 }
2464}
2465
2466stock gettimestamp (timestamp, _form=0)
2467{
2468 /*
2469 ~ author: http://forum.sa-mp.com/showpost.php?p=334797&postcount=471
2470 ~ convert a Timestamp to a Date.
2471 ~ 10.07.2009
2472
2473 date( 1247182451 ) will print >> 09.07.2009-23:34:11
2474 date( 1247182451, 1) will print >> 09/07/2009, 23:34:11
2475 date( 1247182451, 2) will print >> July 09, 2009, 23:34:11
2476 date( 1247182451, 3) will print >> 9 Jul 2009, 23:34
2477 */
2478
2479 new
2480 year=1970, day=0, month=0, hour=0, mins=0, sec=0,
2481 days_of_month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 },
2482 names_of_month[12][10] = {"January","February","March","April","May","June","July","August","September","October","November","December"},
2483 returnstring[32];
2484
2485 while(timestamp>31622400){
2486 timestamp -= 31536000;
2487 if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp -= 86400;
2488 year++;
2489 }
2490
2491 if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) )
2492 days_of_month[1] = 29;
2493 else
2494 days_of_month[1] = 28;
2495
2496
2497 while(timestamp>86400){
2498 timestamp -= 86400, day++;
2499 if(day==days_of_month[month]) day=0, month++;
2500 }
2501
2502 while(timestamp>60){
2503 timestamp -= 60, mins++;
2504 if( mins == 60) mins=0, hour++;
2505 }
2506
2507 sec=timestamp;
2508
2509 switch( _form ){
2510 case 1: format(returnstring, 31, "%02d/%02d/%d %02d:%02d:%02d", day+1, month+1, year, hour, mins, sec);
2511 case 2: format(returnstring, 31, "%s %02d, %d, %02d:%02d:%02d", names_of_month[month],day+1,year, hour, mins, sec);
2512 case 3: format(returnstring, 31, "%d %c%c%c %d, %02d:%02d", day+1,names_of_month[month][0],names_of_month[month][1],names_of_month[month][2], year,hour,mins);
2513
2514 default: format(returnstring, 31, "%02d.%02d.%d-%02d:%02d:%02d", day+1, month+1, year, hour, mins, sec);
2515 }
2516
2517 return returnstring;
2518}
2519stock IsAbleToUseAnimation(playerid)
2520{
2521 if(GetPVarInt(playerid, "ActionRestriction") == 1)
2522 {
2523 SendClientMessageEx(playerid, COLOR_GREY, "You cannot perform this anmiation at this time.");
2524 return false;
2525 }
2526 if(IsPlayerInAnyVehicle(playerid) == 1)
2527 {
2528 SendClientMessageEx(playerid, COLOR_GREY, "You need to be on foot to use this animation.");
2529 return false;
2530 }
2531 return true;
2532}
2533
2534stock IsVehicleLowrider(carid)
2535{
2536 new Cars[] = { 536, 575, 567};
2537 for(new i = 0; i < sizeof(Cars); i++)
2538 {
2539 if(GetVehicleModel(carid) == Cars[i]) return true;
2540 }
2541 return false;
2542}
2543
2544stock IsKeyJustDown(key, newkeys, oldkeys)
2545{
2546 if((newkeys & key) && !(oldkeys & key))
2547 {
2548 return true;
2549 }
2550 return false;
2551}
2552
2553stock PlayAnim(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
2554{
2555 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
2556 ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
2557}
2558
2559stock LoopingAnim(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
2560{
2561 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
2562 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 1;
2563 ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
2564 TextDrawShowForPlayer(playerid,StopAnim);
2565}
2566
2567stock StopLoopingAnim(playerid)
2568{
2569 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 0;
2570 ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
2571}
2572
2573stock PreloadAnimLib(playerid)
2574{
2575 ApplyAnimation(playerid, "AIRPORT", "null", 0, 0, 0, 0, 0, 0, 0);
2576 ApplyAnimation(playerid, "Attractors", "null", 0, 0, 0, 0, 0, 0, 0);
2577 ApplyAnimation(playerid, "BAR", "null", 0, 0, 0, 0, 0, 0, 0);
2578 ApplyAnimation(playerid, "BASEBALL", "null", 0, 0, 0, 0, 0, 0, 0);
2579 ApplyAnimation(playerid, "BD_FIRE", "null", 0, 0, 0, 0, 0, 0, 0);
2580 ApplyAnimation(playerid, "benchpress", "null", 0, 0, 0, 0, 0, 0, 0);
2581 ApplyAnimation(playerid, "BF_injection", "null", 0, 0, 0, 0, 0, 0, 0);
2582 ApplyAnimation(playerid, "BIKED", "null", 0, 0, 0, 0, 0, 0, 0);
2583 ApplyAnimation(playerid, "BIKEH", "null", 0, 0, 0, 0, 0, 0, 0);
2584 ApplyAnimation(playerid, "BIKELEAP", "null", 0, 0, 0, 0, 0, 0, 0);
2585 ApplyAnimation(playerid, "BIKES", "null", 0, 0, 0, 0, 0, 0, 0);
2586 ApplyAnimation(playerid, "BIKEV", "null", 0, 0, 0, 0, 0, 0, 0);
2587 ApplyAnimation(playerid, "BIKE_DBZ", "null", 0, 0, 0, 0, 0, 0, 0);
2588 ApplyAnimation(playerid, "BMX", "null", 0, 0, 0, 0, 0, 0, 0);
2589 ApplyAnimation(playerid, "BOX", "null", 0, 0, 0, 0, 0, 0, 0);
2590 ApplyAnimation(playerid, "BSKTBALL", "null", 0, 0, 0, 0, 0, 0, 0);
2591 ApplyAnimation(playerid, "BUDDY", "null", 0, 0, 0, 0, 0, 0, 0);
2592 ApplyAnimation(playerid, "BUS", "null", 0, 0, 0, 0, 0, 0, 0);
2593 ApplyAnimation(playerid, "CAMERA", "null", 0, 0, 0, 0, 0, 0, 0);
2594 ApplyAnimation(playerid, "CAR", "null", 0, 0, 0, 0, 0, 0, 0);
2595 ApplyAnimation(playerid, "CAR_CHAT", "null", 0, 0, 0, 0, 0, 0, 0);
2596 ApplyAnimation(playerid, "CASINO", "null", 0, 0, 0, 0, 0, 0, 0);
2597 ApplyAnimation(playerid, "CHAINSAW", "null", 0, 0, 0, 0, 0, 0, 0);
2598 ApplyAnimation(playerid, "CHOPPA", "null", 0, 0, 0, 0, 0, 0, 0);
2599 ApplyAnimation(playerid, "CLOTHES", "null", 0, 0, 0, 0, 0, 0, 0);
2600 ApplyAnimation(playerid, "COACH", "null", 0, 0, 0, 0, 0, 0, 0);
2601 ApplyAnimation(playerid, "COLT45", "null", 0, 0, 0, 0, 0, 0, 0);
2602 ApplyAnimation(playerid, "COP_DVBYZ", "null", 0, 0, 0, 0, 0, 0, 0);
2603 ApplyAnimation(playerid, "CRIB", "null", 0, 0, 0, 0, 0, 0, 0);
2604 ApplyAnimation(playerid, "DAM_JUMP", "null", 0, 0, 0, 0, 0, 0, 0);
2605 ApplyAnimation(playerid, "DANCING", "null", 0, 0, 0, 0, 0, 0, 0);
2606 ApplyAnimation(playerid, "DILDO", "null", 0, 0, 0, 0, 0, 0, 0);
2607 ApplyAnimation(playerid, "DODGE", "null", 0, 0, 0, 0, 0, 0, 0);
2608 ApplyAnimation(playerid, "DOZER", "null", 0, 0, 0, 0, 0, 0, 0);
2609 ApplyAnimation(playerid, "DRIVEBYS", "null", 0, 0, 0, 0, 0, 0, 0);
2610 ApplyAnimation(playerid, "FAT", "null", 0, 0, 0, 0, 0, 0, 0);
2611 ApplyAnimation(playerid, "FIGHT_B", "null", 0, 0, 0, 0, 0, 0, 0);
2612 ApplyAnimation(playerid, "FIGHT_C", "null", 0, 0, 0, 0, 0, 0, 0);
2613 ApplyAnimation(playerid, "FIGHT_D", "null", 0, 0, 0, 0, 0, 0, 0);
2614 ApplyAnimation(playerid, "FIGHT_E", "null", 0, 0, 0, 0, 0, 0, 0);
2615 ApplyAnimation(playerid, "FINALE", "null", 0, 0, 0, 0, 0, 0, 0);
2616 ApplyAnimation(playerid, "FINALE2", "null", 0, 0, 0, 0, 0, 0, 0);
2617 ApplyAnimation(playerid, "Flowers", "null", 0, 0, 0, 0, 0, 0, 0);
2618 ApplyAnimation(playerid, "FOOD", "null", 0, 0, 0, 0, 0, 0, 0);
2619 ApplyAnimation(playerid, "Freeweights", "null", 0, 0, 0, 0, 0, 0, 0);
2620 ApplyAnimation(playerid, "GANGS", "null", 0, 0, 0, 0, 0, 0, 0);
2621 ApplyAnimation(playerid, "GHANDS", "null", 0, 0, 0, 0, 0, 0, 0);
2622 ApplyAnimation(playerid, "GHETTO_DB", "null", 0, 0, 0, 0, 0, 0, 0);
2623 ApplyAnimation(playerid, "goggles", "null", 0, 0, 0, 0, 0, 0, 0);
2624 ApplyAnimation(playerid, "GRAFFITI", "null", 0, 0, 0, 0, 0, 0, 0);
2625 ApplyAnimation(playerid, "GRAVEYARD", "null", 0, 0, 0, 0, 0, 0, 0);
2626 ApplyAnimation(playerid, "GRENADE", "null", 0, 0, 0, 0, 0, 0, 0);
2627 ApplyAnimation(playerid, "GYMNASIUM", "null", 0, 0, 0, 0, 0, 0, 0);
2628 ApplyAnimation(playerid, "HAIRCUTS", "null", 0, 0, 0, 0, 0, 0, 0);
2629 ApplyAnimation(playerid, "HEIST9", "null", 0, 0, 0, 0, 0, 0, 0);
2630 ApplyAnimation(playerid, "INT_HOUSE", "null", 0, 0, 0, 0, 0, 0, 0);
2631 ApplyAnimation(playerid, "INT_OFFICE", "null", 0, 0, 0, 0, 0, 0, 0);
2632 ApplyAnimation(playerid, "INT_SHOP", "null", 0, 0, 0, 0, 0, 0, 0);
2633 ApplyAnimation(playerid, "JST_BUISNESS", "null", 0, 0, 0, 0, 0, 0, 0);
2634 ApplyAnimation(playerid, "KART", "null", 0, 0, 0, 0, 0, 0, 0);
2635 ApplyAnimation(playerid, "KISSING", "null", 0, 0, 0, 0, 0, 0, 0);
2636 ApplyAnimation(playerid, "KNIFE", "null", 0, 0, 0, 0, 0, 0, 0);
2637 ApplyAnimation(playerid, "LAPDAN1", "null", 0, 0, 0, 0, 0, 0, 0);
2638 ApplyAnimation(playerid, "LAPDAN2", "null", 0, 0, 0, 0, 0, 0, 0);
2639 ApplyAnimation(playerid, "LAPDAN3", "null", 0, 0, 0, 0, 0, 0, 0);
2640 ApplyAnimation(playerid, "LOWRIDER", "null", 0, 0, 0, 0, 0, 0, 0);
2641 ApplyAnimation(playerid, "MD_CHASE", "null", 0, 0, 0, 0, 0, 0, 0);
2642 ApplyAnimation(playerid, "MEDIC", "null", 0, 0, 0, 0, 0, 0, 0);
2643 ApplyAnimation(playerid, "MD_END", "null", 0, 0, 0, 0, 0, 0, 0);
2644 ApplyAnimation(playerid, "MISC", "null", 0, 0, 0, 0, 0, 0, 0);
2645 ApplyAnimation(playerid, "MTB", "null", 0, 0, 0, 0, 0, 0, 0);
2646 ApplyAnimation(playerid, "MUSCULAR", "null", 0, 0, 0, 0, 0, 0, 0);
2647 ApplyAnimation(playerid, "NEVADA", "null", 0, 0, 0, 0, 0, 0, 0);
2648 ApplyAnimation(playerid, "ON_LOOKERS", "null", 0, 0, 0, 0, 0, 0, 0);
2649 ApplyAnimation(playerid, "OTB", "null", 0, 0, 0, 0, 0, 0, 0);
2650 ApplyAnimation(playerid, "PARACHUTE", "null", 0, 0, 0, 0, 0, 0, 0);
2651 ApplyAnimation(playerid, "PARK", "null", 0, 0, 0, 0, 0, 0, 0);
2652 ApplyAnimation(playerid, "PAULNMAC", "null", 0, 0, 0, 0, 0, 0, 0);
2653 ApplyAnimation(playerid, "PED", "null", 0, 0, 0, 0, 0, 0, 0);
2654 ApplyAnimation(playerid, "PLAYER_DVBYS", "null", 0, 0, 0, 0, 0, 0, 0);
2655 ApplyAnimation(playerid, "PLAYIDLES", "null", 0, 0, 0, 0, 0, 0, 0);
2656 ApplyAnimation(playerid, "POLICE", "null", 0, 0, 0, 0, 0, 0, 0);
2657 ApplyAnimation(playerid, "POOL", "null", 0, 0, 0, 0, 0, 0, 0);
2658 ApplyAnimation(playerid, "POOR", "null", 0, 0, 0, 0, 0, 0, 0);
2659 ApplyAnimation(playerid, "PYTHON", "null", 0, 0, 0, 0, 0, 0, 0);
2660 ApplyAnimation(playerid, "QUAD", "null", 0, 0, 0, 0, 0, 0, 0);
2661 ApplyAnimation(playerid, "QUAD_DBZ", "null", 0, 0, 0, 0, 0, 0, 0);
2662 ApplyAnimation(playerid, "RIFLE", "null", 0, 0, 0, 0, 0, 0, 0);
2663 ApplyAnimation(playerid, "RIOT", "null", 0, 0, 0, 0, 0, 0, 0);
2664 ApplyAnimation(playerid, "ROB_BANK", "null", 0, 0, 0, 0, 0, 0, 0);
2665 ApplyAnimation(playerid, "ROCKET", "null", 0, 0, 0, 0, 0, 0, 0);
2666 ApplyAnimation(playerid, "RUSTLER", "null", 0, 0, 0, 0, 0, 0, 0);
2667 ApplyAnimation(playerid, "RYDER", "null", 0, 0, 0, 0, 0, 0, 0);
2668 ApplyAnimation(playerid, "SCRATCHING", "null", 0, 0, 0, 0, 0, 0, 0);
2669 ApplyAnimation(playerid, "SHAMAL", "null", 0, 0, 0, 0, 0, 0, 0);
2670 ApplyAnimation(playerid, "SHOTGUN", "null", 0, 0, 0, 0, 0, 0, 0);
2671 ApplyAnimation(playerid, "SILENCED", "null", 0, 0, 0, 0, 0, 0, 0);
2672 ApplyAnimation(playerid, "SKATE", "null", 0, 0, 0, 0, 0, 0, 0);
2673 ApplyAnimation(playerid, "SPRAYCAN", "null", 0, 0, 0, 0, 0, 0, 0);
2674 ApplyAnimation(playerid, "STRIP", "null", 0, 0, 0, 0, 0, 0, 0);
2675 ApplyAnimation(playerid, "SUNBATHE", "null", 0, 0, 0, 0, 0, 0, 0);
2676 ApplyAnimation(playerid, "SWAT", "null", 0, 0, 0, 0, 0, 0, 0);
2677 ApplyAnimation(playerid, "SWEET", "null", 0, 0, 0, 0, 0, 0, 0);
2678 ApplyAnimation(playerid, "SWIM", "null", 0, 0, 0, 0, 0, 0, 0);
2679 ApplyAnimation(playerid, "SWORD", "null", 0, 0, 0, 0, 0, 0, 0);
2680 ApplyAnimation(playerid, "TANK", "null", 0, 0, 0, 0, 0, 0, 0);
2681 ApplyAnimation(playerid, "TATTOOS", "null", 0, 0, 0, 0, 0, 0, 0);
2682 ApplyAnimation(playerid, "TEC", "null", 0, 0, 0, 0, 0, 0, 0);
2683 ApplyAnimation(playerid, "TRAIN", "null", 0, 0, 0, 0, 0, 0, 0);
2684 ApplyAnimation(playerid, "TRUCK", "null", 0, 0, 0, 0, 0, 0, 0);
2685 ApplyAnimation(playerid, "UZI", "null", 0, 0, 0, 0, 0, 0, 0);
2686 ApplyAnimation(playerid, "VAN", "null", 0, 0, 0, 0, 0, 0, 0);
2687 ApplyAnimation(playerid, "VENDING", "null", 0, 0, 0, 0, 0, 0, 0);
2688 ApplyAnimation(playerid, "VORTEX", "null", 0, 0, 0, 0, 0, 0, 0);
2689 ApplyAnimation(playerid, "WAYFARER", "null", 0, 0, 0, 0, 0, 0, 0);
2690 ApplyAnimation(playerid, "WEAPONS", "null", 0, 0, 0, 0, 0, 0, 0);
2691 ApplyAnimation(playerid, "WUZI", "null", 0, 0, 0, 0, 0, 0, 0);
2692 ApplyAnimation(playerid, "SNM", "null", 0, 0, 0, 0, 0, 0, 0);
2693 ApplyAnimation(playerid, "BLOWJOBZ", "null", 0, 0, 0, 0, 0, 0, 0);
2694 ApplyAnimation(playerid, "SEX", "null", 0, 0, 0, 0, 0, 0, 0);
2695 ApplyAnimation(playerid, "BOMBER", "null", 0, 0, 0, 0, 0, 0, 0);
2696 ApplyAnimation(playerid, "RAPPING", "null", 0, 0, 0, 0, 0, 0, 0);
2697 ApplyAnimation(playerid, "SHOP", "null", 0, 0, 0, 0, 0, 0, 0);
2698 ApplyAnimation(playerid, "BEACH", "null", 0, 0, 0, 0, 0, 0, 0);
2699 ApplyAnimation(playerid, "SMOKING", "null", 0, 0, 0, 0, 0, 0, 0);
2700 ApplyAnimation(playerid, "FOOD", "null", 0, 0, 0, 0, 0, 0, 0);
2701 ApplyAnimation(playerid, "ON_LOOKERS", "null", 0, 0, 0, 0, 0, 0, 0);
2702 ApplyAnimation(playerid, "DEALER", "null", 0, 0, 0, 0, 0, 0, 0);
2703 ApplyAnimation(playerid, "CRACK", "null", 0, 0, 0, 0, 0, 0, 0);
2704 ApplyAnimation(playerid, "CARRY", "null", 0, 0, 0, 0, 0, 0, 0);
2705 ApplyAnimation(playerid, "COP_AMBIENT", "null", 0, 0, 0, 0, 0, 0, 0);
2706 ApplyAnimation(playerid, "PARK", "null", 0, 0, 0, 0, 0, 0, 0);
2707 ApplyAnimation(playerid, "INT_HOUSE", "null", 0, 0, 0, 0, 0, 0, 0);
2708 ApplyAnimation(playerid, "FOOD", "null", 0, 0, 0, 0, 0, 0, 0);
2709}
2710
2711stock LoadTextdraws()
2712{
2713 StopAnim = TextDrawCreate(610.0, 400.0,
2714 "~r~~k~~PED_SPRINT~ ~w~to stop the animation");
2715 TextDrawUseBox(StopAnim, 0);
2716 TextDrawFont(StopAnim, 2);
2717 TextDrawSetShadow(StopAnim,0);
2718 TextDrawSetOutline(StopAnim,1);
2719 TextDrawBackgroundColor(StopAnim,0x000000FF);
2720 TextDrawColor(StopAnim,0xFFFFFFFF);
2721 TextDrawAlignment(StopAnim,3);
2722
2723 BoxNotice = TextDrawCreate(174.000000, 181.000000, "Box");
2724 TextDrawBackgroundColor(BoxNotice, 0);
2725 TextDrawFont(BoxNotice, 1);
2726 TextDrawLetterSize(BoxNotice, 1.590000, 7.700005);
2727 TextDrawColor(BoxNotice, 0);
2728 TextDrawSetOutline(BoxNotice, 0);
2729 TextDrawSetProportional(BoxNotice, 1);
2730 TextDrawSetShadow(BoxNotice, 1);
2731 TextDrawUseBox(BoxNotice, 1);
2732 TextDrawBoxColor(BoxNotice, 100);
2733 TextDrawTextSize(BoxNotice, 454.000000, 18.000000);
2734
2735 LoadingNotice = TextDrawCreate(313.000000, 193.000000, "Loading...");
2736 TextDrawAlignment(LoadingNotice, 2);
2737 TextDrawBackgroundColor(LoadingNotice, 255);
2738 TextDrawFont(LoadingNotice, 2);
2739 TextDrawLetterSize(LoadingNotice, 0.629999, 3.000000);
2740 TextDrawColor(LoadingNotice, -1);
2741 TextDrawSetOutline(LoadingNotice, 1);
2742 TextDrawSetProportional(LoadingNotice, 1);
2743}
2744
2745stock IsValidPassword(const password[])
2746{
2747 for(new i = 0; password[i] != EOS; ++i)
2748 {
2749 switch(password[i])
2750 {
2751 case '0'..'9', 'A'..'Z', 'a'..'z': continue;
2752 default: return false;
2753 }
2754 }
2755 return true;
2756}
2757
2758ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5)
2759{
2760 new Float:pPosition[3], Float:oPosition[3];
2761 GetPlayerPos(playerid, pPosition[0], pPosition[1], pPosition[2]);
2762 foreach(new i: Player)
2763 {
2764 if (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
2765 {
2766 GetPlayerPos(i, oPosition[0], oPosition[1], oPosition[2]);
2767 if(IsPlayerInRangeOfPoint(i, radi / 16, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col1, string); }
2768 else if(IsPlayerInRangeOfPoint(i, radi / 8, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col2, string); }
2769 else if(IsPlayerInRangeOfPoint(i, radi / 4, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col3, string); }
2770 else if(IsPlayerInRangeOfPoint(i, radi / 2, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col4, string); }
2771 else if(IsPlayerInRangeOfPoint(i, radi, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col5, string); }
2772 }
2773 }
2774 return 1;
2775}
2776
2777stock str_replace(string[], oldchar, newchar)
2778{
2779 for(new i = 0; i < strlen(string); i++)
2780 {
2781 if(string[i] == oldchar)
2782 {
2783 string[i] = newchar;
2784 }
2785 }
2786}
2787
2788stock GetName(playerid)
2789{
2790 new pName[MAX_PLAYER_NAME];
2791 GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
2792 return pName;
2793}
2794
2795stock GetPlayerNameEx(playerid)
2796{
2797 new pName[MAX_PLAYER_NAME];
2798 GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
2799 str_replace(pName, '_', ' ');
2800 return pName;
2801}
2802
2803stock ClearScreen(playerid)
2804{
2805 for(new i=0; i < 20; i++)
2806 {
2807 SendClientMessageEx(playerid, COLOR_WHITE, "");
2808 }
2809}
2810
2811stock SendClientMessageEx(playerid, color, message[])
2812{
2813 return SendClientMessage(playerid, color, message);
2814}
2815
2816stock SendClientMessageToAllEx(color, message[])
2817{
2818 return SendClientMessageToAll(color, message);
2819}
2820
2821stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[])
2822{
2823 PlayerInfo[playerid][CurrentDialog] = dialogid;
2824 if(PlayerInfo[playerid][CurrentDialog] == dialogid) return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
2825 return 1;
2826}
2827
2828stock AntiDeAMX()
2829{
2830 new a[][] =
2831 {
2832 "Unarmed (Fist)",
2833 "Brass K"
2834 };
2835 #pragma unused a
2836}
2837
2838stock HashInput(text[])
2839{
2840 new string[129];
2841 WP_Hash(string, sizeof(string), text);
2842 return string;
2843}
2844
2845stock DB_Escape(text[])
2846{
2847 new ret[160], ch, i, j;
2848 while ((ch = text[i++]) && j < sizeof (ret))
2849 {
2850 if (ch == '\'')
2851 {
2852 if (j < sizeof (ret) - 2)
2853 {
2854 ret[j++] = '\'';
2855 ret[j++] = '\'';
2856 }
2857 }
2858 else if (j < sizeof (ret))
2859 {
2860 ret[j++] = ch;
2861 }
2862 else
2863 {
2864 j++;
2865 }
2866 }
2867 ret[sizeof (ret) - 1] = '\0';
2868 return ret;
2869}
2870//------------------------------------------------------------------------------
2871// END OF SCRIPT
2872//------------------------------------------------------------------------------