· 10 years ago · Mar 12, 2016, 05:39 PM
1/*
2 __________________________________________________
3 | |
4 | Base SQLite Script |
5 | ------------------ |
6 | Creata da: EdwardStone |
7 | |
8 |__________________________________________________|
9
10*/
11//------------------------------------------------------------------------------
12// INCLUDE
13//------------------------------------------------------------------------------
14#include <a_samp>
15#include <sscanf2>
16#include <streamer>
17#include <zcmd>
18#include <YSI\y_timers>
19//------------------------------------------------------------------------------
20// CONFIGURAZIONE SERVER
21//------------------------------------------------------------------------------
22#define SERVER_NAME "tscript (Roleplay)"
23#define SERVER_RCON "123"
24#define SERVER_PASSWORD "0"
25#define SERVER_VERSION "tscript v1.0"
26#define SERVER_MAP "Los Santos"
27#define SERVER_WEBSITE "//"
28#define SERVER_TEAMSPEAK "//"
29
30//------------------------------------------------------------------------------
31// I Define
32//------------------------------------------------------------------------------
33// Colori
34#define COLOR_WHITE 0xFFFFFFAA
35#define COLOR_BLACK 0x000000FF
36#define COLOR_GREY 0xB4B5B7FF
37#define COLOR_YELLOW 0xFFFF00AA
38#define COLOR_RED 0xAA3333AA
39#define COLOR_ORANGE 0xF69521AA
40#define COLOR_GREEN 0x33AA33AA
41#define COLOR_PURPLE 0xC2A2DAAA
42#define COLOR_CYAN 0x00FFFFFF
43#define COLOR_GOLD 0xFFD700FF
44#define COLOR_LIME 0x00FF00FF
45#define COLOR_TEAL 0x008080AA
46#define COLOR_HOTPINK 0xFF69B4FF
47#define COLOR_LAVENDER 0xE6E6FAFF
48#define COLOR_LIGHTRED 0xFF6347AA
49#define COLOR_CYANBLUE 0x01FCFFC8
50#define COLOR_LIGHTBLUE 0x33CCFFAA
51
52#define COLOR_NEWBIE 0xBED9EFFF
53
54// Fade
55#define COLOR_FADE1 0xE6E6E6E6
56#define COLOR_FADE2 0xC8C8C8C8
57#define COLOR_FADE3 0xAAAAAAAA
58#define COLOR_FADE4 0x8C8C8C8C
59#define COLOR_FADE5 0x6E6E6E6E
60
61// Dialoghi
62#define DIALOG_REGISTER (1)
63#define DIALOG_LOGIN (2)
64#define DIALOG_BANINFO (3)
65#define DIALOG_AGE (4)
66#define DIALOG_GENDER (5)
67#define DIALOG_SKIN (6)
68// Configurazione
69#define MAX_DOORS (100)
70#define MAX_GROUPS (10)
71
72//------------------------------------------------------------------------------
73// MACRO
74//------------------------------------------------------------------------------
75#define IsPlayerLogged(%0) GetPVarInt(%0, "gLogged")
76#define IsPlayerTabbed(%0) gettime() > (PlayerInfo[%0][pLastUpdate] + 2)
77
78//------------------------------------------------------------------------------
79// NATIVES
80//------------------------------------------------------------------------------
81native WP_Hash(buffer[], len, const str[]);
82
83//------------------------------------------------------------------------------
84// VARIABILI
85//------------------------------------------------------------------------------
86// Variabili del server
87new DB:Database;
88new WorldTime[3];
89
90// Textdraw
91new Text:StopAnim;
92new Text:BoxNotice;
93new Text:LoadingNotice;
94
95// Enumerazioni
96enum pInfo
97{
98 // Variabili store
99 pID,
100 pUsername[MAX_PLAYER_NAME],
101 pAge,
102 pGender,
103 pRegistered,
104 pMember,
105 pRank,
106 pLeader,
107 pIP[16],
108 pBanned,
109 pBanReason[64],
110 pBanExpiry,
111 pJailTime,
112 pJailReason[64],
113 pNMute,
114 pRMute,
115 pAdminLevel,
116 pSecondaryTask,
117 pMoney,
118 Float:pPositionX,
119 Float:pPositionY,
120 Float:pPositionZ,
121 Float:pFacingAngle,
122 pInterior,
123 pVirtualWorld,
124 pSkin,
125 Float:pHealth,
126 Float:pArmour,
127 // Unstored Variables
128 pReport[128],
129 pTogNewbie,
130 pLastUpdate,
131 PlayerAnimLibsPreloaded,
132 gPlayerUsingLoopingAnim,
133 CurrentDialog,
134}
135new PlayerInfo[MAX_PLAYERS][pInfo];
136
137enum dInfo
138{
139 Float:dExteriorX,
140 Float:dExteriorY,
141 Float:dExteriorZ,
142 Float:dExteriorAngle,
143 dExteriorInt,
144 dExteriorVir,
145 Float:dInteriorX,
146 Float:dInteriorY,
147 Float:dInteriorZ,
148 Float:dInteriorAngle,
149 dInteriorInt,
150 dInteriorVir,
151 dName[64],
152 dPickup,
153 Text3D:dDynamicText
154}
155new DoorInfo[MAX_DOORS][dInfo];
156
157enum gInfo
158{
159 gName[32],
160 gType,
161 gRank0[32],
162 gRank1[32],
163 gRank2[32],
164 gRank3[32],
165 gRank4[32],
166 gRank5[32],
167 gRank6[32]
168
169};
170new GroupInfo[MAX_GROUPS][gInfo];
171
172//------------------------------------------------------------------------------
173// FORWARD
174//------------------------------------------------------------------------------
175// NULLA
176//------------------------------------------------------------------------------
177// FUNZIONI
178//------------------------------------------------------------------------------
179main()
180{
181 SendRconCommand("hostname "SERVER_NAME);
182 SendRconCommand("rcon_password "SERVER_RCON);
183 SendRconCommand("gamemodetext "SERVER_VERSION);
184 SendRconCommand("mapname "SERVER_MAP);
185 SendRconCommand("weburl "SERVER_WEBSITE);
186 SendRconCommand("password "SERVER_PASSWORD);
187 printf(""SERVER_NAME" ("SERVER_VERSION"), sono state caricate correttamente.");
188}
189//------------------------------------------------------------------------------
190// CALLBACK
191//------------------------------------------------------------------------------
192public OnGameModeInit()
193{
194 AntiDeAMX();
195
196 Database = db_open("database.db");
197 new string[1024];
198 strcat(string, "CREATE TABLE IF NOT EXISTS Accounts(");
199 strcat(string, "UserID INTEGER PRIMARY KEY AUTOINCREMENT,");
200 strcat(string, "Username VARCHAR(24) COLLATE NOCASE,");
201 strcat(string, "Password VARCHAR(128),");
202 strcat(string, "IP VARCHAR(16),");
203 strcat(string, "Age INTEGER DEFAULT 0 NOT NULL,");
204 strcat(string, "Gender INTEGER DEFAULT 0 NOT NULL,");
205 strcat(string, "Registered INTEGER DEFAULT 0 NOT NULL,");
206 strcat(string, "Member INTEGER DEFAULT 0 NOT NULL,");
207 strcat(string, "Rank INTEGER DEFAULT 0 NOT NULL,");
208 strcat(string, "Leader INTEGER DEFAULT 0 NOT NULL,");
209 strcat(string, "Banned INTEGER DEFAULT 0 NOT NULL,");
210 strcat(string, "BanReason VARCHAR(64),");
211 strcat(string, "BanExpiry INTEGER DEFAULT 0 NOT NULL,");
212 strcat(string, "JailTime INTEGER DEFAULT 0 NOT NULL,");
213 strcat(string, "JailReason VARCHAR(64),");
214 strcat(string, "NMute INTEGER DEFAULT 0 NOT NULL,");
215 strcat(string, "RMute INTEGER DEFAULT 0 NOT NULL,");
216 strcat(string, "AdminLevel INTEGER DEFAULT 0 NOT NULL,");
217 strcat(string, "SecondaryTask INTEGER DEFAULT 0 NOT NULL,");
218 strcat(string, "Money INTEGER DEFAULT 0 NOT NULL,");
219 strcat(string, "PositionX FLOAT DEFAULT 0.0,");
220 strcat(string, "PositionY FLOAT DEFAULT 0.0,");
221 strcat(string, "PositionZ FLOAT DEFAULT 0.0,");
222 strcat(string, "FacingAngle FLOAT DEFAULT 0.0,");
223 strcat(string, "Interior INTEGER DEFAULT 0 NOT NULL,");
224 strcat(string, "VirtualWorld INTEGER DEFAULT 0 NOT NULL,");
225 strcat(string, "Health FLOAT DEFAULT 0.0,");
226 strcat(string, "Armour FLOAT DEFAULT 0.0,");
227 strcat(string, "Skin INTEGER DEFAULT 0 NOT NULL)");
228 db_query(Database, string);
229
230 format(string, sizeof(string), "");
231 strcat(string, "CREATE TABLE IF NOT EXISTS Doors(");
232 strcat(string, "TITLE VARCHAR(24),");
233 strcat(string, "EXTERIOR_POSX FLOAT DEFAULT 0.0,");
234 strcat(string, "EXTERIOR_POSY FLOAT DEFAULT 0.0,");
235 strcat(string, "EXTERIOR_POSZ FLOAT DEFAULT 0.0,");
236 strcat(string, "EXTERIOR_INT INTEGER DEFAULT 0 NOT NULL,");
237 strcat(string, "EXTERIOR_VW INTEGER DEFAULT 0 NOT NULL,");
238 strcat(string, "EXTERIOR_ANGLE FLOAT DEFAULT 0.0,");
239 strcat(string, "INTERIOR_POSX FLOAT DEFAULT 0.0,");
240 strcat(string, "INTERIOR_POSY FLOAT DEFAULT 0.0,");
241 strcat(string, "INTERIOR_POSZ FLOAT DEFAULT 0.0,");
242 strcat(string, "INTERIOR_INT INTEGER DEFAULT 0 NOT NULL,");
243 strcat(string, "INTERIOR_VW INTEGER DEFAULT 0 NOT NULL,");
244 strcat(string, "INTERIOR_ANGLE FLOAT DEFAULT 0.0)");
245 db_query(Database, string);
246
247 format(string, sizeof(string), "");
248 strcat(string, "CREATE TABLE IF NOT EXISTS Groups(");
249 strcat(string, "Name VARCHAR(24),");
250 strcat(string, "Type INTEGER DEFAULT 0 NOT NULL,");
251 strcat(string, "Rank0 INTEGER DEFAULT 0 NOT NULL,");
252 strcat(string, "Rank1 INTEGER DEFAULT 0 NOT NULL,");
253 strcat(string, "Rank2 INTEGER DEFAULT 0 NOT NULL,");
254 strcat(string, "Rank3 INTEGER DEFAULT 0 NOT NULL,");
255 strcat(string, "Rank4 INTEGER DEFAULT 0 NOT NULL,");
256 strcat(string, "Rank5 INTEGER DEFAULT 0 NOT NULL,");
257 strcat(string, "Rank6 INTEGER DEFAULT 0 NOT NULL)");
258 db_query(Database, string);
259
260 EnableStuntBonusForAll(0);
261 SetNameTagDrawDistance(15.0);
262 ShowPlayerMarkers(0);
263 DisableInteriorEnterExits();
264
265 LoadTextdraws();
266
267 gettime(WorldTime[0], WorldTime[1], WorldTime[2]);
268 SetWorldTime(WorldTime[0]);
269 return 1;
270}
271
272public OnGameModeExit()
273{
274 db_close(Database);
275 return 1;
276}
277
278public OnPlayerConnect(playerid)
279{
280 SetPlayerColor(playerid, COLOR_WHITE);
281 ResetPlayerVariables(playerid);
282 ClearScreen(playerid);
283 TogglePlayerSpectating(playerid, true);
284
285 SetPVarInt(playerid, "gLogged", 0);
286 SetPVarInt(playerid, "FailedLoginAttempt", 0);
287
288 // Rimuovere ogni Sprunk e distributore automatico
289 RemoveBuildingForPlayer(playerid, 955, 0, 0, 0, 25000);
290 RemoveBuildingForPlayer(playerid, 956, 0, 0, 0, 25000);
291
292 // Account e registrazione
293 new DBResult:dbresult, szQuery[128];
294 GetPlayerName(playerid, PlayerInfo[playerid][pUsername], MAX_PLAYER_NAME);
295 format(szQuery, sizeof(szQuery), "SELEZIONA * Da un account l'username = '%s'", DB_Escape(PlayerInfo[playerid][pUsername]));
296 dbresult = db_query(Database, szQuery);
297 if(db_num_rows(dbresult) > 0) ShowPlayerDialogEx(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}"SERVER_NAME" - Autenticazione", "{FFFFFF}Benvenuto in "SERVER_NAME".\nSi prega di inserie la password per entrare nel server.", "Logga", "Esci");
298 else ShowPlayerDialogEx(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{00FF00}"SERVER_NAME" - Autenticazione", "{FFFFFF}Benvenuto "SERVER_NAME".\nInserisci una password da te desiderata per creare l'account.", "Registrati", "Esci");
299 db_free_result(dbresult);
300 return 1;
301}
302
303public OnPlayerDisconnect(playerid, reason)
304{
305 SavePlayerAccount(playerid);
306 return 1;
307}
308
309public OnPlayerRequestClass(playerid, classid)
310{
311 if(!IsPlayerLogged(playerid)) return Kick(playerid);
312 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);
313 SpawnPlayer(playerid);
314 return 1;
315}
316
317public OnPlayerSpawn(playerid)
318{
319 SetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
320 SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
321 SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);
322 SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]);
323 SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
324 SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
325 SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
326 if(!PlayerInfo[playerid][PlayerAnimLibsPreloaded])
327 {
328 PreloadAnimLib(playerid);
329 PlayerInfo[playerid][PlayerAnimLibsPreloaded] = 1;
330 }
331 TogglePlayerControllable(playerid, true);
332 TextDrawHideForPlayer(playerid, BoxNotice);
333 TextDrawHideForPlayer(playerid, LoadingNotice);
334 return 1;
335}
336
337public OnPlayerDeath(playerid, killerid, reason)
338{
339 if(!PlayerInfo[playerid][gPlayerUsingLoopingAnim]) return 1;
340 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 0;
341 TextDrawHideForPlayer(playerid, StopAnim);
342 return 1;
343}
344
345public OnPlayerText(playerid, text[])
346{
347 new string[128];
348 format(string, sizeof(string), "%s dice: %s", GetPlayerNameEx(playerid), text);
349 SetPlayerChatBubble(playerid, text, COLOR_WHITE, 20.0, 10000);
350 ProxDetector(20.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
351}
352
353public OnPlayerUpdate(playerid)
354{
355 PlayerInfo[playerid][pLastUpdate] = gettime();
356 return 1;
357}
358
359public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
360{
361 if(IsKeyJustDown(KEY_SPRINT, newkeys, oldkeys))
362 {
363 if(PlayerInfo[playerid][gPlayerUsingLoopingAnim])
364 {
365 StopLoopingAnim(playerid);
366 TextDrawHideForPlayer(playerid, StopAnim);
367 }
368 }
369 return 1;
370}
371
372public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
373{
374 if(PlayerInfo[playerid][CurrentDialog] != dialogid)
375 {
376 printf("%s potrebbe aver tentato di falsificare la finetra ID %d, è stato kickato.", PlayerInfo[playerid][pUsername], dialogid);
377 return Kick(playerid);
378 }
379 switch(dialogid)
380 {
381 case DIALOG_REGISTER:
382 {
383 if(!response)
384 {
385 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Sei stato kickato dal server per non essere riuscito a rispondere.");
386 Kick(playerid);
387 }
388 if(!IsValidPassword(inputtext))
389 {
390 SendClientMessageEx(playerid, COLOR_RED, "SERVER: La password è sbagliata. Usare solo lettere dell'alfabeto e i numeri per la password." );
391 return ShowPlayerDialogEx(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{00FF00}"SERVER_NAME" - Autenticazione", "{FFFFFF}Benvenuto "SERVER_NAME".\nInserisci una password da te desiderata per creare l'account.", "Registrati", "Esci");
392 }
393 if(strlen(inputtext) < 3 || strlen(inputtext) > 24)
394 {
395 SendClientMessageEx(playerid, COLOR_RED, "SERVER: La password è sbagliata. Il massimo dei caratteri nella password è di 24." );
396 return ShowPlayerDialogEx(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{00FF00}"SERVER_NAME" - Autenticazione", "{FFFFFF}Benvenuto "SERVER_NAME".\nInserisci una password da te desiderata per creare l'account.", "Registrati", "Esci");
397 }
398 new szQuery[256];
399 format(szQuery, sizeof(szQuery), "INSERITO IN Accounts (Username, Password) VALORE ('%s', '%s')", DB_Escape(PlayerInfo[playerid][pUsername]), DB_Escape(HashInput(inputtext)));
400 db_query(Database, szQuery);
401
402 ShowPlayerDialogEx(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" - Seleziona gli anni", "{FFFFFF}Sei appena arrivato nella famosa "SERVER_MAP".\n{FFDD00}Doganiere{FFFFFF} sta guardando il tuo passaporto, cercando di identificarti.\nQuanti anni ha il tuo personaggio? (Inserisci un età tra 18 a 80)", "Invia", "Esci");
403
404 }
405 case DIALOG_LOGIN:
406 {
407 if(!response)
408 {
409 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Sei stato kickato dal server per non essere riuscito a rispondere.");
410 Kick(playerid);
411 }
412 new DBResult:dbresult, szQuery[256];
413 format(szQuery, sizeof(szQuery), "SELEZIONA * DAL account nell'username = '%s' E Password = '%s'", DB_Escape(PlayerInfo[playerid][pUsername]), DB_Escape(HashInput(inputtext)));
414 dbresult = db_query(Database, szQuery);
415 if(db_num_rows(dbresult) > 0)
416 {
417 SetPVarInt(playerid, "gLogged", 1);
418 if(LoadPlayerAccount(playerid)) SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Sei entrato correttamente nel tuo account.");
419 if(PlayerInfo[playerid][pRegistered] == 0) ShowPlayerDialogEx(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" - Seleziona gli anni", "{FFFFFF}Sei appena arrivato nella famosa "SERVER_MAP".\n{FFDD00}Doganiere{FFFFFF} sta guardando il tuo passaporto, cercando di identificarti.\nQuanti anni ha il tuo personaggio? (Inserisci un età tra 18 a 80)", "Invia", "Esci");
420 else if(PlayerInfo[playerid][pBanned])
421 {
422 new string[128];
423 if(gettime() - PlayerInfo[playerid][pBanExpiry] > 0)
424 {
425 SendClientMessageEx(playerid, COLOR_WHITE, "La tua data del ban è passata e sei stato bannato dal server.");
426 PlayerInfo[playerid][pBanned] = 0;
427 format(PlayerInfo[playerid][pBanReason], 64, "(null)");
428 PlayerInfo[playerid][pBanExpiry] = 0;
429 }
430 else
431 {
432 format(string, sizeof(string), "{FFFFFF}Il tuo account è bannato!\nUsername: %s\nIP: %s\nRagione Ban: %s\nScadenza: %s\n\nSe ritieni che è ingiusto fai una richiesta,\nfaccelo sapere sul nostro forum ("SERVER_WEBSITE").", PlayerInfo[playerid][pUsername], PlayerInfo[playerid][pIP], PlayerInfo[playerid][pBanReason], gettimestamp(PlayerInfo[playerid][pBanExpiry], 3));
433 ShowPlayerDialogEx(playerid, DIALOG_BANINFO, DIALOG_STYLE_MSGBOX, "{FF0000}"SERVER_NAME" - Ban", string, "Esci","");
434 Kick(playerid);
435 }
436 }
437 else
438 {
439 DeletePVar(playerid, "FailedLoginAttempt");
440 TextDrawShowForPlayer(playerid, BoxNotice);
441 TextDrawShowForPlayer(playerid, LoadingNotice);
442 TogglePlayerSpectating(playerid, false);
443 new score = (gettime() - PlayerInfo[playerid][pRegistered])/86400;
444 floatround(score, floatround_round);
445 SetPlayerScore(playerid, score);
446 if(PermissionCheck(playerid, 1))
447 {
448 new string[128];
449 format(string, sizeof(string), "SERVER: Sei loggato in %s.", GetAdminRank(playerid));
450 SendClientMessageEx(playerid, COLOR_WHITE, string);
451 format(string, sizeof(string), "SERVER: %s è loggato nel %s.", GetPlayerNameEx(playerid), GetAdminRank(playerid));
452 SendAdminMessage(COLOR_WHITE, 4, string);
453 }
454 }
455 }
456 else
457 {
458 if(GetPVarInt(playerid, "FailedLoginAttempt") == 0)
459 {
460 SetPVarInt(playerid, "FailedLoginAttempt", 1);
461 SendClientMessageEx(playerid, COLOR_RED, "SERVER: La password è errata, perfavore riprova (1/3 tentativi usati).");
462 }
463 else if(GetPVarInt(playerid, "FailedLoginAttempt") == 1)
464 {
465 SetPVarInt(playerid, "FailedLoginAttempt", 2);
466 SendClientMessageEx(playerid, COLOR_RED, "SERVER: La password è errata, perfavore riprova (2/3 tentativi usati).");
467 }
468 else if(GetPVarInt(playerid, "FailedLoginAttempt") == 2)
469 {
470 SetPVarInt(playerid, "FailedLoginAttempt", 3);
471 SendClientMessageEx(playerid, COLOR_RED, "SERVER: La password è errata, perfavore riprovare (3/3 tentativi usati).");
472 }
473 else if(GetPVarInt(playerid, "FailedLoginAttempt") == 3)
474 {
475 DeletePVar(playerid, "FailedLoginAttempt");
476 SendClientMessageEx(playerid, COLOR_RED, "SERVER: Hai usato tutti i tuoi tentativi per entrare nel server, e quindi sei stato cacciato dal server.");
477 Kick(playerid);
478 }
479 ShowPlayerDialogEx(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF0000}"SERVER_NAME" - Autenticazione", "{FFFFFF}Benvenuto in "SERVER_NAME".\nInserisci la tua password per entrare nel server.", "Logga", "Esci");
480
481 }
482 db_free_result(dbresult);
483 }
484 case DIALOG_BANINFO: Kick(playerid);
485 case DIALOG_AGE:
486 {
487 if(!response)
488 {
489 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Sei stato kickato dal server perchè hai sbagliato a rispondere.");
490 Kick(playerid);
491 }
492 new string[128];
493 if(strval(inputtext) < 18 || strval(inputtext) > 80)
494 {
495 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Il tuo personaggio può avere solamente un età tra 18 a 80.");
496 return ShowPlayerDialogEx(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" - Seleziona gli anni", "{FFFFFF}Sei entrato nella famosa "SERVER_MAP".\n{FFDD00}Gli ufficiali{FFFFFF} stanno guardando il tuo passaporto, cercando di identificarti.\nQuanti anni ha il tuo personaggio? (Inserisci un età tra 18 e 80 anni.)", "Logga", "Esci");
497 }
498 PlayerInfo[playerid][pAge] = strval(inputtext);
499 format(string, sizeof(string), "{FFDD00}Anni Personaggio:{FFFFFF} Tu hai %i anni di età .", PlayerInfo[playerid][pAge]);
500 SendClientMessageEx(playerid, COLOR_WHITE, string);
501
502 ShowPlayerDialogEx(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "{0000FF}"SERVER_NAME" - Genere del personaggio", "Maschio\r\n{F593BA}Femmina", "Seleziona", "Esci");
503 }
504 case DIALOG_GENDER:
505 {
506 if(!response)
507 {
508 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Sei stati kickato dal server per aver sbagliato a rispondere.");
509 Kick(playerid);
510 }
511 switch(listitem)
512 {
513 case 0:
514 {
515 PlayerInfo[playerid][pGender] = 1;
516 SendClientMessageEx(playerid, COLOR_WHITE, "{FFDD00}Genere Personaggio:{FFFFFF} Sei un maschio!.");
517 }
518 case 1:
519 {
520 PlayerInfo[playerid][pGender] = 2;
521 SendClientMessageEx(playerid, COLOR_WHITE, "{FFDD00}Genere Personaggio:{FFFFFF} Sei una femmina!.");
522 }
523 }
524 ShowPlayerDialogEx(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" - Seleziona la Skin", "{FFFFFF}L'apparenza del tuo personaggio è un mistero...\nPerfavore specifica l'ID della skin che vorresti scegliere tra (1-299), gruppo skin ristrette.\nPuoi trovare le skin ID in questo sito {FFDD00}http://wiki.sa-mp.com/wiki/Skins:All{FFFFFF}, fai alt tab per cercarle.", "Logga", "Esci");
525 }
526 case DIALOG_SKIN:
527 {
528 if(!response)
529 {
530 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Sei stato kickato dal server per aver sbagliato a rispondere.");
531 Kick(playerid);
532 }
533 if((strval(inputtext) >= 265 && strval(inputtext) <= 267) || (strval(inputtext) >= 274 && strval(inputtext) <= 288))
534 {
535 SendClientMessageEx(playerid, COLOR_WHITE, "Hai inserito un id invalido (1-299) skin id ristrette.");
536 return ShowPlayerDialogEx(playerid, DIALOG_SKIN, DIALOG_STYLE_INPUT, "{0000FF}"SERVER_NAME" - Seleziona la Skin", "{FFFFFF}L'apparenza del tuo personaggio è un mitero...\nPerfavore specifica l'ID della skin che vorresti scegliere tra (1-299), gruppo skin ristrette.\nPuoi trovare le skin ID in questo sito {FFDD00}http://goo.gl/0KGRx{FFFFFF}, fai alt tab per cercarle.", "Logga", "Esci");
537 }
538 new string[128];
539 PlayerInfo[playerid][pSkin] = strval(inputtext);
540 SetPVarInt(playerid, "gLogged", 1);
541 TextDrawShowForPlayer(playerid, BoxNotice);
542 TextDrawShowForPlayer(playerid, LoadingNotice);
543 TogglePlayerSpectating(playerid, false);
544
545 // Parametri del primo spawn
546 PlayerInfo[playerid][pRegistered] = gettime();
547 PlayerInfo[playerid][pPositionX] = 1129.0421;
548 PlayerInfo[playerid][pPositionY] = -1486.5045;
549 PlayerInfo[playerid][pPositionZ] = 22.7690;
550 PlayerInfo[playerid][pFacingAngle] = 0.000;
551 PlayerInfo[playerid][pInterior] = 0;
552 PlayerInfo[playerid][pVirtualWorld] = 0;
553 PlayerInfo[playerid][pHealth] = 100.0;
554 PlayerInfo[playerid][pArmour] = 0.0;
555
556 ClearScreen(playerid);
557 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
558 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Benvenuto a "SERVER_MAP"!");
559 format(string, sizeof(string), "{FFDD00}Ufficiale Doganiere:{FFFFFF} Come indicato sul passaporto, il tuo nome è %s, e sei del %d anni di età .", GetPlayerNameEx(playerid), PlayerInfo[playerid][pAge]);
560 SendClientMessageEx(playerid, COLOR_WHITE, string);
561 format(string, sizeof(string), "{FFDD00}Ufficiale Doganiere:{FFFFFF} I documenti forniti sono accettabili e da questo momento siete in possesso di una carta verde valida.");
562 SendClientMessageEx(playerid, COLOR_WHITE, string);
563 format(string, sizeof(string), "{FFDD00}Ufficiale Doganiere:{FFFFFF} Hai ricevuto $100 per essere entrato in città "SERVER_MAP".");
564 SendClientMessageEx(playerid, COLOR_WHITE, string);
565 format(string, sizeof(string), "{FFDD00}Ufficiale Doganiere:{FFFFFF} Sei autorizzato ad entrare in questa splendida nazione, spero che si trovi bene.");
566 SendClientMessageEx(playerid, COLOR_WHITE, string);
567 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
568 }
569 }
570 return 1;
571}
572public OnPlayerCommandPerformed(playerid, cmdtext[], success)
573{
574 if(!success) return SendClientMessageEx(playerid, COLOR_WHITE, "Hai inserito un comando inesistente, fai /aiuto per una lista di comandi validi.");
575 return 1;
576}
577//------------------------------------------------------------------------------
578// COMANDI
579//------------------------------------------------------------------------------
580CMD:info(playerid, params[]) return cmd_informazioni(playerid, params);
581CMD:informazioni(playerid, params[])
582{
583 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
584 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Informazioni");
585 SendClientMessageEx(playerid, COLOR_WHITE, "SCRIPT VERSION: "SERVER_VERSION"");
586 SendClientMessageEx(playerid, COLOR_WHITE, "SITO: "SERVER_WEBSITE"");
587 SendClientMessageEx(playerid, COLOR_WHITE, "TEAMSPEAK: "SERVER_TEAMSPEAK"");
588 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
589 return 1;
590}
591
592CMD:aiuto(playerid, params[])
593{
594 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
595 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Aiuto");
596 SendClientMessageEx(playerid, COLOR_WHITE, "GENERALI: /n(ovizio), /tognovizio");
597 SendClientMessageEx(playerid, COLOR_WHITE, "ALTRO: /aiutoanim, /aiutoadmin");
598 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
599 return 1;
600}
601
602CMD:ah(playerid, params[])return cmd_aaiuto(playerid, params);
603CMD:aaiuto(playerid, params[])
604{
605 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato a fare questo comando.");
606 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
607 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Aiuto amministrativo");
608 if (PlayerInfo[playerid][pAdminLevel] == 1)
609 {
610 SendClientMessageEx(playerid, COLOR_WHITE, "Come un {FFFF00}Moderatore{FFFFFF}, devi aiutare i giocatori con /n(ovizio).");
611 SendClientMessageEx(playerid, COLOR_WHITE, "Sei autorizzato a punire i giocatori che non seguono le regole con i comandi qui sotto:");
612 SendClientMessageEx(playerid, COLOR_WHITE, "{FFFF00}Moderatore:{FFFFFF} /a, /kicka, /jaila, /nmuta");
613 }
614 if(PlayerInfo[playerid][pAdminLevel] >= 2)
615 {
616 SendClientMessageEx(playerid, COLOR_WHITE, "{9370DB}Pre-Admin{FFFFFF}: /a, /kicka, /banna, /jaila, /reports, /ar, /tr, /cr, /rmuta, /gotoid, /gotaqui, gotoco");
617 }
618 if(PlayerInfo[playerid][pAdminLevel] >= 3)
619 {
620 SendClientMessageEx(playerid, COLOR_WHITE, "{7CFC00}Admin-basso{FFFFFF}: /settaskin");
621 }
622 if(PlayerInfo[playerid][pAdminLevel] >= 4)
623 {
624 SendClientMessageEx(playerid, COLOR_WHITE, "{F4A460}Admin{FFFFFF}: /unbanna, /ddcrea, /ddrimuovi, /ddedita, /ddnome");
625 }
626 if(PlayerInfo[playerid][pAdminLevel] >= 5)
627 {
628 SendClientMessageEx(playerid, COLOR_WHITE, "{FF0000}Leader Admin{FFFFFF}: /settadmin");
629 }
630 SendClientMessageEx(playerid, COLOR_WHITE, "-------------------------------------------------------------------");
631 return 1;
632}
633
634CMD:n(playerid, params[])return cmd_novizio(playerid, params);
635CMD:novizio(playerid, params[])
636{
637 new string[128];
638 if(sscanf(params, "s[128]", string)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /n(ovizio) [messaggio]");
639 else if(gettime() - PlayerInfo[playerid][pNMute] < 0 && !PermissionCheck(playerid, 2))
640 {
641 format(string, sizeof(string), "Aspetta qualche %i secondo per usare il comando.", PlayerInfo[playerid][pNMute] - gettime());
642 return SendClientMessageEx(playerid, COLOR_GREY, string);
643 }
644 else if(PlayerInfo[playerid][pTogNewbie] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Sei entrato nel canale novizio /novizio per disattivarlo.");
645 if(PermissionCheck(playerid, 1)) PlayerInfo[playerid][pNMute] = gettime() + 15;
646 else PlayerInfo[playerid][pNMute] = gettime() + 30;
647 format(string, sizeof(string), "* %s %s: %s", GetAdminRank(playerid), GetPlayerNameEx(playerid), string);
648 foreach(Player, i) if(PlayerInfo[i][pTogNewbie] == 1) SendClientMessageEx(i, COLOR_NEWBIE, string);
649 return 1;
650}
651
652CMD:reporta(playerid, params[])
653{
654 new string[128];
655 if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /reporta [testo]");
656 else if(gettime() - PlayerInfo[playerid][pRMute] < 0 && !PermissionCheck(playerid, 2))
657 {
658 format(string, sizeof(string), "Aspetta qualche %i secondo per inviare un altro report.", PlayerInfo[playerid][pRMute] - gettime());
659 return SendClientMessageEx(playerid, COLOR_GREY, string);
660 }
661 else if(strlen(PlayerInfo[playerid][pReport]) > 0) return SendClientMessageEx(playerid, COLOR_GREY, "Esiste già un report fai /cancella per eliminarlo.");
662 if(PermissionCheck(playerid, 1)) PlayerInfo[playerid][pRMute] = gettime() + 15;
663 else PlayerInfo[playerid][pRMute] = gettime() + 30;
664 format(PlayerInfo[playerid][pReport], 128, params);
665 format(string, sizeof(string), "{FFFF00}Report da %s (ID: %d): %s", GetPlayerNameEx(playerid), playerid, params);
666 SendAdminMessage(COLOR_YELLOW, 2, string);
667 SendClientMessageEx(playerid, COLOR_YELLOW, "Il report è stato inviato allo staff.");
668 return 1;
669}
670
671CMD:tognewbie(playerid, params[])
672{
673 if (PlayerInfo[playerid][pTogNewbie] == 0)
674 {
675 PlayerInfo[playerid][pTogNewbie] = 1;
676 SendClientMessageEx(playerid, COLOR_WHITE, "Hai attivato il canale novizio ora puoi aiutare un nuovo giocatore.");
677 }
678 else
679 {
680 PlayerInfo[playerid][pTogNewbie] = 0;
681 SendClientMessageEx(playerid, COLOR_WHITE, "Hai disattivato il canale novizio, ora puoi fare re-inizia /tonovizio di nuovo.");
682 }
683 return 1;
684}
685
686CMD:tempo(playerid, params[])
687{
688 new string[128], mtext[20], year, month, day;
689 getdate(year, month, day);
690 if(month == 1) { mtext = "Gennaio"; }
691 else if(month == 2) { mtext = "Febbraio"; }
692 else if(month == 3) { mtext = "Marzo"; }
693 else if(month == 4) { mtext = "Aprile"; }
694 else if(month == 5) { mtext = "Maggio"; }
695 else if(month == 6) { mtext = "Giugno"; }
696 else if(month == 7) { mtext = "Luglio"; }
697 else if(month == 8) { mtext = "Agosto"; }
698 else if(month == 9) { mtext = "Settembre"; }
699 else if(month == 10) { mtext = "Ottobre"; }
700 else if(month == 11) { mtext = "Novembre"; }
701 else if(month == 12) { mtext = "Dicembre"; }
702 format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, WorldTime[0], WorldTime[1]);
703 GameTextForPlayer(playerid, string, 5000, 1);
704 return 1;
705}
706
707CMD:me(playerid, params[])
708{
709 new string[128];
710 if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /me [azione]");
711 format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), params);
712 ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
713 return 1;
714}
715
716CMD:do(playerid, params[])
717{
718 new string[128];
719 if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /do [azione]");
720 else if (strlen(params) > 99)
721 {
722 format(string, sizeof(string), "Il messaggio non può contenere più di 99 caratteri di lunghezza, accorcia di %d caratteri.", strlen(params) - 99);
723 return SendClientMessageEx(playerid, COLOR_GREY, string);
724 }
725 format(string, sizeof(string), "%s (( %s ))", params, GetPlayerNameEx(playerid));
726 ProxDetector(20.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
727 return 1;
728}
729
730CMD:s(playerid, params[]) return cmd_grida(playerid, params);
731CMD:grida(playerid, params[])
732{
733 new string[128];
734 if(sscanf(params, "{s[128]}")) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /g(rida) [messaggio]");
735 format(string, sizeof(string), "%s grida: %s!", GetPlayerNameEx(playerid), params);
736 ProxDetector(30.0, playerid, string, COLOR_WHITE, COLOR_WHITE, COLOR_WHITE, COLOR_FADE1, COLOR_FADE2);
737 return 1;
738}
739
740CMD:v(playerid, params[]) return cmd_voce(playerid, params);
741CMD:voce(playerid, params[])
742{
743 new string[128];
744 if(sscanf(params, "{s[128]}")) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /v(oce) [messaggio]");
745 format(string, sizeof(string), "%s bassa voce: %s", GetPlayerNameEx(playerid), params);
746 ProxDetector(5.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
747 return 1;
748}
749
750CMD:su(playerid, params[]) return cmd_sussurra(playerid, params);
751CMD:sussurra(playerid, params[])
752{
753 new string[128], message[128], targetid;
754 if(sscanf(params, "us[128]", targetid, message)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /s(ussurra) [playerid] [messaggio]");
755 else if(!IsPlayerConnectedEx(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
756 else if(!IsPlayerInRangeOfPlayer(playerid, targetid) && PlayerInfo[playerid][pAdminLevel] < 2) return SendClientMessageEx(playerid, COLOR_GREY, "È necessario essere vicino al giocatore specificato per usare questo comando!");
757 else if(playerid == targetid) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi usare questo comando su te stesso!");
758 format(string, sizeof(string), "(ID %d) %s ti ha sussurrato: %s", playerid, GetPlayerNameEx(playerid), message);
759 SendClientMessageEx(targetid, COLOR_YELLOW, string);
760 format(string, sizeof(string), "Hai sussurrato (ID %d) %s: %s", targetid, GetPlayerNameEx(targetid), message);
761 SendClientMessageEx(playerid, COLOR_YELLOW, string);
762 return 1;
763}
764
765CMD:entra(playerid, params[])
766{
767 for(new i=0; i < MAX_DOORS; i++)
768 {
769 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;
770 SetPlayerInterior(playerid, DoorInfo[i][dInteriorInt]);
771 SetPlayerVirtualWorld(playerid, DoorInfo[i][dInteriorVir]);
772 SetPlayerPos(playerid, DoorInfo[i][dInteriorX], DoorInfo[i][dInteriorY], DoorInfo[i][dInteriorZ]);
773 SetPlayerFacingAngle(playerid, DoorInfo[i][dInteriorAngle]);
774 SetCameraBehindPlayer(playerid);
775// LoadInterior(playerid);
776 }
777 return 1;
778}
779
780CMD:esci(playerid, params[])
781{
782 for(new i=0; i < MAX_DOORS; i++)
783 {
784 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;
785 SetPlayerInterior(playerid, DoorInfo[i][dExteriorInt]);
786 SetPlayerVirtualWorld(playerid, DoorInfo[i][dExteriorVir]);
787 SetPlayerPos(playerid, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]);
788 SetPlayerFacingAngle(playerid, DoorInfo[i][dExteriorAngle]);
789 SetCameraBehindPlayer(playerid);
790 }
791 return 1;
792}
793
794CMD:a(playerid, params[])return cmd_admin(playerid, params);
795CMD:admin(playerid, params[])
796{
797 new szMessage[128];
798 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
799 else if(isnull(params)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: (/a)dmin [testo]");
800 format(szMessage, sizeof(szMessage), "* %s: %s: %s", GetAdminRank(playerid), GetPlayerNameEx(playerid), params);
801 SendAdminMessage(COLOR_CYANBLUE, 1, szMessage);
802 return 1;
803}
804
805CMD:kicka(playerid, params[])
806{
807 new targetid, reason[64], string[128];
808 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
809 else if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /kicka [playerid] [ragione]");
810 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
811 else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi kickare admin di rank più alto di te.");
812 format(string, sizeof(string), "SERVER: %s è stato cacciato da %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
813 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
814 format(string, sizeof(string), "%s è stato cacciato da %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
815 Log("kick.txt", string);
816 Kick(targetid);
817 return 1;
818}
819
820CMD:jaila(playerid, params[])
821{
822 new string[128], targetid, minutes, reason[64];
823 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
824 else if(sscanf(params, "uis[64]", targetid, minutes, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /jaila [playerid] [minuti] [ragione]");
825 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
826 else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi jailare admin di rank più alto di te!");
827 else if(minutes <= 0)
828 {
829 // Rilascio dalla prigione
830 format(string, sizeof(string), "SERVER: %s è stato rilasciato %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
831 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
832 format(string, sizeof(string), "%s è stato rilasciato da %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
833 Log("jail.txt", string);
834
835 PlayerInfo[targetid][pJailTime] = 0;
836 format(PlayerInfo[playerid][pJailReason], 64, "(null");
837
838 SetPlayerPos(targetid, 1568.2250, -1693.5483, 5.8906);
839 SetPlayerFacingAngle(targetid, 177.0983);
840 SetPlayerInterior(targetid, 0);
841 SetPlayerVirtualWorld(targetid, 0);
842 }
843
844 format(string, sizeof(string), "SERVER: %s è stato jailato da %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
845 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
846 format(string, sizeof(string), "%s è stato jailato da %s per %d minuti, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), minutes, reason);
847 Log("jail.txt", string);
848
849 PlayerInfo[targetid][pJailTime] = minutes;
850 format(PlayerInfo[playerid][pJailReason], 64, reason);
851/*
852 new jailPos = random(sizeof(JailPositions));
853 SetPlayerPos(targetid, JailPositions[jailPos][0], JailPositions[jailPos][1], JailPositions[jailPos][2]);
854 SetPlayerFacingAngle(targetid, 177.0983;
855 SetPlayerInteriorEx(targetid, 6);
856 SetPlayerVirtualWorldEx(targetid, 777);
857
858 ResetPlayerWeapons(targetid);
859 stop JailTimerEx[targetid];
860 JailTimerEx[targetid] = repeat JailTimer(targetid);
861 for(new i=0; i < 12; i++)
862 {
863 PlayerInfo[targetid][pWeapons][i] = 0;
864 }
865 TogglePlayerControllable(targetid, false);
866 SetPVarInt(targetid, "ActionRestriction", 1);
867 TextDrawShowForPlayer(targetid, LoadingObjectTextDraw);
868 TextDrawShowForPlayer(targetid, LoadingObjectBox);
869 defer HideLoadingTextdraws(targetid);
870
871 TextDrawShowForPlayer(targetid, JailTimerTD[targetid]);
872 */
873 return 1;
874}
875
876CMD:banna(playerid, params[])
877{
878 new targetid, string[128], reason[64], days;
879 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
880 else if(sscanf(params, "uis[64]", targetid, days, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /banna [playerid] [giorni] [ragione]");
881 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
882 format(string, sizeof(string), "SERVER: %s è stato bannato da %s per %d giorni, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), days, reason);
883 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
884 format(string, sizeof(string), "%s è stato bannato da %s per %d giorni, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), days, reason);
885 Log("ban.txt", string);
886 BanPlayerEx(targetid, reason, days);
887 return 1;
888}
889
890CMD:sbanna(playerid, params[])
891{
892 new target[MAX_PLAYER_NAME], string[128], reason[64];
893 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
894 else if(sscanf(params, "s[24]s[64]", target, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /unbanna [nomegiocatore] [ragione]");
895 else if(!UnbanPlayerEx(target)) return SendClientMessageEx(playerid, COLOR_GREY, "Questo giocatore non è stato trovato nel database, prova con altri nomi.");
896 format(string, sizeof(string), "SERVER: %s è stato sbannato da %s,ragione: %s", target, GetPlayerNameEx(playerid), reason);
897 SendAdminMessage(COLOR_LIGHTRED, 2, string);
898 format(string, sizeof(string), "%s è stato sbannato da %s, ragione: %s", target, GetPlayerNameEx(playerid));
899 Log("ban.txt", string);
900 return 1;
901}
902
903CMD:settaskin(playerid,params[])
904{
905 new string[128], targetid, skin;
906 if(!PermissionCheck(playerid, 3)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
907 else if(sscanf(params, "ud", targetid, skin)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /settaskin [playerid] [skin]");
908 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
909 else if(skin < 0 || skin > 299) return SendClientMessageEx(playerid, COLOR_GREY, "Seleziona una skin da 0 a 299.");
910 PlayerInfo[targetid][pSkin] = skin;
911 SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]);
912 SendClientMessageEx(targetid, COLOR_GREY, "Un amministratore ti ha cambiato la skin.");
913 SendClientMessageEx(playerid, COLOR_GREY, "Hai cambiato skin a questo giocatore.");
914 format(string, sizeof(string), "%s ha cambiato %s's skin a %d.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), skin);
915 Log("skin.txt", string);
916 return 1;
917}
918
919CMD:goto(playerid,params[])
920{
921 new targetid, Float:Position[3];
922 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
923 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /gotoid [playerid]");
924 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
925 else if(targetid == playerid) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi utilizzare questo comando su te stesso!");
926 GetPlayerPos(targetid, Position[0], Position[1], Position[2]);
927 SetPlayerInterior(playerid, GetPlayerInterior(targetid));
928 SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
929 SetPlayerPos(playerid, Position[0] + 1, Position[1], Position[2]);
930 SendClientMessageEx(playerid, COLOR_GREY, "Ti sei teletrasportato da l'ID specificato.");
931 return 1;
932}
933
934CMD:gota(playerid,params[])
935{
936 new targetid, Float:Position[3];
937 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
938 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /gota [playerid]");
939 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
940 else if(targetid == playerid) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi utilizzare questo comando su te stesso!");
941 if(IsPlayerInAnyVehicle(targetid))
942 {
943 RemovePlayerFromVehicle(targetid);
944 ClearAnimations(targetid);
945 }
946 GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
947 SetPlayerInterior(targetid, GetPlayerInterior(playerid));
948 SetPlayerVirtualWorld(targetid, GetPlayerVirtualWorld(playerid));
949 SetPlayerPos(targetid, Position[0], Position[1], Position[2]);
950 SendClientMessageEx(targetid, COLOR_FADE1, "You have been teleported!");
951 SendClientMessageEx(playerid, COLOR_GREY, "You have teleported the specified player to your location.");
952 return 1;
953}
954
955CMD:gotoco(playerid,params[])
956{
957 new Float:x,Float:y,Float:z,i;
958 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
959 else if(sscanf(params,"fffi",x,y,z,i)) return SendClientMessageEx(playerid,COLOR_GREY,"Usa: /gotoco [xcoord] [ycoord] [zcoord] [interior]");
960 SetPlayerInterior(playerid, i);
961 SetPlayerPos(playerid,x,y,z);
962 SendClientMessageEx(playerid, COLOR_GREY, "Ti sei teletrasportato a queste coordinate.");
963 return 1;
964}
965
966CMD:reports(playerid, params[])
967{
968 new string[128], reportCount;
969 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
970 SendClientMessageEx(playerid, COLOR_WHITE, "-------------------------------------------------------------------------------------------------------------------------------");
971 foreach(Player, i)
972 {
973 if(strlen(PlayerInfo[i][pReport]) > 0)
974 {
975 format(string, sizeof(string), "Report da %s (ID: %d): %s", GetPlayerNameEx(i), i, PlayerInfo[i][pReport]);
976 SendClientMessageEx(playerid, COLOR_YELLOW, string);
977 reportCount++;
978 }
979 }
980 if(reportCount != 0)
981 {
982 format(string, sizeof(string), "Reporti attivi: %d", reportCount);
983 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
984 }
985 else SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Non ci sono report attivi in questo momento.");
986 SendClientMessageEx(playerid, COLOR_WHITE, "-------------------------------------------------------------------------------------------------------------------------------");
987 return 1;
988}
989
990CMD:ar(playerid, params[])
991{
992 new string[128], targetid;
993 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
994 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ar [playerid]");
995 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
996 else if(strlen(PlayerInfo[targetid][pReport]) == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Non ci sono report attivi in questo momento.");
997 format(string, sizeof(string), "SERVER: %s ha accettato il report da %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid));
998 SendAdminMessage(COLOR_YELLOW, 2, string);
999 format(string, sizeof(string), "%s ha accettato il tuo report e lo sta visionando. Abbi pazienza sarai contattato il più presto possibile.", GetPlayerNameEx(playerid));
1000 SendClientMessageEx(targetid, COLOR_WHITE, string);
1001 format(PlayerInfo[targetid][pReport], 128, "");
1002 return 1;
1003}
1004CMD:tr(playerid, params[])
1005{
1006 new string[128], targetid;
1007 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1008 else if(sscanf(params, "u", targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /tr [playerid]");
1009 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
1010 else if(strlen(PlayerInfo[targetid][pReport]) == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Non ci sono report attivi in questo momento.");
1011 format(string, sizeof(string), "SERVER: %s ha cancellato il report di %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid));
1012 SendAdminMessage(COLOR_YELLOW, 2, string);
1013 format(string, sizeof(string), "%s ha cancellato il tuo report e non sarà visionato. Si prega di astenersi dal comando report.", GetPlayerNameEx(playerid));
1014 SendClientMessageEx(targetid, COLOR_WHITE, string);
1015 format(PlayerInfo[targetid][pReport], 128, "");
1016 return 1;
1017}
1018
1019CMD:muta(playerid, params[])
1020{
1021 new targetid, minutes, reason[64], string[128];
1022 if(!PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1023 else if(sscanf(params, "uis[64]", targetid, minutes, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /muta [playerid] [minuti] [ragione]");
1024 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
1025 else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi mutare gli admin con rank superiore al tuo.");
1026 else if(minutes <= 5 && minutes >= 15 && PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi mutare un giocatore per 5 minuti oppure oltre i 15 minuti.");
1027 if(minutes <= 0 && PermissionCheck(playerid, 2))
1028 {
1029 PlayerInfo[targetid][pNMute] = 0;
1030 format(string, sizeof(string), "Sei stato smutato %s dalla chat novizia, ragione: %s.", GetPlayerNameEx(targetid), reason);
1031 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1032 format(string, sizeof(string), "Sei stato smutato dalla chat novizia %s, ragione: %s.", GetPlayerNameEx(playerid), reason);
1033 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1034 format(string, sizeof(string), "%s è stato mutato dalla chat novizia da %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
1035 Log("mute.txt", string);
1036 return 1;
1037 }
1038 PlayerInfo[targetid][pNMute] = gettime() + minutes*60;
1039 format(string, sizeof(string), "Hai mutato %s dalla chat novizia %d minuti, ragione: %s.", GetPlayerNameEx(targetid), minutes, reason);
1040 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1041 format(string, sizeof(string), "Sei stato mutato dalla chat novizia %s per %d minuti, ragione: %s.", GetPlayerNameEx(playerid), minutes, reason);
1042 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1043 format(string, sizeof(string), "SERVER: %s è stato mutato dalla chat novizia da %s abuso.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid));
1044 SendClientMessageToAllEx(COLOR_LIGHTRED, string);
1045 format(string, sizeof(string), "%s è stato mutato dalla chat novizia da %s per %d minuti, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), minutes, reason);
1046 Log("mute.txt", string);
1047 return 1;
1048}
1049
1050CMD:smute(playerid, params[])
1051{
1052 new targetid, minutes, reason[64], string[128];
1053 if(!PermissionCheck(playerid, 2)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1054 else if(sscanf(params, "uis[64]", targetid, minutes, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /rmute [playerid] [minuti] [ragione]");
1055 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
1056 else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi mutare admin con rank più alti al tuo.");
1057 else if(minutes <= 5 && minutes >= 15 && PermissionCheck(playerid, 1)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi mutare un giocatore oltre i 5 minuti e i 15 minuti.");
1058 if(minutes <= 0 && PermissionCheck(playerid, 2))
1059 {
1060 PlayerInfo[targetid][pRMute] = 0;
1061 format(string, sizeof(string), "Hai smutato %s per i reports, ragione: %s.", GetPlayerNameEx(targetid), reason);
1062 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1063 format(string, sizeof(string), "Sei stato smutato per i report %s, ragione: %s.", GetPlayerNameEx(playerid), reason);
1064 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1065 format(string, sizeof(string), "SERVER: %s è stato smutato da %s.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid));
1066 SendAdminMessage(COLOR_YELLOW, 2, string);
1067 format(string, sizeof(string), "%s è stato smutato da %s, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
1068 Log("mute.txt", string);
1069 return 1;
1070 }
1071 PlayerInfo[targetid][pRMute] = gettime() + minutes*60;
1072 format(string, sizeof(string), "Hai mutato %s dal report %d minuti, ragione: %s.", GetPlayerNameEx(targetid), minutes, reason);
1073 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1074 format(string, sizeof(string), "Sei stato mutato dal report %s per %d minuti, ragione: %s.", GetPlayerNameEx(playerid), minutes, reason);
1075 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1076 format(string, sizeof(string), "SERVER: %s è stato mutato dal report %s per abuso.", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid));
1077 SendAdminMessage(COLOR_YELLOW, 2, string);
1078 format(string, sizeof(string), "%s è stato mutato dal report %s per %d minuti, ragione: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), minutes, reason);
1079 Log("mute.txt", string);
1080 return 1;
1081}
1082
1083CMD:settadmin(playerid, params[])
1084{
1085 new targetid, level, string[128];
1086 if(!PermissionCheck(playerid, 5) && !IsPlayerAdmin(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1087 else if(sscanf(params, "ui", targetid, level)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /settadmin [playerid] [0-5]");
1088 else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Giocatore non trovato.");
1089 else if(level < 0 || level > 5) return SendClientMessageEx(playerid, COLOR_GREY, "Hai inserito un livello admin errato.");
1090 PlayerInfo[targetid][pAdminLevel] = level;
1091 format(string, sizeof(string), "* E' stato settato %s da %s %s.", GetAdminRank(targetid), GetAdminRank(playerid), GetPlayerNameEx(playerid));
1092 SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
1093 format(string, sizeof(string), "Hai settato %s a %s.", GetPlayerNameEx(targetid), GetAdminRank(targetid));
1094 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
1095 return 1;
1096}
1097
1098CMD:ddcrea(playerid, params[])
1099{
1100 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1101 else if(sscanf(params, "{s[64]}")) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddcrea [nome]");
1102 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
1103 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
1104 CreateDoor(params, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), PlayerInfo[playerid][pFacingAngle]);
1105 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Hai creato e pizzato una porta dinamica.");
1106 return 1;
1107}
1108
1109CMD:ddrimuovi(playerid, params[])
1110{
1111 new value;
1112 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1113 else if(sscanf(params, "i", value)) return SendClientMessageEx(playerid, COLOR_GREY, "Usa: /ddrimuovi [id]");
1114 else if(value >= MAX_DOORS) return SendClientMessageEx(playerid, COLOR_GREY, "Id invalido della porta.");
1115 else if(DoorInfo[value][dExteriorX] == 0 && DoorInfo[value][dExteriorY] == 0 && DoorInfo[value][dExteriorZ] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Id invalido della porta.");
1116 DeleteDoor(DoorInfo[value][dExteriorX], DoorInfo[value][dExteriorY]);
1117 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Hai rimosso la porta dinamica.");
1118 return 1;
1119}
1120
1121CMD:ddnome(playerid, params[])
1122{
1123 new DoorID, NewName[64], string[128];
1124 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1125 else if(sscanf(params, "is[64]", DoorID, NewName)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddnome [id] [nome]");
1126 else if(DoorID >= MAX_DOORS) return SendClientMessageEx(playerid, COLOR_GREY, "Id invalido della porta.");
1127 else if(DoorInfo[DoorID][dExteriorX] == 0 && DoorInfo[DoorID][dExteriorY] == 0 && DoorInfo[DoorID][dExteriorZ] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid Door ID specified.");
1128 format(string, sizeof(string), "UPDATE `Porte` SETTA `TITOLO`='%s' DOVE `EXTERIOR_POSX`='%f' E `EXTERIOR_POSY`='%f'", NewName, DoorInfo[DoorID][dExteriorX], DoorInfo[DoorID][dExteriorY]);
1129 db_free_result(db_query(Database, string));
1130 ReloadDoors();
1131 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Hai modificato il nome della porta dinamica.");
1132 return 1;
1133}
1134
1135CMD:ddedita(playerid, params[])
1136{
1137 new option[32], value, string[256];
1138 if(!PermissionCheck(playerid, 4)) return SendClientMessageEx(playerid, COLOR_GREY, "Non sei autorizzato ad usare questo comando.");
1139 else if(sscanf(params, "is[32]", value, option)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddedita [portaid] [interior, exterior]");
1140 else if(value >= MAX_DOORS) return SendClientMessageEx(playerid, COLOR_GREY, "Id invalido della porta.");
1141 else if(DoorInfo[value][dExteriorX] == 0 && DoorInfo[value][dExteriorY] == 0 && DoorInfo[value][dExteriorZ] == 0) return SendClientMessageEx(playerid, COLOR_GREY, "Id invalido della porta.");
1142 if(!strcmp(option, "interior", true))
1143 {
1144 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
1145 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
1146 format(string, sizeof(string), "Aggiornamento `Porta` SETTA `INTERIOR_POSX`='%f',`INTERIOR_POSY`='%f',`INTERIOR_POSZ`='%f',`INTERIOR_INT`='%i',`INTERIOR_VW`='%i',`INTERIOR_ANGLE`='%i' DOVE `EXTERIOR_POSX`='%f' E `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]);
1147 db_free_result(db_query(Database, string));
1148 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: You have modified the specified door's interior.");
1149 }
1150 else if(!strcmp(option, "exterior", true))
1151 {
1152 GetPlayerPos(playerid, PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ]);
1153 GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pFacingAngle]);
1154 format(string, sizeof(string), "Aggiornamento `Porta` SETTA `EXTERIOR_POSX`='%f',`EXTERIOR_POSY`='%f',`EXTERIOR_POSZ`='%f',`EXTERIOR_INT`='%i',`EXTERIOR_VW`='%i',`EXTERIOR_ANGLE`='%i' DOVE `EXTERIOR_POSX`='%f' E `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]);
1155 db_free_result(db_query(Database, string));
1156 SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: Hai modificato la posizione esteriore della porta.");
1157 }
1158 else return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /ddedita [portaid] [interior, exterior]");
1159 ReloadDoors();
1160 return 1;
1161}
1162
1163CMD:anim(playerid, params[]) return cmd_animaiuto(playerid, params);
1164CMD:animaiuto(playerid, params[])
1165{
1166 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
1167 SendClientMessageEx(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" - Animazioni");
1168 SendClientMessageEx(playerid, COLOR_WHITE, "/handsup /drunk /bomb /rob /laugh /lookout /robman /crossarms /sit /siteat /hide /vomit /eat");
1169 SendClientMessageEx(playerid, COLOR_WHITE, "/wave /slapass /deal /taichi /crack /smoke /chat /dance /fucku /drinkwater /pedmove /bat");
1170 SendClientMessageEx(playerid, COLOR_WHITE, "/checktime /sleep /blob /opendoor /wavedown /shakehand /reload /cpr /dive /showoff /box /tag");
1171 SendClientMessageEx(playerid, COLOR_WHITE, "/goggles /cry /dj /cheer /throw /robbed /hurt /nobreath /bar /getjiggy /fallover /rap /piss");
1172 SendClientMessageEx(playerid, COLOR_WHITE, "/salute /crabs /washhands /signal /stop /gesture /jerkoff /idles /lowrider /car");
1173 SendClientMessageEx(playerid, COLOR_WHITE, "/blowjob /spank /sunbathe /kiss /snatch /sneak /copa /sexy /holdup /misc /bodypush /walkstyle");
1174 SendClientMessageEx(playerid, COLOR_WHITE, "/lowbodypush /headbutt /airkick /doorkick /leftslap /elbow /coprun /sitonchair /lean /wank");
1175 SendClientMessageEx(playerid, COLOR_GREY, "Use /stopanim to clear your animations.");
1176 SendClientMessageEx(playerid, COLOR_WHITE, "---------------------------------------------------");
1177 return 1;
1178}
1179CMD:stopanim(playerid, params[])
1180{
1181 if(GetPVarInt(playerid, "ActionRestriction") == 1)
1182 {
1183 SendClientMessageEx(playerid, COLOR_GREY, "Non puoi usarla in questo momento!");
1184 return 1;
1185 }
1186 if(IsPlayerInAnyVehicle(playerid) == 1)
1187 {
1188 SendClientMessageEx(playerid, COLOR_GREY, "Questo comando richiede che devi esser uscito dal veicolo.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Usa: /rap [1-3]");
1524 }
1525 return 1;
1526}
1527
1528CMD:wank(playerid, params[])
1529{
1530 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /wank [1-3]");
1537 }
1538 return 1;
1539}
1540
1541CMD:chat(playerid, params[])
1542{
1543 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /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, "Non puoi farlo in questo momento.");
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, "Usa: /sitonchair [1-7]");
1572 }
1573 return 1;
1574}
1575
1576CMD:bat(playerid, params[])
1577{
1578 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /bat [1-3]");
1585 }
1586 return 1;
1587}
1588
1589CMD:lean(playerid, params[])
1590{
1591 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /lean [1-2]");
1597 }
1598 return 1;
1599}
1600
1601CMD:gesture(playerid, params[])
1602{
1603 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /gesture [1-15]");
1622 }
1623 return 1;
1624}
1625
1626CMD:lay(playerid, params[])
1627{
1628 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /lay [1-3]");
1635 }
1636 return 1;
1637}
1638
1639CMD:wave(playerid, params[])
1640{
1641 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /wave [1-3]");
1648 }
1649 return 1;
1650}
1651
1652CMD:signal(playerid, params[])
1653{
1654 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /signal [1-2]");
1660 }
1661 return 1;
1662}
1663
1664CMD:nobreath(playerid, params[])
1665{
1666 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /nobreath [1-3]");
1673 }
1674 return 1;
1675}
1676
1677CMD:fallover(playerid, params[])
1678{
1679 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /fallover [1-5]");
1688 }
1689 return 1;
1690}
1691
1692CMD:pedmove(playerid, params[])
1693{
1694 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /pedmove [1-26]");
1724 }
1725 return 1;
1726}
1727
1728CMD:getjiggy(playerid, params[])
1729{
1730 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /getjiggy [1-10]");
1744 }
1745 return 1;
1746}
1747
1748CMD:stripclub(playerid, params[])
1749{
1750 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /stripclub [1-2]");
1756 }
1757 return 1;
1758}
1759
1760CMD:smoke(playerid, params[])
1761{
1762 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /smoke [1-2]");
1768 }
1769 return 1;
1770}
1771
1772CMD:dj(playerid, params[])
1773{
1774 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /dj [1-4]");
1782 }
1783 return 1;
1784}
1785
1786CMD:reload(playerid, params[])
1787{
1788 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /reload [1-2]");
1794 }
1795 return 1;
1796}
1797
1798CMD:tag(playerid, params[])
1799{
1800 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /tag [1-2]");
1806 }
1807 return 1;
1808}
1809
1810CMD:deal(playerid, params[])
1811{
1812 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /deal [1-2]");
1818 }
1819 return 1;
1820}
1821
1822CMD:crossarms(playerid, params[])
1823{
1824 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /crossarms [1-5]");
1833 }
1834 return 1;
1835}
1836
1837CMD:cheer(playerid, params[])
1838{
1839 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /cheer [1-8]");
1851 }
1852 return 1;
1853}
1854
1855CMD:sit(playerid, params[])
1856{
1857 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /sit [1-5]");
1866 }
1867 return 1;
1868}
1869
1870CMD:siteat(playerid, params[])
1871{
1872 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Non puoi farlo in questo momento.");
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, "Usa: /bar [1-5]");
1888 }
1889 return 1;
1890}
1891
1892CMD:dance(playerid, params[])
1893{
1894 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /dance [1-4]");
1903 }
1904 return 1;
1905}
1906
1907CMD:spank(playerid, params[])
1908{
1909 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /spank [1-4]");
1917 }
1918 return 1;
1919}
1920
1921CMD:sexy(playerid, params[])
1922{
1923 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /sexy [1-6]");
1933 }
1934 return 1;
1935}
1936
1937CMD:holdup(playerid, params[])
1938{
1939 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /holdup [1-2]");
1945 }
1946 return 1;
1947}
1948
1949CMD:copa(playerid, params[])
1950{
1951 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /copa [1-9]");
1964 }
1965 return 1;
1966}
1967
1968CMD:misc(playerid, params[])
1969{
1970 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /misc [1-3]");
1977 }
1978 return 1;
1979}
1980
1981CMD:snatch(playerid, params[])
1982{
1983 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /snatch [1-2]");
1989 }
1990 return 1;
1991}
1992
1993CMD:blowjob(playerid, params[])
1994{
1995 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /blowjob [1-2]");
2001 }
2002 return 1;
2003}
2004
2005CMD:kiss(playerid, params[])
2006{
2007 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /kiss [1-6]");
2017 }
2018 return 1;
2019}
2020
2021CMD:idles(playerid, params[])
2022{
2023 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /idles [1-15]");
2042 }
2043 return 1;
2044}
2045CMD:sunbathe(playerid, params[])
2046{
2047 if (!IsAbleToUseAnimation(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "Non puoi farlo in questo momento.");
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, "Usa: /sunbathe [1-18]");
2069 }
2070 return 1;
2071}
2072
2073//------------------------------------------------------------------------------
2074// TIMER
2075//------------------------------------------------------------------------------
2076
2077// Sync Server - Esecuzione: 1 minuto
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// Battito - Esecuzione: 1 secondo
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 Soldi
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 è stato bannato per 365 giorni, string: Jetpack Hack", 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), "SELEZIONA * Dal Accounts l'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][pAdminLevel] = 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][pAdminLevel], DB_Escape(PlayerInfo[playerid][pUsername]));
2228 db_free_result(db_query(Database, szQuery));
2229 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET SecondaryTask='%i' WHERE Username='%s'", PlayerInfo[playerid][pSecondaryTask], DB_Escape(PlayerInfo[playerid][pUsername]));
2230 db_free_result(db_query(Database, szQuery));
2231 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Money='%i' WHERE Username='%s'", PlayerInfo[playerid][pMoney], DB_Escape(PlayerInfo[playerid][pUsername]));
2232 db_free_result(db_query(Database, szQuery));
2233 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET PositionX='%f' WHERE Username='%s'", PlayerInfo[playerid][pPositionX], DB_Escape(PlayerInfo[playerid][pUsername]));
2234 db_free_result(db_query(Database, szQuery));
2235 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET PositionY='%f' WHERE Username='%s'", PlayerInfo[playerid][pPositionY], DB_Escape(PlayerInfo[playerid][pUsername]));
2236 db_free_result(db_query(Database, szQuery));
2237 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET PositionZ='%f' WHERE Username='%s'", PlayerInfo[playerid][pPositionZ], DB_Escape(PlayerInfo[playerid][pUsername]));
2238 db_free_result(db_query(Database, szQuery));
2239 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET FacingAngle='%f' WHERE Username='%s'", PlayerInfo[playerid][pFacingAngle], DB_Escape(PlayerInfo[playerid][pUsername]));
2240 db_free_result(db_query(Database, szQuery));
2241 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Interior='%i' WHERE Username='%s'", PlayerInfo[playerid][pInterior], DB_Escape(PlayerInfo[playerid][pUsername]));
2242 db_free_result(db_query(Database, szQuery));
2243 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET VirtualWorld='%i' WHERE Username='%s'", PlayerInfo[playerid][pVirtualWorld], DB_Escape(PlayerInfo[playerid][pUsername]));
2244 db_free_result(db_query(Database, szQuery));
2245 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Skin='%i' WHERE Username='%s'", PlayerInfo[playerid][pSkin], DB_Escape(PlayerInfo[playerid][pUsername]));
2246 db_free_result(db_query(Database, szQuery));
2247 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Health='%f' WHERE Username='%s'", PlayerInfo[playerid][pHealth], DB_Escape(PlayerInfo[playerid][pUsername]));
2248 db_free_result(db_query(Database, szQuery));
2249 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Armour='%f' WHERE Username='%s'", PlayerInfo[playerid][pArmour], DB_Escape(PlayerInfo[playerid][pUsername]));
2250 db_free_result(db_query(Database, szQuery));
2251 return 1;
2252 }
2253 return 0;
2254}
2255
2256stock ResetPlayerVariables(playerid)
2257{
2258
2259 DeletePVar(playerid, "FailedLoginAttempt");
2260 PlayerInfo[playerid][pAge] = 0;
2261 PlayerInfo[playerid][pGender] = 0;
2262 PlayerInfo[playerid][pRegistered] = 0;
2263 PlayerInfo[playerid][pMember] = 0;
2264 PlayerInfo[playerid][pRank] = 0;
2265 PlayerInfo[playerid][pLeader] = 0;
2266 GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
2267 PlayerInfo[playerid][pBanned] = 0;
2268 format(PlayerInfo[playerid][pBanReason], 64, "");
2269 PlayerInfo[playerid][pBanExpiry] = 0;
2270 PlayerInfo[playerid][pJailTime] = 0;
2271 format(PlayerInfo[playerid][pJailReason], 64, "");
2272 PlayerInfo[playerid][pNMute] = 0;
2273 PlayerInfo[playerid][pRMute] = 0;
2274 PlayerInfo[playerid][pAdminLevel] = 0;
2275 PlayerInfo[playerid][pSecondaryTask] = 0;
2276 PlayerInfo[playerid][pMoney] = 0;
2277 PlayerInfo[playerid][pPositionX] = 0.0;
2278 PlayerInfo[playerid][pPositionY] = 0.0;
2279 PlayerInfo[playerid][pPositionZ] = 0.0;
2280 PlayerInfo[playerid][pFacingAngle] = 0.0;
2281 PlayerInfo[playerid][pInterior] = 0;
2282 PlayerInfo[playerid][pVirtualWorld] = 0;
2283 PlayerInfo[playerid][pSkin] = 0;
2284 PlayerInfo[playerid][pHealth] = 0.0;
2285 PlayerInfo[playerid][pArmour] = 0.0;
2286
2287 format(PlayerInfo[playerid][pReport], 128, "");
2288 PlayerInfo[playerid][pTogNewbie] = 1;
2289 PlayerInfo[playerid][pLastUpdate] = 0;
2290 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 0;
2291 PlayerInfo[playerid][PlayerAnimLibsPreloaded] = 0;
2292 return 1;
2293}
2294
2295stock BanPlayerEx(playerid, reason[], days)
2296{
2297 new szQuery[128], banLength = gettime();
2298 banLength += days * 86400;
2299 PlayerInfo[playerid][pBanned] = 1;
2300 PlayerInfo[playerid][pBanExpiry] = banLength;
2301 format(PlayerInfo[playerid][pBanReason], 64, reason);
2302 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]));
2303 db_query(Database, szQuery);
2304 format(szQuery, sizeof(szQuery), "banip %s", PlayerInfo[playerid][pIP]);
2305 SendRconCommand(szQuery); SendRconCommand("reloadbans");
2306 Kick(playerid);
2307}
2308
2309stock UnbanPlayerEx(name[])
2310{
2311 new DBResult:dbresult, szQuery[128], IP[16];
2312 format(szQuery, sizeof(szQuery), "SELECT * FROM Accounts WHERE Username = '%s' AND Banned = '1'", DB_Escape(name));
2313 dbresult = db_query(Database, szQuery);
2314 if(db_num_rows(dbresult) > 0)
2315 {
2316 format(szQuery, sizeof(szQuery), "UPDATE Accounts SET Banned = '0', BanReason = '(null)', BanExpiry = '0' WHERE Username='%s'", DB_Escape(name));
2317 db_query(Database, szQuery);
2318 db_free_result(dbresult);
2319 db_get_field_assoc(dbresult, "IP", IP, sizeof(IP));
2320 format(szQuery, sizeof(szQuery), "unbanip %s", szQuery);
2321 SendRconCommand(szQuery); SendRconCommand("reloadbans");
2322 return 1;
2323 }
2324 db_free_result(dbresult);
2325 return 0;
2326}
2327
2328stock Log(sz_fileName[], sz_input[])
2329{
2330 new sz_logEntry[156], i_dateTime[2][3], File: fileHandle = fopen(sz_fileName, io_append);
2331
2332 gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
2333 getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
2334
2335 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);
2336 fwrite(fileHandle, sz_logEntry);
2337 return fclose(fileHandle);
2338}
2339
2340stock SendAdminMessage(color, level, text[])
2341{
2342 foreach(Player, i) if(PermissionCheck(i, level)) SendClientMessageEx(i, color, text);
2343 return 1;
2344}
2345
2346stock GetAdminRank(i)
2347{
2348 new tmpString[32];
2349 switch(PlayerInfo[i][pAdminLevel])
2350 {
2351 case 0: format(tmpString, sizeof(tmpString), "Giocatore");
2352 case 1: format(tmpString, sizeof(tmpString), "Moderatore");
2353 case 2: format(tmpString, sizeof(tmpString), "Pre-Admin");
2354 case 3: format(tmpString, sizeof(tmpString), "Admin-basso");
2355 case 4: format(tmpString, sizeof(tmpString), "Admin");
2356 case 5: format(tmpString, sizeof(tmpString), "Leader Admin");
2357 default: format(tmpString, sizeof(tmpString), "Founder");
2358 }
2359 return tmpString;
2360}
2361
2362stock PermissionCheck(playerid, level)
2363{
2364 return PlayerInfo[playerid][pAdminLevel] >= level;
2365}
2366
2367stock IsPlayerConnectedEx(playerid)
2368{
2369 return playerid >= 0 && playerid < GetMaxPlayers() && IsPlayerConnected(playerid) && !IsPlayerNPC(playerid);
2370}
2371
2372stock IsPlayerInRangeOfPlayer(playerid, targetid, Float:range=2.0)
2373{
2374 new Float:Position[3];
2375 GetPlayerPos(targetid, Position[0], Position[1], Position[2]);
2376 return (IsPlayerInRangeOfPoint(playerid, range, Position[0], Position[1], Position[2]));
2377}
2378
2379stock ReloadDoors()
2380{
2381 for(new i=0; i < MAX_DOORS; i++)
2382 {
2383 DestroyDynamicPickup(DoorInfo[i][dPickup]);
2384 DestroyDynamic3DTextLabel(DoorInfo[i][dDynamicText]);
2385 for(new dInfo:p; p < dInfo; p++) DoorInfo[i][p] = 0;
2386 }
2387 LoadDoors();
2388}
2389
2390stock CreateDoor(title[], Float:exteriorposx, Float:exteriorposy, Float:exteriorposz, exteriorint, exteriorvw, Float:exteriorangle)
2391{
2392 new string[256];
2393 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);
2394 db_free_result(db_query(Database, string));
2395 ReloadDoors();
2396}
2397
2398stock DeleteDoor(Float:exteriorposx, Float:exteriorposy)
2399{
2400 new string[128];
2401 format(string, sizeof(string), "DELETE FROM Doors WHERE EXTERIOR_POSX='%f' AND EXTERIOR_POSY='%f'", exteriorposx, exteriorposy);
2402 db_free_result(db_query(Database, string));
2403 ReloadDoors();
2404}
2405
2406stock LoadDoors()
2407{
2408 new DBResult:query = db_query(Database, "SELECT * FROM Doors"), szValue[64], dTitle[128];
2409 for(new i=0; i < db_num_rows(query); i++)
2410 {
2411 db_get_field_assoc(query, "TITLE", szValue, sizeof(szValue));
2412 format(DoorInfo[i][dName], 64, "%s", szValue);
2413
2414 db_get_field_assoc(query, "EXTERIOR_POSX", szValue, 64);
2415 DoorInfo[i][dExteriorX] = floatstr(szValue);
2416 db_get_field_assoc(query, "EXTERIOR_POSY", szValue, 64);
2417 DoorInfo[i][dExteriorY] = floatstr(szValue);
2418 db_get_field_assoc(query, "EXTERIOR_POSZ", szValue, 64);
2419 DoorInfo[i][dExteriorZ] = floatstr(szValue);
2420 db_get_field_assoc(query, "EXTERIOR_ANGLE", szValue, 64);
2421 DoorInfo[i][dExteriorAngle] = floatstr(szValue);
2422 db_get_field_assoc(query, "EXTERIOR_INT", szValue, 64);
2423 DoorInfo[i][dExteriorInt] = strval(szValue);
2424 db_get_field_assoc(query, "EXTERIOR_VW", szValue, 64);
2425 DoorInfo[i][dExteriorVir] = strval(szValue);
2426
2427 db_get_field_assoc(query, "INTERIOR_POSX", szValue, 64);
2428 DoorInfo[i][dInteriorX] = floatstr(szValue);
2429 db_get_field_assoc(query, "INTERIOR_POSY", szValue, 64);
2430 DoorInfo[i][dInteriorY] = floatstr(szValue);
2431 db_get_field_assoc(query, "INTERIOR_POSZ", szValue, 64);
2432 DoorInfo[i][dInteriorZ] = floatstr(szValue);
2433 db_get_field_assoc(query, "INTERIOR_ANGLE", szValue, 64);
2434 DoorInfo[i][dInteriorAngle] = floatstr(szValue);
2435 db_get_field_assoc(query, "INTERIOR_INT", szValue, 64);
2436 DoorInfo[i][dInteriorInt] = strval(szValue);
2437 db_get_field_assoc(query, "INTERIOR_VW", szValue, 64);
2438 DoorInfo[i][dInteriorVir] = strval(szValue);
2439
2440 DoorInfo[i][dPickup] = CreateDynamicPickup(1318, 1, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]);
2441 format(dTitle, sizeof(dTitle), "(ID: %i)\n%s", i, DoorInfo[i][dName]);
2442 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);
2443
2444 db_next_row(query);
2445 }
2446}
2447
2448stock SaveGroup(groupid)
2449{
2450 new szQuery[256];
2451 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Name='%s'", GroupInfo[groupid][gName]));
2452 db_free_result(db_query(Database, szQuery));
2453 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Type='%i'", GroupInfo[groupid][gType]));
2454 db_free_result(db_query(Database, szQuery));
2455 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank0='%i'", GroupInfo[groupid][gRank0]));
2456 db_free_result(db_query(Database, szQuery));
2457 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank1='%i'", GroupInfo[groupid][gRank1]));
2458 db_free_result(db_query(Database, szQuery));
2459 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank2='%i'", GroupInfo[groupid][gRank2]));
2460 db_free_result(db_query(Database, szQuery));
2461 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank3='%i'", GroupInfo[groupid][gRank3]));
2462 db_free_result(db_query(Database, szQuery));
2463 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank4='%i'", GroupInfo[groupid][gRank4]));
2464 db_free_result(db_query(Database, szQuery));
2465 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank5='%i'", GroupInfo[groupid][gRank5]));
2466 db_free_result(db_query(Database, szQuery));
2467 format(szQuery, sizeof(szQuery), "UPDATE Groups SET Rank6='%i'", GroupInfo[groupid][gRank6]));
2468 db_free_result(db_query(Database, szQuery));
2469}
2470
2471stock LoadGroups()
2472{
2473 new DBResult:query = db_query(Database, "SELECT * FROM Groups"), szValue[64], dTitle[128];
2474 for(new i=0; i < db_num_rows(query); i++)
2475 {
2476 db_get_field_assoc(query, "Name", szValue, sizeof(szValue));
2477 format(GroupInfo[i][Name], sizeof(szValue), "%s", szValue);
2478 db_get_field_assoc(query, "Type", szValue, sizeof(szValue));
2479 GroupInfo[i][gType] = strval(szValue);
2480 db_get_field_assoc(query, "Rank0", szValue, sizeof(szValue));
2481 GroupInfo[i][gRank0] = strval(szValue);
2482 db_get_field_assoc(query, "Rank1", szValue, sizeof(szValue));
2483 GroupInfo[i][gRank1] = strval(szValue);
2484 db_get_field_assoc(query, "Rank2", szValue, sizeof(szValue));
2485 GroupInfo[i][gRank2] = strval(szValue);
2486 db_get_field_assoc(query, "Rank3", szValue, sizeof(szValue));
2487 GroupInfo[i][gRank3] = strval(szValue);
2488 db_get_field_assoc(query, "Rank4", szValue, sizeof(szValue));
2489 GroupInfo[i][gRank4] = strval(szValue);
2490 db_get_field_assoc(query, "Rank5", szValue, sizeof(szValue));
2491 GroupInfo[i][gRank5] = strval(szValue);
2492 db_get_field_assoc(query, "Rank6", szValue, sizeof(szValue));
2493 GroupInfo[i][gRank6] = strval(szValue);
2494 db_next_row(query);
2495 }
2496}
2497
2498stock gettimestamp (timestamp, _form=0)
2499{
2500 /*
2501 date( 1247182451 ) will print >> 11.03.2016-23:34:11
2502 date( 1247182451, 1) will print >> 12/03/2016, 23:34:11
2503 date( 1247182451, 2) will print >> Marzo 09, 2016, 23:34:11
2504 date( 1247182451, 3) will print >> 9 Luglio 2009, 23:34
2505 */
2506
2507 new
2508 year=1970, day=0, month=0, hour=0, mins=0, sec=0,
2509 days_of_month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 },
2510 names_of_month[12][10] = {"Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"},
2511 returnstring[32];
2512
2513 while(timestamp>31622400){
2514 timestamp -= 31536000;
2515 if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp -= 86400;
2516 year++;
2517 }
2518
2519 if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) )
2520 days_of_month[1] = 29;
2521 else
2522 days_of_month[1] = 28;
2523
2524
2525 while(timestamp>86400){
2526 timestamp -= 86400, day++;
2527 if(day==days_of_month[month]) day=0, month++;
2528 }
2529
2530 while(timestamp>60){
2531 timestamp -= 60, mins++;
2532 if( mins == 60) mins=0, hour++;
2533 }
2534
2535 sec=timestamp;
2536
2537 switch( _form ){
2538 case 1: format(returnstring, 31, "%02d/%02d/%d %02d:%02d:%02d", day+1, month+1, year, hour, mins, sec);
2539 case 2: format(returnstring, 31, "%s %02d, %d, %02d:%02d:%02d", names_of_month[month],day+1,year, hour, mins, sec);
2540 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);
2541
2542 default: format(returnstring, 31, "%02d.%02d.%d-%02d:%02d:%02d", day+1, month+1, year, hour, mins, sec);
2543 }
2544
2545 return returnstring;
2546}
2547stock IsAbleToUseAnimation(playerid)
2548{
2549 if(GetPVarInt(playerid, "ActionRestriction") == 1)
2550 {
2551 SendClientMessageEx(playerid, COLOR_GREY, "Non è possibile eseguire questa animazione in questo momento.");
2552 return false;
2553 }
2554 if(IsPlayerInAnyVehicle(playerid) == 1)
2555 {
2556 SendClientMessageEx(playerid, COLOR_GREY, "È necessario essere a piedi per poter utilizzare questa animazione.");
2557 return false;
2558 }
2559 return true;
2560}
2561
2562stock IsVehicleLowrider(carid)
2563{
2564 new Cars[] = { 536, 575, 567};
2565 for(new i = 0; i < sizeof(Cars); i++)
2566 {
2567 if(GetVehicleModel(carid) == Cars[i]) return true;
2568 }
2569 return false;
2570}
2571
2572stock IsKeyJustDown(key, newkeys, oldkeys)
2573{
2574 if((newkeys & key) && !(oldkeys & key))
2575 {
2576 return true;
2577 }
2578 return false;
2579}
2580
2581stock PlayAnim(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
2582{
2583 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
2584 ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
2585}
2586
2587stock LoopingAnim(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
2588{
2589 if(GetPlayerAnimationIndex(playerid) != 0) ClearAnimations(playerid);
2590 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 1;
2591 ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
2592 TextDrawShowForPlayer(playerid,StopAnim);
2593}
2594
2595stock StopLoopingAnim(playerid)
2596{
2597 PlayerInfo[playerid][gPlayerUsingLoopingAnim] = 0;
2598 ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
2599}
2600
2601stock PreloadAnimLib(playerid)
2602{
2603 ApplyAnimation(playerid, "AIRPORT", "null", 0, 0, 0, 0, 0, 0, 0);
2604 ApplyAnimation(playerid, "Attractors", "null", 0, 0, 0, 0, 0, 0, 0);
2605 ApplyAnimation(playerid, "BAR", "null", 0, 0, 0, 0, 0, 0, 0);
2606 ApplyAnimation(playerid, "BASEBALL", "null", 0, 0, 0, 0, 0, 0, 0);
2607 ApplyAnimation(playerid, "BD_FIRE", "null", 0, 0, 0, 0, 0, 0, 0);
2608 ApplyAnimation(playerid, "benchpress", "null", 0, 0, 0, 0, 0, 0, 0);
2609 ApplyAnimation(playerid, "BF_injection", "null", 0, 0, 0, 0, 0, 0, 0);
2610 ApplyAnimation(playerid, "BIKED", "null", 0, 0, 0, 0, 0, 0, 0);
2611 ApplyAnimation(playerid, "BIKEH", "null", 0, 0, 0, 0, 0, 0, 0);
2612 ApplyAnimation(playerid, "BIKELEAP", "null", 0, 0, 0, 0, 0, 0, 0);
2613 ApplyAnimation(playerid, "BIKES", "null", 0, 0, 0, 0, 0, 0, 0);
2614 ApplyAnimation(playerid, "BIKEV", "null", 0, 0, 0, 0, 0, 0, 0);
2615 ApplyAnimation(playerid, "BIKE_DBZ", "null", 0, 0, 0, 0, 0, 0, 0);
2616 ApplyAnimation(playerid, "BMX", "null", 0, 0, 0, 0, 0, 0, 0);
2617 ApplyAnimation(playerid, "BOX", "null", 0, 0, 0, 0, 0, 0, 0);
2618 ApplyAnimation(playerid, "BSKTBALL", "null", 0, 0, 0, 0, 0, 0, 0);
2619 ApplyAnimation(playerid, "BUDDY", "null", 0, 0, 0, 0, 0, 0, 0);
2620 ApplyAnimation(playerid, "BUS", "null", 0, 0, 0, 0, 0, 0, 0);
2621 ApplyAnimation(playerid, "CAMERA", "null", 0, 0, 0, 0, 0, 0, 0);
2622 ApplyAnimation(playerid, "CAR", "null", 0, 0, 0, 0, 0, 0, 0);
2623 ApplyAnimation(playerid, "CAR_CHAT", "null", 0, 0, 0, 0, 0, 0, 0);
2624 ApplyAnimation(playerid, "CASINO", "null", 0, 0, 0, 0, 0, 0, 0);
2625 ApplyAnimation(playerid, "CHAINSAW", "null", 0, 0, 0, 0, 0, 0, 0);
2626 ApplyAnimation(playerid, "CHOPPA", "null", 0, 0, 0, 0, 0, 0, 0);
2627 ApplyAnimation(playerid, "CLOTHES", "null", 0, 0, 0, 0, 0, 0, 0);
2628 ApplyAnimation(playerid, "COACH", "null", 0, 0, 0, 0, 0, 0, 0);
2629 ApplyAnimation(playerid, "COLT45", "null", 0, 0, 0, 0, 0, 0, 0);
2630 ApplyAnimation(playerid, "COP_DVBYZ", "null", 0, 0, 0, 0, 0, 0, 0);
2631 ApplyAnimation(playerid, "CRIB", "null", 0, 0, 0, 0, 0, 0, 0);
2632 ApplyAnimation(playerid, "DAM_JUMP", "null", 0, 0, 0, 0, 0, 0, 0);
2633 ApplyAnimation(playerid, "DANCING", "null", 0, 0, 0, 0, 0, 0, 0);
2634 ApplyAnimation(playerid, "DILDO", "null", 0, 0, 0, 0, 0, 0, 0);
2635 ApplyAnimation(playerid, "DODGE", "null", 0, 0, 0, 0, 0, 0, 0);
2636 ApplyAnimation(playerid, "DOZER", "null", 0, 0, 0, 0, 0, 0, 0);
2637 ApplyAnimation(playerid, "DRIVEBYS", "null", 0, 0, 0, 0, 0, 0, 0);
2638 ApplyAnimation(playerid, "FAT", "null", 0, 0, 0, 0, 0, 0, 0);
2639 ApplyAnimation(playerid, "FIGHT_B", "null", 0, 0, 0, 0, 0, 0, 0);
2640 ApplyAnimation(playerid, "FIGHT_C", "null", 0, 0, 0, 0, 0, 0, 0);
2641 ApplyAnimation(playerid, "FIGHT_D", "null", 0, 0, 0, 0, 0, 0, 0);
2642 ApplyAnimation(playerid, "FIGHT_E", "null", 0, 0, 0, 0, 0, 0, 0);
2643 ApplyAnimation(playerid, "FINALE", "null", 0, 0, 0, 0, 0, 0, 0);
2644 ApplyAnimation(playerid, "FINALE2", "null", 0, 0, 0, 0, 0, 0, 0);
2645 ApplyAnimation(playerid, "Flowers", "null", 0, 0, 0, 0, 0, 0, 0);
2646 ApplyAnimation(playerid, "FOOD", "null", 0, 0, 0, 0, 0, 0, 0);
2647 ApplyAnimation(playerid, "Freeweights", "null", 0, 0, 0, 0, 0, 0, 0);
2648 ApplyAnimation(playerid, "GANGS", "null", 0, 0, 0, 0, 0, 0, 0);
2649 ApplyAnimation(playerid, "GHANDS", "null", 0, 0, 0, 0, 0, 0, 0);
2650 ApplyAnimation(playerid, "GHETTO_DB", "null", 0, 0, 0, 0, 0, 0, 0);
2651 ApplyAnimation(playerid, "goggles", "null", 0, 0, 0, 0, 0, 0, 0);
2652 ApplyAnimation(playerid, "GRAFFITI", "null", 0, 0, 0, 0, 0, 0, 0);
2653 ApplyAnimation(playerid, "GRAVEYARD", "null", 0, 0, 0, 0, 0, 0, 0);
2654 ApplyAnimation(playerid, "GRENADE", "null", 0, 0, 0, 0, 0, 0, 0);
2655 ApplyAnimation(playerid, "GYMNASIUM", "null", 0, 0, 0, 0, 0, 0, 0);
2656 ApplyAnimation(playerid, "HAIRCUTS", "null", 0, 0, 0, 0, 0, 0, 0);
2657 ApplyAnimation(playerid, "HEIST9", "null", 0, 0, 0, 0, 0, 0, 0);
2658 ApplyAnimation(playerid, "INT_HOUSE", "null", 0, 0, 0, 0, 0, 0, 0);
2659 ApplyAnimation(playerid, "INT_OFFICE", "null", 0, 0, 0, 0, 0, 0, 0);
2660 ApplyAnimation(playerid, "INT_SHOP", "null", 0, 0, 0, 0, 0, 0, 0);
2661 ApplyAnimation(playerid, "JST_BUISNESS", "null", 0, 0, 0, 0, 0, 0, 0);
2662 ApplyAnimation(playerid, "KART", "null", 0, 0, 0, 0, 0, 0, 0);
2663 ApplyAnimation(playerid, "KISSING", "null", 0, 0, 0, 0, 0, 0, 0);
2664 ApplyAnimation(playerid, "KNIFE", "null", 0, 0, 0, 0, 0, 0, 0);
2665 ApplyAnimation(playerid, "LAPDAN1", "null", 0, 0, 0, 0, 0, 0, 0);
2666 ApplyAnimation(playerid, "LAPDAN2", "null", 0, 0, 0, 0, 0, 0, 0);
2667 ApplyAnimation(playerid, "LAPDAN3", "null", 0, 0, 0, 0, 0, 0, 0);
2668 ApplyAnimation(playerid, "LOWRIDER", "null", 0, 0, 0, 0, 0, 0, 0);
2669 ApplyAnimation(playerid, "MD_CHASE", "null", 0, 0, 0, 0, 0, 0, 0);
2670 ApplyAnimation(playerid, "MEDIC", "null", 0, 0, 0, 0, 0, 0, 0);
2671 ApplyAnimation(playerid, "MD_END", "null", 0, 0, 0, 0, 0, 0, 0);
2672 ApplyAnimation(playerid, "MISC", "null", 0, 0, 0, 0, 0, 0, 0);
2673 ApplyAnimation(playerid, "MTB", "null", 0, 0, 0, 0, 0, 0, 0);
2674 ApplyAnimation(playerid, "MUSCULAR", "null", 0, 0, 0, 0, 0, 0, 0);
2675 ApplyAnimation(playerid, "NEVADA", "null", 0, 0, 0, 0, 0, 0, 0);
2676 ApplyAnimation(playerid, "ON_LOOKERS", "null", 0, 0, 0, 0, 0, 0, 0);
2677 ApplyAnimation(playerid, "OTB", "null", 0, 0, 0, 0, 0, 0, 0);
2678 ApplyAnimation(playerid, "PARACHUTE", "null", 0, 0, 0, 0, 0, 0, 0);
2679 ApplyAnimation(playerid, "PARK", "null", 0, 0, 0, 0, 0, 0, 0);
2680 ApplyAnimation(playerid, "PAULNMAC", "null", 0, 0, 0, 0, 0, 0, 0);
2681 ApplyAnimation(playerid, "PED", "null", 0, 0, 0, 0, 0, 0, 0);
2682 ApplyAnimation(playerid, "PLAYER_DVBYS", "null", 0, 0, 0, 0, 0, 0, 0);
2683 ApplyAnimation(playerid, "PLAYIDLES", "null", 0, 0, 0, 0, 0, 0, 0);
2684 ApplyAnimation(playerid, "POLICE", "null", 0, 0, 0, 0, 0, 0, 0);
2685 ApplyAnimation(playerid, "POOL", "null", 0, 0, 0, 0, 0, 0, 0);
2686 ApplyAnimation(playerid, "POOR", "null", 0, 0, 0, 0, 0, 0, 0);
2687 ApplyAnimation(playerid, "PYTHON", "null", 0, 0, 0, 0, 0, 0, 0);
2688 ApplyAnimation(playerid, "QUAD", "null", 0, 0, 0, 0, 0, 0, 0);
2689 ApplyAnimation(playerid, "QUAD_DBZ", "null", 0, 0, 0, 0, 0, 0, 0);
2690 ApplyAnimation(playerid, "RIFLE", "null", 0, 0, 0, 0, 0, 0, 0);
2691 ApplyAnimation(playerid, "RIOT", "null", 0, 0, 0, 0, 0, 0, 0);
2692 ApplyAnimation(playerid, "ROB_BANK", "null", 0, 0, 0, 0, 0, 0, 0);
2693 ApplyAnimation(playerid, "ROCKET", "null", 0, 0, 0, 0, 0, 0, 0);
2694 ApplyAnimation(playerid, "RUSTLER", "null", 0, 0, 0, 0, 0, 0, 0);
2695 ApplyAnimation(playerid, "RYDER", "null", 0, 0, 0, 0, 0, 0, 0);
2696 ApplyAnimation(playerid, "SCRATCHING", "null", 0, 0, 0, 0, 0, 0, 0);
2697 ApplyAnimation(playerid, "SHAMAL", "null", 0, 0, 0, 0, 0, 0, 0);
2698 ApplyAnimation(playerid, "SHOTGUN", "null", 0, 0, 0, 0, 0, 0, 0);
2699 ApplyAnimation(playerid, "SILENCED", "null", 0, 0, 0, 0, 0, 0, 0);
2700 ApplyAnimation(playerid, "SKATE", "null", 0, 0, 0, 0, 0, 0, 0);
2701 ApplyAnimation(playerid, "SPRAYCAN", "null", 0, 0, 0, 0, 0, 0, 0);
2702 ApplyAnimation(playerid, "STRIP", "null", 0, 0, 0, 0, 0, 0, 0);
2703 ApplyAnimation(playerid, "SUNBATHE", "null", 0, 0, 0, 0, 0, 0, 0);
2704 ApplyAnimation(playerid, "SWAT", "null", 0, 0, 0, 0, 0, 0, 0);
2705 ApplyAnimation(playerid, "SWEET", "null", 0, 0, 0, 0, 0, 0, 0);
2706 ApplyAnimation(playerid, "SWIM", "null", 0, 0, 0, 0, 0, 0, 0);
2707 ApplyAnimation(playerid, "SWORD", "null", 0, 0, 0, 0, 0, 0, 0);
2708 ApplyAnimation(playerid, "TANK", "null", 0, 0, 0, 0, 0, 0, 0);
2709 ApplyAnimation(playerid, "TATTOOS", "null", 0, 0, 0, 0, 0, 0, 0);
2710 ApplyAnimation(playerid, "TEC", "null", 0, 0, 0, 0, 0, 0, 0);
2711 ApplyAnimation(playerid, "TRAIN", "null", 0, 0, 0, 0, 0, 0, 0);
2712 ApplyAnimation(playerid, "TRUCK", "null", 0, 0, 0, 0, 0, 0, 0);
2713 ApplyAnimation(playerid, "UZI", "null", 0, 0, 0, 0, 0, 0, 0);
2714 ApplyAnimation(playerid, "VAN", "null", 0, 0, 0, 0, 0, 0, 0);
2715 ApplyAnimation(playerid, "VENDING", "null", 0, 0, 0, 0, 0, 0, 0);
2716 ApplyAnimation(playerid, "VORTEX", "null", 0, 0, 0, 0, 0, 0, 0);
2717 ApplyAnimation(playerid, "WAYFARER", "null", 0, 0, 0, 0, 0, 0, 0);
2718 ApplyAnimation(playerid, "WEAPONS", "null", 0, 0, 0, 0, 0, 0, 0);
2719 ApplyAnimation(playerid, "WUZI", "null", 0, 0, 0, 0, 0, 0, 0);
2720 ApplyAnimation(playerid, "SNM", "null", 0, 0, 0, 0, 0, 0, 0);
2721 ApplyAnimation(playerid, "BLOWJOBZ", "null", 0, 0, 0, 0, 0, 0, 0);
2722 ApplyAnimation(playerid, "SEX", "null", 0, 0, 0, 0, 0, 0, 0);
2723 ApplyAnimation(playerid, "BOMBER", "null", 0, 0, 0, 0, 0, 0, 0);
2724 ApplyAnimation(playerid, "RAPPING", "null", 0, 0, 0, 0, 0, 0, 0);
2725 ApplyAnimation(playerid, "SHOP", "null", 0, 0, 0, 0, 0, 0, 0);
2726 ApplyAnimation(playerid, "BEACH", "null", 0, 0, 0, 0, 0, 0, 0);
2727 ApplyAnimation(playerid, "SMOKING", "null", 0, 0, 0, 0, 0, 0, 0);
2728 ApplyAnimation(playerid, "FOOD", "null", 0, 0, 0, 0, 0, 0, 0);
2729 ApplyAnimation(playerid, "ON_LOOKERS", "null", 0, 0, 0, 0, 0, 0, 0);
2730 ApplyAnimation(playerid, "DEALER", "null", 0, 0, 0, 0, 0, 0, 0);
2731 ApplyAnimation(playerid, "CRACK", "null", 0, 0, 0, 0, 0, 0, 0);
2732 ApplyAnimation(playerid, "CARRY", "null", 0, 0, 0, 0, 0, 0, 0);
2733 ApplyAnimation(playerid, "COP_AMBIENT", "null", 0, 0, 0, 0, 0, 0, 0);
2734 ApplyAnimation(playerid, "PARK", "null", 0, 0, 0, 0, 0, 0, 0);
2735 ApplyAnimation(playerid, "INT_HOUSE", "null", 0, 0, 0, 0, 0, 0, 0);
2736 ApplyAnimation(playerid, "FOOD", "null", 0, 0, 0, 0, 0, 0, 0);
2737}
2738
2739stock LoadTextdraws()
2740{
2741 StopAnim = TextDrawCreate(610.0, 400.0,
2742 "~r~~k~~PED_SPRINT~ ~w~to per fermare l'animazione");
2743 TextDrawUseBox(StopAnim, 0);
2744 TextDrawFont(StopAnim, 2);
2745 TextDrawSetShadow(StopAnim,0);
2746 TextDrawSetOutline(StopAnim,1);
2747 TextDrawBackgroundColor(StopAnim,0x000000FF);
2748 TextDrawColor(StopAnim,0xFFFFFFFF);
2749 TextDrawAlignment(StopAnim,3);
2750
2751 BoxNotice = TextDrawCreate(174.000000, 181.000000, "Box");
2752 TextDrawBackgroundColor(BoxNotice, 0);
2753 TextDrawFont(BoxNotice, 1);
2754 TextDrawLetterSize(BoxNotice, 1.590000, 7.700005);
2755 TextDrawColor(BoxNotice, 0);
2756 TextDrawSetOutline(BoxNotice, 0);
2757 TextDrawSetProportional(BoxNotice, 1);
2758 TextDrawSetShadow(BoxNotice, 1);
2759 TextDrawUseBox(BoxNotice, 1);
2760 TextDrawBoxColor(BoxNotice, 100);
2761 TextDrawTextSize(BoxNotice, 454.000000, 18.000000);
2762
2763 LoadingNotice = TextDrawCreate(313.000000, 193.000000, "Loading...");
2764 TextDrawAlignment(LoadingNotice, 2);
2765 TextDrawBackgroundColor(LoadingNotice, 255);
2766 TextDrawFont(LoadingNotice, 2);
2767 TextDrawLetterSize(LoadingNotice, 0.629999, 3.000000);
2768 TextDrawColor(LoadingNotice, -1);
2769 TextDrawSetOutline(LoadingNotice, 1);
2770 TextDrawSetProportional(LoadingNotice, 1);
2771}
2772
2773stock IsValidPassword(const password[])
2774{
2775 for(new i = 0; password[i] != EOS; ++i)
2776 {
2777 switch(password[i])
2778 {
2779 case '0'..'9', 'A'..'Z', 'a'..'z': continue;
2780 default: return false;
2781 }
2782 }
2783 return true;
2784}
2785
2786ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5)
2787{
2788 new Float:pPosition[3], Float:oPosition[3];
2789 GetPlayerPos(playerid, pPosition[0], pPosition[1], pPosition[2]);
2790 foreach(new i: Player)
2791 {
2792 if (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerInterior(playerid) == GetPlayerInterior(i))
2793 {
2794 GetPlayerPos(i, oPosition[0], oPosition[1], oPosition[2]);
2795 if(IsPlayerInRangeOfPoint(i, radi / 16, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col1, string); }
2796 else if(IsPlayerInRangeOfPoint(i, radi / 8, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col2, string); }
2797 else if(IsPlayerInRangeOfPoint(i, radi / 4, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col3, string); }
2798 else if(IsPlayerInRangeOfPoint(i, radi / 2, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col4, string); }
2799 else if(IsPlayerInRangeOfPoint(i, radi, pPosition[0], pPosition[1], pPosition[2])) { SendClientMessageEx(i, col5, string); }
2800 }
2801 }
2802 return 1;
2803}
2804
2805stock str_replace(string[], oldchar, newchar)
2806{
2807 for(new i = 0; i < strlen(string); i++)
2808 {
2809 if(string[i] == oldchar)
2810 {
2811 string[i] = newchar;
2812 }
2813 }
2814}
2815
2816stock GetName(playerid)
2817{
2818 new pName[MAX_PLAYER_NAME];
2819 GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
2820 return pName;
2821}
2822
2823stock GetPlayerNameEx(playerid)
2824{
2825 new pName[MAX_PLAYER_NAME];
2826 GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
2827 str_replace(pName, '_', ' ');
2828 return pName;
2829}
2830
2831stock ClearScreen(playerid)
2832{
2833 for(new i=0; i < 20; i++)
2834 {
2835 SendClientMessageEx(playerid, COLOR_WHITE, "");
2836 }
2837}
2838
2839stock SendClientMessageEx(playerid, color, message[])
2840{
2841 return SendClientMessage(playerid, color, message);
2842}
2843
2844stock SendClientMessageToAllEx(color, message[])
2845{
2846 return SendClientMessageToAll(color, message);
2847}
2848
2849stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], info[], button1[], button2[])
2850{
2851 PlayerInfo[playerid][CurrentDialog] = dialogid;
2852 if(PlayerInfo[playerid][CurrentDialog] == dialogid) return ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
2853 return 1;
2854}
2855
2856stock AntiDeAMX()
2857{
2858 new a[][] =
2859 {
2860 "Unarmed (Fist)",
2861 "Brass K"
2862 };
2863 #pragma unused a
2864}
2865
2866stock HashInput(text[])
2867{
2868 new string[129];
2869 WP_Hash(string, sizeof(string), text);
2870 return string;
2871}
2872
2873stock DB_Escape(text[])
2874{
2875 new ret[160], ch, i, j;
2876 while ((ch = text[i++]) && j < sizeof (ret))
2877 {
2878 if (ch == '\'')
2879 {
2880 if (j < sizeof (ret) - 2)
2881 {
2882 ret[j++] = '\'';
2883 ret[j++] = '\'';
2884 }
2885 }
2886 else if (j < sizeof (ret))
2887 {
2888 ret[j++] = ch;
2889 }
2890 else
2891 {
2892 j++;
2893 }
2894 }
2895 ret[sizeof (ret) - 1] = '\0';
2896 return ret;
2897}
2898//------------------------------------------------------------------------------
2899// FINE DELLO SCRIPT
2900//------------------------------------------------------------------------------