· 7 years ago · Oct 06, 2018, 10:14 AM
1
2
3#include <a_samp>
4#include <a_mysql>
5#include <foreach>
6#include <zcmd>
7#include <sscanf2>
8
9
10////////////////////////////////////////
11// DEFINES
12/////////////////////////////////////
13
14//shortcuts
15#define SCM SendClientMessage
16#define SCMTA SendClientMessageToAll
17#define pid playerid
18#define PlayerInfo pInfo
19
20/*=============================== Culori =====================================*/
21#define ALBASTRU "{33CCFF}"
22#define LEADER "{FF9900}"
23#define GRI "{BABABA}"
24#define GALBEN "{F3FF02}"
25#define ALB "{FFFFFF}"
26#define ROSU "{FF2400}"
27#define ROSU2 "{F08080}"
28#define ROSU3 "{A40808}"
29#define CREM "{D2B48C}"
30#define PORTOCALIU "{FF9900}"
31#define ALBASTRU5 "{4682B4}"
32#define VERDE2 "{99CC33}"
33#define MOV "{C2A2DA}"
34#define MARO "{A0522D}"
35#define GRIVERZUI "{006674}"
36#define VERDEDESCHIS "{B1B91A}"
37#define ROZDESCHIS "{FF98F2}"
38#define VERDEDESCHIS2 "{00D900}"
39#define CACANIU "{999933}"
40#define ALBASTRUSPALAT "{7094DB}"
41#define ColorNewbie "{CCFFCC}"
42
43#define COLOR_RED "{FF0000}"
44#define COLOR_ACHAT "{0099BF}"
45
46
47#define MYSQL_HOST "localhost" // Change this to your MySQL Remote IP or "localhost".
48#define MYSQL_USER "root" // Change this to your MySQL Database username.
49#define MYSQL_PASS "" // Change this to your MySQL Database password.
50#define MYSQL_DATABASE "RPG" // Change this to your MySQL Database name.
51
52
53#define DIALOG_REGISTER (0)
54#define DIALOG_LOGIN (1)
55
56
57#define NotAuth ""COLORGREY"[Error]: You're not authorized to use this command."
58#define NotCop ""COL_SYSTEM"[Error]: You're not a "COL_LSPD"Cop"COL_SYSTEM"."
59#define NotPD ""COL_SYSTEM"[Error]: You're not a "COL_LSPD"Police Departament"COL_SYSTEM" member."
60#define NotFBI ""COL_SYSTEM"[Error]: You're not a "COL_LSPD"F.B.I "COL_SYSTEM"member."
61#define NotNG ""COL_SYSTEM"[Error]: You're not a "COL_LSPD"National Guard "COL_SYSTEM"member."
62#define NotHitman ""COL_SYSTEM"[Error]: You're not a "COL_HITMAN"Hitman"COL_SYSTEM" member."
63#define NotTaxi ""COL_SYSTEM"[Error]: You're not a "COL_TAXI"Taxi Company"COL_SYSTEM" member."
64#define NotNR ""COL_SYSTEM"[Error]: You're not a "COL_NR"News Reporters"COL_SYSTEM" member."
65#define NotGrove ""COL_SYSTEM"[Error]: You're not a "COL_GROVE"Grove Family"COL_SYSTEM" member."
66#define NotBallas ""COL_SYSTEM"[Error]: You're not a "COL_BALLAS"Ballas Family"COL_SYSTEM" member."
67#define NotVagos ""COL_SYSTEM"[Error]: You're not a "COL_VAGOS"Vagos Family"COL_SYSTEM" member."
68
69#define NotLeader ""COL_SYSTEM"[Error]: You need to be leader to use this command."
70#define NotConnected ""COLORGREY"[Error]: This player is not connected."
71
72#define COL_LSPD "{5353FF}"
73#define COL_HITMAN "{660000}"
74#define COL_TAXI "{e5e600}"
75#define COL_NR "{ffb3b3}"
76#define COL_GROVE "{006600}"
77#define COL_BALLAS "{660066}"
78#define COL_VAGOS "{989900}"
79
80#define COL_WHITE "{FFFFFF}"
81#define COL_RED "{F81414}"
82#define COL_GREEN "{00FF22}"
83#define COL_LIGHTBLUE "{00CED1}"
84#define COLORYELLOW "{9DBD1E}"
85#define COLORORANGE "{E68C0E}"
86#define COLORBLUE "{39AACC}"
87#define COLORGREEN "{6FA828}"
88#define COLORWHITE "{FFFFFF}"
89#define COLORRED "{FF0000}"
90#define COLORGREY "{7D8584}"
91#define COL_BROWN "{6B3F34}"
92#define COL_PROPERTIES "{4364FF}"
93#define COL_HOUSES "{6200FF}"
94#define COL_SYSTEM "{7D8584}"
95
96
97
98
99
100////////////////////////////////////////////////////
101// GLOBAL VARS
102///////////////////////////////////////////
103
104
105
106new MySQL: Database, Corrupt_Check[MAX_PLAYERS];
107
108
109enum ENUM_PLAYER_DATA
110{
111 ID,
112 Name[25],
113
114 Password[65],
115 Salt[11],
116
117 PasswordFails,
118
119 pAdmin,
120 pHelper,
121
122 Score,
123 Cash,
124
125 Cache: Player_Cache,
126 bool:pLoggedIn
127}
128
129new pInfo[MAX_PLAYERS][ENUM_PLAYER_DATA];
130//==============================================================================
131
132///////////////////////////////////
133// STOCKS
134/////////////////////////////////
135
136stock strtok(const string[], &index)
137{
138 new length = strlen(string);
139 while ((index < length) && (string[index] <= ' '))
140 {
141 index++;
142 }
143
144 new offset = index;
145 new result[20];
146 while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
147 {
148 result[index - offset] = string[index];
149 index++;
150 }
151 result[index - offset] = EOS;
152 return result;
153}
154
155stock getName(playerid)
156{
157 new name[MAX_PLAYER_NAME];
158 GetPlayerName(playerid, name, sizeof(name));
159 return name;
160}
161
162stock pName(pid)
163{
164 return getName(pid);
165}
166
167
168//////////////////////////////////////
169// PUBLICS
170////////////////////////////////////
171
172
173
174forward Permission(pid);
175public Permission(pid)
176{
177 return SendClientMessage(pid, -1, "[Error]: You are not authorized for this action!");
178}
179
180
181forward Ussage(pid, string[]);
182public Ussage(pid, string[])
183{
184 new str[128];
185 format(str, sizeof(str), "Please use: %s", string);
186 SendClientMessage(pid, -1, str);
187 return 1;
188}
189
190forward SendOOC(sender[], msg[]);
191public SendOOC(sender[], msg[])
192{
193 new output[256];
194 format(output, sizeof(output), "(( %s: %s ))", sender, msg);
195 SCMTA(-1, output);
196}
197
198forward ABC(msg[]);
199public ABC(msg[])
200{
201 for(new i = 0; i < MAX_PLAYERS; i++)
202 {
203 if(PlayerInfo[i][pAdmin] >= 1 || IsPlayerAdmin(i))
204 {
205 SCM(i,-1,msg);
206 }
207 }
208
209}
210
211forward public OnPlayerDataCheck(playerid, corrupt_check);
212public OnPlayerDataCheck(playerid, corrupt_check)
213{
214 if (corrupt_check != Corrupt_Check[playerid]) return Kick(playerid);
215 // You'd have asked already what's corrput_check and how it'd benefit me?
216 // Well basically MySQL query takes long, incase a player leaves while its not proceeded
217 // With ID 1 for example, then another player comes as ID 1 it'll basically corrupt the data
218 // So, once the query is done, the player will have the wrong data assigned for himself.
219
220 new String[150];
221
222 if(cache_num_rows() > 0)
223 {
224 // If the player exists, everything is okay and nothing is wrongly detected
225 // The player's password and Saltion key gets stored as seen below
226 // So we won't have to get a headache just to match player's password.
227
228 cache_get_value(0, "PASSWORD", pInfo[playerid][Password], 65);
229 cache_get_value(0, "SALT", pInfo[playerid][Salt], 11);
230
231 pInfo[playerid][Player_Cache] = cache_save();
232 // ^ Storing the cache ID of the player for further use later.
233
234 format(String, sizeof(String), "{FFFFFF}Welcome back, %s.\n\n{0099FF}This account is already registered.\n\
235 {0099FF}Please, input your password below to proceed to the game.\n\n", pInfo[playerid][Name]);
236 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login System", String, "Login", "Leave");
237 }
238 else
239 {
240 format(String, sizeof(String), "{FFFFFF}Welcome %s.\n\n{0099FF}This account is not registered.\n\
241 {0099FF}Please, input your password below to proceed to the game.\n\n", pInfo[playerid][Name]);
242 ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration System", String, "Register", "Leave");
243 }
244 return 1;
245}
246
247forward public OnPlayerRegister(playerid);
248public OnPlayerRegister(playerid)
249{
250 // This gets called only when the player registers a new account.
251 SendClientMessage(playerid, 0x00FF00FF, "You are now registered and has been logged in.");
252 pInfo[playerid][pLoggedIn] = true;
253 return 1;
254}
255
256
257
258
259////////////////////////////////////
260// EVENTS
261//////////////////////////////////
262
263main()
264{
265
266}
267
268
269new DMVcar[5], PDcar[20],FBIcar[9], HITMANcar[7], TAXIcar[8], NRcar[9], GROVEcar[9],BALLAScar[8], VAGOScar[8], rentCAR[5], Pickup[12];
270public OnGameModeInit()
271{
272 new MySQLOpt: option_id = mysql_init_options();
273 mysql_set_option(option_id, AUTO_RECONNECT, true); // We will set that option to automatically reconnect on timeouts.
274
275 Database = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DATABASE, option_id); // Setting up the "Database" handle on the given MySQL details above.
276
277 if(Database == MYSQL_INVALID_HANDLE || mysql_errno(Database) != 0) // Checking if the database connection is invalid to shutdown.
278 {
279 print("I couldn't connect to the MySQL server, closing."); // Printing a message to the log.
280
281 SendRconCommand("exit"); // Sending console command to shut down server.
282 return 1;
283 }
284
285 print("I have connected to the MySQL server."); // If the given MySQL details were all okay, this message prints to the log.
286
287 // Now, we will set up the information table of the player's information.
288
289 mysql_tquery(Database, "CREATE TABLE IF NOT EXISTS `PLAYERS` (`ID` int(11) NOT NULL AUTO_INCREMENT,`USERNAME` varchar(24) NOT NULL,`PASSWORD` char(65) NOT NULL,`SALT` char(11) NOT NULL,`SCORE` mediumint(7), `pAdmin` mediumint(7), `CASH` mediumint(7) NOT NULL DEFAULT '0',`pHelper` mediumint(7) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), UNIQUE KEY `USERNAME` (`USERNAME`))");
290
291
292 DMVcar[0] = AddStaticVehicle(405,2052.5676,-1903.7029,13.4219,180.1635,1,1);
293 DMVcar[1] = AddStaticVehicle(405,2055.8943,-1904.0417,13.4219,180.6969,1,1);
294 DMVcar[2] = AddStaticVehicle(405,2059.0757,-1903.9192,13.4219,180.6096,1,1);
295 DMVcar[3] = AddStaticVehicle(405,2062.2998,-1903.7009,13.4218,180.0933,1,1);
296 DMVcar[4] = AddStaticVehicle(405,2065.5630,-1904.1188,13.4219,179.6829,1,1);
297
298 PDcar[0] = AddStaticVehicle(596,1535.9890,-1667.9014,13.1051,0.3724,0,1); // PD CAR 1
299 PDcar[1] = AddStaticVehicle(596,1536.1084,-1677.3914,13.1017,357.8466,0,1); // PD CAR 2
300 PDcar[2] = AddStaticVehicle(599,1586.3743,-1671.2371,6.0916,269.6380,0,1); // PD CAR 3
301 PDcar[3] = AddStaticVehicle(599,1586.2889,-1667.6768,6.0914,270.8051,0,1); // PD CAR 4
302 PDcar[4] = AddStaticVehicle(523,1577.7665,-1710.0684,5.4590,6.5076,0,1); // PD CAR 5
303 PDcar[5] = AddStaticVehicle(523,1574.3768,-1709.6648,5.4566,4.8766,0,1); // PD CAR 6
304 PDcar[6] = AddStaticVehicle(523,1560.9177,-1692.6484,5.4610,215.2598,0,1); // PD CAR 7
305 PDcar[7] = AddStaticVehicle(523,1559.2164,-1694.5913,5.4647,215.3777,0,1); // PD CAR 8
306 PDcar[8] = AddStaticVehicle(596,1543.0702,-1671.7225,5.6073,90.8472,0,1); // PD CAR 9
307 PDcar[9] = AddStaticVehicle(596,1542.9344,-1676.0557,5.6044,89.6877,0,1); // PD CAR 10
308 PDcar[10] = AddStaticVehicle(596,1543.0927,-1680.1766,5.6101,87.0327,0,1); // PD CAR 11
309 PDcar[11] = AddStaticVehicle(596,1543.2186,-1684.4410,5.6254,90.3907,0,1); // PD CAR 12
310 PDcar[12] = AddStaticVehicle(528,1602.3525,-1696.2738,5.9351,90.2059,0,1); // PD CAR 13
311 PDcar[13] = AddStaticVehicle(427,1603.0945,-1619.3756,13.6290,85.4857,0,1); // PD CAR 14
312 PDcar[14] = AddStaticVehicle(427,1602.9990,-1613.9863,13.6299,87.6313,0,1); // PD CAR 15
313 PDcar[15] = AddStaticVehicle(528,1602.2158,-1700.1354,5.9354,90.5803,0,1); // PD CAR 16
314 PDcar[16] = AddStaticVehicle(596,1583.5887,-1710.2161,5.6170,357.9469,0,1); // PD CAR 17
315 PDcar[17] = AddStaticVehicle(596,1570.6289,-1709.7817,5.6132,358.3181,0,1); // PD CAR 18
316 PDcar[18] = AddStaticVehicle(596,1565.6339,-1710.2535,5.6089,357.0925,0,1); // PD CAR 19
317 PDcar[19] = AddStaticVehicle(497,1565.6058,-1649.2626,28.5885,86.5567,0,1); // PD CAR 20
318
319 FBIcar[0] = AddStaticVehicle(497,617.4517,-575.5801,26.3198,268.1010,0,0); // FBI CAR 1
320 FBIcar[1] = AddStaticVehicle(490,615.9523,-596.8098,17.3612,270.9883,0,0); // FBI CAR 2
321 FBIcar[2] = AddStaticVehicle(490,616.2977,-601.4105,17.3614,270.9752,0,0); // FBI CAR 3
322 FBIcar[3] = AddStaticVehicle(490,646.8303,-570.7219,16.3298,179.3091,0,0); // FBI CAR 4
323 FBIcar[4] = AddStaticVehicle(598,636.0717,-565.7085,16.0578,178.4661,0,0); // FBI CAR 5
324 FBIcar[5] = AddStaticVehicle(598,635.9348,-576.3047,16.0059,179.1110,0,0); // FBI CAR 6
325 FBIcar[6] = AddStaticVehicle(598,621.6987,-608.4866,16.9414,358.6909,0,0); // FBI CAR 7
326 FBIcar[7] = AddStaticVehicle(598,625.8656,-608.7986,16.5174,358.7607,0,0); // FBI CAR 9
327 FBIcar[8] = AddStaticVehicle(541,667.2712,-581.1929,15.9598,181.4673,0,0); // FBI CAR 8
328
329 HITMANcar[0] = AddStaticVehicle(480,1077.3282,-289.1661,73.7627,177.7542,0,0); // HITMAN CAR 1
330 HITMANcar[1] = AddStaticVehicle(461,1074.1262,-290.1021,73.5677,181.6202,0,0); // HITMAN CAR 2
331 HITMANcar[2] = AddStaticVehicle(480,1066.8328,-288.9797,73.7389,180.6003,0,0); // HITMAN CAR 3
332 HITMANcar[3] = AddStaticVehicle(480,1070.7382,-289.2275,73.7639,180.5147,0,0); // HITMAN CAR 4
333 HITMANcar[4] = AddStaticVehicle(415,1098.3685,-306.1747,73.7622,91.0236,0,0); // HITMAN CAR 5
334 HITMANcar[5] = AddStaticVehicle(487,1113.8508,-342.3057,74.1617,236.9781,0,0); // HITMAN CAR 6
335 HITMANcar[6] = AddStaticVehicle(469,1043.5575,-349.6249,74.0373,359.3561,0,0); // HITMAN CAR 7
336
337 TAXIcar[0] = AddStaticVehicle(420,1777.1713,-1933.1743,13.1718,1.3114,6,6); // TAXI CAR 1
338 TAXIcar[1] = AddStaticVehicle(420,1781.1885,-1933.0754,13.1599,359.5530,6,6); // TAXI CAR 2
339 TAXIcar[2] = AddStaticVehicle(420,1784.9169,-1933.0981,13.1651,0.6240,6,6); // TAXI CAR 3
340 TAXIcar[3] = AddStaticVehicle(409,1804.7413,-1929.6757,13.1897,2.0396,6,6); // TAXI CAR 4
341 TAXIcar[4] = AddStaticVehicle(560,1805.2977,-1916.5795,13.0969,358.9198,6,6); // TAXI CAR 5
342 TAXIcar[5] = AddStaticVehicle(438,1776.8395,-1910.8459,13.3958,268.6260,6,6); // TAXI CAR 6
343 TAXIcar[6] = AddStaticVehicle(438,1776.8588,-1915.1023,13.3910,269.1949,6,6); // TAXI CAR 7
344 TAXIcar[7] = AddStaticVehicle(438,1777.0592,-1919.0548,13.3895,270.5043,6,6); // TAXI CAR 8
345
346 NRcar[0] = AddStaticVehicle(488,742.5687,-1369.1028,25.8694,358.1789,20,23); // NR CAR 1
347 NRcar[1] = AddStaticVehicle(582,742.5682,-1334.4314,13.5961,178.1957,20,23); // NR CAR 2
348 NRcar[2] = AddStaticVehicle(582,748.7605,-1334.6084,13.5923,179.3296,20,23); // NR CAR 3
349 NRcar[3] = AddStaticVehicle(582,755.3555,-1334.3627,13.5980,179.8606,20,23); // NR CAR 4
350 NRcar[4] = AddStaticVehicle(582,761.6698,-1334.8658,13.5958,177.9226,20,23); // NR CAR 5
351 NRcar[5] = AddStaticVehicle(582,783.1744,-1364.4763,13.5966,46.8947,20,23); // NR CAR 6
352 NRcar[6] = AddStaticVehicle(582,783.2994,-1358.5624,13.5979,45.4452,20,23); // NR CAR 7
353 NRcar[7] = AddStaticVehicle(582,783.4975,-1352.6761,13.5984,45.0884,20,23); // NR CAR 8
354 NRcar[8] = AddStaticVehicle(560,642.7762,-1346.4154,13.1703,180.1626,20,23); // NR CAR 9
355
356 GROVEcar[0] = AddStaticVehicle(567,2471.7336,-1655.0607,13.2166,90.0825,86,86); // GROVE CAR 1
357 GROVEcar[1] = AddStaticVehicle(482,2480.9065,-1655.2079,13.4324,89.8315,86,86); // GROVE CAR 2
358 GROVEcar[2] = AddStaticVehicle(536,2487.9321,-1655.4484,13.0834,89.1219,86,86); // GROVE CAR 3
359 GROVEcar[3] = AddStaticVehicle(461,2500.6460,-1684.3286,13.0066,20.6909,86,68); // GROVE CAR 4
360 GROVEcar[4] = AddStaticVehicle(461,2502.2234,-1683.2719,13.0247,11.2453,86,68); // GROVE CAR 5
361 GROVEcar[5] = AddStaticVehicle(461,2504.6292,-1682.5125,13.1313,37.9311,86,86); // GROVE CAR 6
362 GROVEcar[7] = AddStaticVehicle(487,2509.3062,-1672.1571,13.5151,90.0125,86,86); // GROVE CAR 8
363 GROVEcar[8] = AddStaticVehicle(535,2499.6829,-1656.1437,13.1804,82.8376,86,86); // GROVE CAR 9
364
365 BALLAScar[0] = AddStaticVehicle(482,2130.6079,-1489.9415,23.8437,1.4738,179,179); // BALLAS CAR 1
366 BALLAScar[1] = AddStaticVehicle(536,2134.3433,-1483.3066,23.6465,356.3282,179,179); // BALLAS CAR 2
367 BALLAScar[2] = AddStaticVehicle(461,2136.1956,-1474.1095,23.5463,90.1527,179,179); // BALLAS CAR 3
368 BALLAScar[3] = AddStaticVehicle(461,2136.1833,-1472.5452,23.5441,92.2031,179,179); // BALLAS CAR 4
369 BALLAScar[4] = AddStaticVehicle(461,2136.2446,-1470.4392,23.5376,94.2020,179,179); // BALLAS CAR 5
370 BALLAScar[5] = AddStaticVehicle(461,2136.3020,-1469.1146,23.5440,89.1602,179,179); // BALLAS CAR 6
371 BALLAScar[6] = AddStaticVehicle(535,2133.8342,-1464.6736,23.6497,0.4034,179,179); // BALLAS CAR 7
372 BALLAScar[7] = AddStaticVehicle(487,2155.3223,-1484.5341,34.3980,89.2419,179,179); // BALLAS CAR 8
373
374 VAGOScar[0] = AddStaticVehicle(535,1244.6646,-2010.1287,59.6237,179.5737,65,65); // VAGOS CAR 1
375 VAGOScar[1] = AddStaticVehicle(534,1244.3462,-2017.0100,59.5980,180.5429,65,65); // VAGOS CAR 2
376 VAGOScar[2] = AddStaticVehicle(482,1244.3256,-2024.7808,59.9914,180.2289,65,65); // VAGOS CAR 3
377 VAGOScar[3] = AddStaticVehicle(536,1278.6559,-2010.4993,58.6273,178.2717,65,65); // VAGOS CAR 4
378 VAGOScar[4] = AddStaticVehicle(461,1278.4467,-2015.2141,58.4919,181.7320,65,65); // VAGOS CAR 5
379 VAGOScar[5] = AddStaticVehicle(461,1278.5525,-2019.3584,58.5021,181.4059,65,65); // VAGOS CAR 6
380 VAGOScar[6] = AddStaticVehicle(487,1174.8866,-2045.0823,69.1906,269.7881,65,65); // VAGOS CAR 7
381 VAGOScar[7] = AddStaticVehicle(461,1134.5864,-2043.1056,68.5917,273.1601,65,65); // VAGOS CAR 8
382
383
384
385
386 rentCAR[0] = AddStaticVehicle(527,1844.4408,-1871.2946,13.1034,0.4020,0,0);
387 rentCAR[1] = AddStaticVehicle(527,1841.2330,-1871.4095,13.1051,0.7591,0,0);
388 rentCAR[2] = AddStaticVehicle(527,1838.0530,-1871.3665,13.1053,0.4366,0,0);
389 rentCAR[3] = AddStaticVehicle(527,1834.8795,-1871.4850,13.1035,0.8579,0,0);
390 rentCAR[4] = AddStaticVehicle(527,1802.3534,-1866.9581,13.2909,0.2767,0,0);
391
392
393 Pickup[0] = CreatePickup(1239, 1, 2045.0376,-1913.1846,13.5469, -1);
394 Pickup[1] = CreatePickup(1239, 1, 1684.4441,-1343.2681,17.4371, -1);
395 Pickup[2] = CreatePickup(1239, 1, 2316.6206,-15.2233,26.7422, -1);
396 Pickup[3] = CreatePickup(1239, 1, 772.2167,5.2337,1000.7802, -1);
397 Pickup[4] = CreatePickup(1239, 1, 759.2585,-59.2561,1000.7802, -1);
398 Pickup[5] = CreatePickup(1274, 1, -23.5424,-55.6289,1003.5469, -1);
399 Pickup[6] = CreatePickup(1274, 1, -31.0680,-29.0295,1003.5573, -1);
400 Pickup[7] = CreatePickup(1274, 1, -22.2473,-138.6266,1003.5469, -1);
401 Pickup[8] = CreatePickup(1274, 1, -28.2207,-89.9549,1003.5469, -1);
402 Pickup[9] = CreatePickup(1239, 1, -2237.1465,130.1773,1035.4141, -1);
403 Pickup[11] = CreatePickup(1239,1, 1528.7510,-1678.1139,5.8906, -1); //ARREST PICKUP
404
405
406 Create3DTextLabel(""COL_SYSTEM"Type "COL_WHITE"/arrest "COL_SYSTEM"here.\nScrie "COL_WHITE"/arrest"COL_SYSTEM" aici.", -1,1528.7510,-1678.1139,5.8906, 32.0, 0, 1); //Label Pickup ARREST
407 Create3DTextLabel(""COL_SYSTEM"Press "COL_WHITE"ENTER"COL_SYSTEM" / "COL_WHITE"F "COL_SYSTEM"to enter\n"COL_LSPD"Police Departament HQ"COL_SYSTEM".", -1,1568.7209,-1690.7239,5.8906, 20.0, 0, 1); //Label Pickup HQ PD
408
409
410
411 /*
412 AddStaticVehicleEx(462,736.4000200,-1433.3000000,13.2000000,136.0000000,245,245,15); //Faggio
413 AddStaticVehicleEx(462,741.4003900,-1433.2002000,13.2000000,136.0000000,245,245,15); //Faggio
414 AddStaticVehicleEx(462,739.0000000,-1433.3000000,13.2000000,136.0000000,245,245,15); //Faggio
415 AddStaticVehicleEx(462,731.2999900,-1433.2000000,13.2000000,136.0000000,245,245,15); //Faggio
416 AddStaticVehicleEx(462,733.5996100,-1433.2002000,13.2000000,136.0000000,245,245,15); //Faggio
417 AddStaticVehicleEx(426,702.0000000,-1433.4000000,13.4000000,314.0000000,102,28,15); //Premier
418 AddStaticVehicleEx(426,725.2000100,-1433.4000000,13.4000000,90.0000000,62,60,15); //Premier
419
420 AddStaticVehicleEx(561,1647.9000000,-1136.5000000,23.8000000,0.0000000,106,122,15); //Stratum
421
422
423 AddStaticVehicleEx(431,1780.4000000,-1929.4000000,13.6000000,299.9980000,125,98,15); //Bus
424 AddStaticVehicleEx(431,1780.4000000,-1906.7000000,13.6000000,299.9980000,125,98,15); //Bus
425 AddStaticVehicleEx(431,1780.2002000,-1922.0996000,13.6000000,299.9980000,125,98,15); //Bus
426 AddStaticVehicleEx(431,1780.2998000,-1914.2998000,13.6000000,299.9980000,125,98,15); //Bus
427 AddStaticVehicleEx(431,1780.4000000,-1899.7000000,13.6000000,299.9980000,125,98,15); //Bus
428 AddStaticVehicleEx(431,1804.9000000,-1910.7000000,13.6000000,359.9980000,125,98,15); //Bus
429 AddStaticVehicleEx(431,1804.7998000,-1929.0996000,13.6000000,359.9950000,125,98,15); //Bus
430
431 AddStaticVehicleEx(408,2189.1001000,-1986.8000000,14.3000000,334.0000000,165,169,15); //Trashmaster
432 AddStaticVehicleEx(408,2183.6001000,-1986.5000000,14.3000000,333.9950000,165,169,15); //Trashmaster
433 AddStaticVehicleEx(408,2178.0000000,-1986.3000000,14.3000000,333.9950000,165,169,15); //Trashmaster
434 AddStaticVehicleEx(408,2160.0000000,-1971.7000000,14.3000000,225.9950000,165,169,15); //Trashmaster
435 AddStaticVehicleEx(408,2152.8000000,-1971.7000000,14.3000000,225.9940000,165,169,15); //Trashmaster
436
437 AddStaticVehicleEx(448,2120.8999000,-1784.0000000,13.1000000,0.0000000,132,4,15); //Pizzaboy
438 AddStaticVehicleEx(448,2118.3000000,-1784.1000000,13.1000000,0.0000000,132,4,15); //Pizzaboy
439 AddStaticVehicleEx(448,2115.3000000,-1783.9000000,13.1000000,0.0000000,132,4,15); //Pizzaboy
440 AddStaticVehicleEx(448,2109.6001000,-1784.0000000,13.1000000,0.0000000,132,4,15); //Pizzaboy
441 AddStaticVehicleEx(448,2112.4004000,-1783.9004000,13.1000000,0.0000000,132,4,15); //Pizzaboy
442
443 AddStaticVehicleEx(582,740.7000100,-1334.8000000,13.7000000,200.0000000,127,105,15); //Newsvan
444 AddStaticVehicleEx(582,749.7000100,-1335.5000000,13.7000000,199.9950000,127,105,15); //Newsvan
445 AddStaticVehicleEx(582,745.5000000,-1335.0996000,13.7000000,199.9950000,127,105,15); //Newsvan
446 AddStaticVehicleEx(582,754.9000200,-1335.7000000,13.7000000,199.9950000,127,105,15); //Newsvan
447 AddStaticVehicleEx(582,760.2000100,-1335.7000000,13.7000000,199.9950000,127,105,15); //Newsvan
448 AddStaticVehicleEx(582,766.0999800,-1335.8000000,13.7000000,199.9950000,127,105,15); //Newsvan
449 AddStaticVehicleEx(488,742.0000000,-1370.2000000,26.0000000,0.0000000,42,119,15); //News Chopper
450 AddStaticVehicleEx(560,642.2999900,-1374.4000000,13.3000000,0.0000000,115,46,15); //Sultan
451 AddStaticVehicleEx(560,642.5000000,-1343.0996000,13.2000000,0.0000000,115,46,15); //Sultan
452
453 AddStaticVehicleEx(487,993.5000000,-335.2999900,75.4000000,352.0000000,132,4,15); //Maverick
454 AddStaticVehicleEx(405,1060.1000000,-319.7999900,74.0000000,140.0000000,101,106,15); //Sentinel
455 AddStaticVehicleEx(405,1055.7002000,-319.5996100,74.0000000,139.9990000,101,106,15); //Sentinel
456 AddStaticVehicleEx(405,1064.1000000,-320.2999900,74.0000000,139.9990000,101,106,15); //Sentinel
457 AddStaticVehicleEx(521,1040.9000000,-310.2000100,73.7000000,274.0000000,115,10,15); //FCR-900
458 AddStaticVehicleEx(521,1041.0000000,-312.2002000,73.7000000,273.9990000,115,10,15); //FCR-900
459 AddStaticVehicleEx(447,979.2000100,-333.3999900,75.2000000,350.0000000,32,32,15); //Seasparrow
460 AddStaticVehicleEx(415,1089.1000000,-300.8999900,73.8000000,140.0000000,63,62,15); //Cheetah
461 AddStaticVehicleEx(429,1090.7000000,-321.6000100,73.7000000,0.0000000,42,119,15); //Banshee
462 AddStaticVehicleEx(461,1049.5000000,-306.3999900,73.7000000,128.0000000,32,32,15); //PCJ-600
463 CreateObject(4726,986.5000000,-339.0000000,72.8000000,0.0000000,0.0000000,351.5000000); //object(libtwrhelipd_lan2) (1)
464 CreateObject(988,989.2999900,-346.7000100,74.0000000,90.0000000,0.0000000,352.0000000); //object(ws_apgate) (1)
465 CreateObject(988,983.9000200,-346.0000000,74.0000000,90.0000000,0.0000000,351.7460000); //object(ws_apgate) (2)
466 CreateObject(14874,1004.3000000,-339.5000000,72.6000000,0.0000000,0.0000000,307.7500000); //object(kylie_stairs) (1)
467 */
468 return 1;
469}
470
471public OnGameModeExit()
472{
473 foreach(new i: Player)
474 {
475 if(IsPlayerConnected(i)) // Checking if the players stored in "i" are connected.
476 {
477 OnPlayerDisconnect(i, 1); // We do that so players wouldn't lose their data upon server's close.
478 }
479 }
480
481 mysql_close(Database); // Closing the database.
482 return 1;
483}
484
485public OnPlayerConnect(playerid)
486{
487 new DB_Query[115];
488
489 //Resetting player information.
490 pInfo[playerid][pAdmin] = 0;
491 pInfo[playerid][pHelper] = 0;
492 pInfo[playerid][PasswordFails] = 0;
493
494 GetPlayerName(playerid, pInfo[playerid][Name], MAX_PLAYER_NAME); // Getting the player's name.
495 Corrupt_Check[playerid]++;
496
497 mysql_format(Database, DB_Query, sizeof(DB_Query), "SELECT * FROM `PLAYERS` WHERE `USERNAME` = '%e' LIMIT 1", pInfo[playerid][Name]);
498 mysql_tquery(Database, DB_Query, "OnPlayerDataCheck", "ii", playerid, Corrupt_Check[playerid]);
499 return 1;
500}
501
502public OnPlayerDisconnect(playerid, reason)
503{
504 Corrupt_Check[playerid]++;
505
506 new DB_Query[256];
507 //Running a query to save the player's data using the stored stuff.
508 mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `PLAYERS` SET `SCORE` = %d, `CASH` = %d, `pAdmin` = %d, `pHelper` = %d WHERE `ID` = %d LIMIT 1",
509 pInfo[playerid][Score], pInfo[playerid][Cash], pInfo[playerid][pAdmin], pInfo[playerid][pHelper], pInfo[playerid][ID]);
510
511 mysql_tquery(Database, DB_Query);
512
513 if(cache_is_valid(pInfo[playerid][Player_Cache])) //Checking if the player's cache ID is valid.
514 {
515 cache_delete(pInfo[playerid][Player_Cache]); // Deleting the cache.
516 pInfo[playerid][Player_Cache] = MYSQL_INVALID_CACHE; // Setting the stored player Cache as invalid.
517 }
518
519 pInfo[playerid][pLoggedIn] = false;
520 print("OnPlayerDisconnect has been called."); // Sending message once OnPlayerDisconnect is called.
521 return 1;
522}
523
524public OnPlayerDeath(playerid, killerid, reason)
525{
526
527 return 1;
528}
529
530public OnPlayerRequestSpawn(playerid)
531{
532 if(pInfo[playerid][pLoggedIn] == false) return 0; // Ignoring the request incase player isn't logged in.
533 return 1;
534}
535
536public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
537{
538 switch (dialogid)
539 {
540 case DIALOG_LOGIN:
541 {
542 if(!response) return Kick(playerid);
543
544 new Salted_Key[65];
545 SHA256_PassHash(inputtext, pInfo[playerid][Salt], Salted_Key, 65);
546
547 if(strcmp(Salted_Key, pInfo[playerid][Password]) == 0)
548 {
549 // Now, password should be correct as well as the strings
550 // Matched with each other, so nothing is wrong until now.
551
552 // We will activate the cache of player to make use of it e.g.
553 // Retrieve their data.
554
555 cache_set_active(pInfo[playerid][Player_Cache]);
556
557 // Okay, we are retrieving the information now..
558 cache_get_value_int(0, "ID", pInfo[playerid][ID]);
559
560 cache_get_value_int(0, "pAdmin", pInfo[playerid][pAdmin]);
561 cache_get_value_int(0, "pHelper", pInfo[playerid][pHelper]);
562
563 cache_get_value_int(0, "SCORE", pInfo[playerid][Score]);
564 cache_get_value_int(0, "CASH", pInfo[playerid][Cash]);
565
566 SetPlayerScore(playerid, pInfo[playerid][Score]);
567
568 ResetPlayerMoney(playerid);
569 GivePlayerMoney(playerid, pInfo[playerid][Cash]);
570
571 // So, we have successfully retrieved data? Now deactivating the cache.
572
573 cache_delete(pInfo[playerid][Player_Cache]);
574 pInfo[playerid][Player_Cache] = MYSQL_INVALID_CACHE;
575
576 pInfo[playerid][pLoggedIn] = true;
577 SendClientMessage(playerid, 0x00FF00FF, "Logged in to the account.");
578 }
579 else
580 {
581 new String[150];
582
583 pInfo[playerid][PasswordFails] += 1;
584 printf("%s has been failed to login. (%d)", pInfo[playerid][Name], pInfo[playerid][PasswordFails]);
585 // Printing the message that someone has failed to login to his account.
586
587 if (pInfo[playerid][PasswordFails] >= 3) // If the fails exceeded the limit we kick the player.
588 {
589 format(String, sizeof(String), "%s has been kicked Reason: {FF0000}(%d/3) Login fails.", pInfo[playerid][Name], pInfo[playerid][PasswordFails]);
590 SendClientMessageToAll(0x969696FF, String);
591 Kick(playerid);
592 }
593 else
594 {
595 // If the player didn't exceed the limits we send him a message that the password is wrong.
596 format(String, sizeof(String), "Wrong password, you have %d out of 3 tries.", pInfo[playerid][PasswordFails]);
597 SendClientMessage(playerid, 0xFF0000FF, String);
598
599 format(String, sizeof(String), "{FFFFFF}Welcome back, %s.\n\n{0099FF}This account is already registered.\n\
600 {0099FF}Please, input your password below to proceed to the game.\n\n", pInfo[playerid][Name]);
601 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login System", String, "Login", "Leave");
602 }
603 }
604 }
605 case DIALOG_REGISTER:
606 {
607 if(!response) return Kick(playerid);
608
609 if(strlen(inputtext) <= 5 || strlen(inputtext) > 60)
610 {
611 // If the password length is less than or equal to 5 and more than 60
612 // It repeats the process and shows error message as seen below.
613
614 SendClientMessage(playerid, 0x969696FF, "Invalid password length, should be 5 - 60.");
615
616 new String[150];
617
618 format(String, sizeof(String), "{FFFFFF}Welcome %s.\n\n{0099FF}This account is not registered.\n\
619 {0099FF}Please, input your password below to proceed.\n\n", pInfo[playerid][Name]);
620 ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration System", String, "Register", "Leave");
621 }
622 else
623 {
624
625 // Salting the player's password using SHA256 for a better security.
626
627 for (new i = 0; i < 10; i++)
628 {
629 pInfo[playerid][Salt][i] = random(79) + 47;
630 }
631
632 pInfo[playerid][Salt][10] = 0;
633 SHA256_PassHash(inputtext, pInfo[playerid][Salt], pInfo[playerid][Password], 65);
634
635 new DB_Query[225];
636
637 // Storing player's information if everything goes right.
638 mysql_format(Database, DB_Query, sizeof(DB_Query), "INSERT INTO `PLAYERS` (`USERNAME`, `PASSWORD`, `SALT`, `SCORE`, `pAdmin`, `CASH`, `pHelper`)\
639 VALUES ('%e', '%s', '%e', '20', '0', '0', '0')", pInfo[playerid][Name], pInfo[playerid][Password], pInfo[playerid][Salt]);
640 mysql_tquery(Database, DB_Query, "OnPlayerRegister", "d", playerid);
641 }
642 }
643 }
644 return 1;
645}
646
647public OnPlayerClickMap(pid, Float:fX, Float:fY, Float:fZ)
648{
649 SetPlayerPos(pid, fX, fY, fZ+3);
650}
651
652
653
654///////////////////////////////////////////
655// CMDS
656/////////////////////////////////////////
657
658CMD:help(pid, params[])
659{
660 SCM(pid, -1, ""GRI"-------------- Commands --------------");
661 SCM(pid, -1, ""GRI"/help; /admins; /animlist; /stopanim;");
662 return 1;
663}
664
665CMD:admins(pid, params[])
666{
667 SCM(pid, -1, "----------- Admin Lists -----------");
668 new gString[128];
669 for(new i = 0; i < MAX_PLAYERS; i++)
670 {
671
672 if(PlayerInfo[i][pAdmin] == 1)
673 {
674 format (gString, sizeof (gString), ""ALB"ID: %d | Admin Level 1 | Nume: %s", i, pName(i)) ;
675 SCM (playerid, -1, gString) ;
676 }
677 if (PlayerInfo[i][pAdmin] == 2)
678 {
679 format (gString, sizeof (gString), ""ALB"ID: %d | Admin Level 2 | Nume: %s", i, pName(i)) ;
680 SCM (playerid, -1, gString) ;
681 }
682 if (PlayerInfo[i][pAdmin] == 3)
683 {
684 format (gString, sizeof (gString), ""ALB"ID: %d | Admin Level 3 | Nume: %s", i, pName(i)) ;
685 SCM (playerid, -1, gString) ;
686 }
687 if (PlayerInfo[i][pAdmin] == 4)
688 {
689 format (gString, sizeof (gString), ""ALB"ID: %d | Admin Level 4 | Nume: %s", i, pName(i)) ;
690 SCM (playerid, -1, gString) ;
691 }
692 if(PlayerInfo[i][pAdmin] >= 5)
693 {
694 format (gString, sizeof (gString), ""GRI"ID: %d | Admin Level 5 | Nume: %s", i, pName(i)) ;
695 SCM (playerid, -1, gString) ;
696 }
697 if(IsPlayerAdmin(i))
698 {
699 format (gString, sizeof (gString), ""GRI"ID: %d | Admin RCON | Nume: %s", i, pName(i)) ;
700 SCM (playerid, -1, gString) ;
701 }
702
703 }
704 return 1;
705}
706
707
708//admin 1
709CMD:ah(pid, params[])
710{
711 if(PlayerInfo[pid][pAdmin] < 1)
712 return Permission(pid);
713 if(PlayerInfo[pid][pAdmin] >= 1)
714 {//For Admin Level 1
715 SCM(pid, -1, ""CREM"--------------------------------- Admin Commands ---------------------------------");
716 SCM(pid, -1, ""CREM"*** Admin 1: /a(dmin)h(elp); /c(lear)c(hat); -/warn; /kick; -/ban; -/mute; -/unmute;");
717 SCM(pid, -1, ""CREM"*** Admin 1: /goto; /gethere; -/aaa; /o(oc); /a(dminchat); /freeze; /unfreeze;");
718 SCM(pid, -1, ""CREM"*** Admin 1: -/area; -/spec(tate); -/specoff; -/r(espawn)a(all)c(ars); -/r(espawn)t(his)c(ar)");
719 SCM(pid, -1, ""CREM"*** Admin 1: -/healall; -/ajail; -/afrisk; -/givegun; -/disarm; -/respawn; /a(dminchat)");
720 SCM(pid, -1, ""CREM"*** Admin 1: -/a(dmin)w(hisper); -/p(rivate)m(essage); -/jaillist; -/undercoverlist; -/afklist");
721 SCM(pid, -1, ""CREM"*** Admin 1: -/oban; -/owarn; -/banip; -/ojail; -/pmusicforall; -/smusicforall; -/fuelcars");
722 }
723 if(PlayerInfo[pid][pAdmin] >= 2)
724 {
725 SCM(pid, -1, ""CREM"*** Admin 2: -/gotocar; -/entercar; -/unjail; -/getcar; -/disarmall; -/sethp; -/setarmour; -/fixveh");
726 }
727 if(pInfo[pid][pAdmin] >= 3)
728 {
729 SCM(pid, -1, ""CREM"*** Admin 3: -/changeweather; -/setstat; -/fpk; -/veh");
730 }
731 if(pInfo[pid][pAdmin] >= 4)
732 {
733 SCM(pid, -1, ""CREM"*** Admin 4: /makehelper, /makeleader, /gotobiz, /gotohouse, /gotopickupid, /givemoney, /takemoney");
734 SCM(pid, -1, ""CREM"*** Admin 4: /lvlupall, /rpupall , /unban , /unbanip");
735 }
736 if(pInfo[pid][pAdmin] >= 5)
737 {
738 SCM(pid, -1, ""CREM"*** Admin 5: /makeadmin(RCON REQ)");
739 }
740
741 return 1;
742}
743
744CMD:freeze(pid, params[])
745{
746 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
747 {
748 new tid;
749 if(sscanf(params, "u", tid)) return Ussage(pid, "/freeze <Player ID/Name>");
750 else
751 {
752 TogglePlayerControllable(tid, 0);
753 return 1;
754 }
755 }
756 else
757 return Permission(pid);
758}
759
760CMD:unfreeze(pid, params[])
761{
762 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
763 {
764 new tid;
765 if(sscanf(params, "u", tid)) return Ussage(pid, "/unfreeze <Player ID/Name>");
766 else
767 {
768 TogglePlayerControllable(tid, 1);
769 return 1;
770 }
771 }
772 else
773 return Permission(pid);
774}
775
776CMD:a(pid, params[])
777{
778 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
779 {
780 new str[128];
781 if(sscanf(params, "s", str)) return Ussage(pid, "/a(dminchat) <Message>");
782 else
783 {
784 new buff[200];
785 format(buff, sizeof(buff), ""COLOR_ACHAT"Admin %d - %s: %s", PlayerInfo[pid][pAdmin], getName(pid), str);
786 ABC(buff);
787 return 1;
788 }
789 }
790 else
791 return Permission(pid);
792}
793
794CMD:adminchat(pid, params[])
795{
796 return cmd_a(pid, params);
797}
798
799CMD:o(pid, params[])
800{
801 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
802 {
803 new str[200];
804 if(sscanf(params, "s", str)) return Ussage(pid, "/o(oc) <Public Message>");
805 else
806 {
807 SendOOC(getName(pid), str);
808 return 1;
809 }
810 }
811 else
812 return Permission(pid);
813}
814
815CMD:ooc(pid, params[])
816{
817 return cmd_o(pid, params);
818}
819
820
821CMD:goto(pid, params[])
822{
823 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
824 {
825 new tid;
826 if(sscanf(params, "u", tid)) return Ussage(pid, "/goto <Player ID/Name>");
827 else
828 {
829 new Float:tx, Float:ty, Float:tz;
830 GetPlayerPos(tid, tx, ty, tz);
831
832 if(IsPlayerInAnyVehicle(pid) && GetPlayerVehicleSeat(pid) == 0)
833 {
834 new vid = GetPlayerVehicleID(pid);
835 SetVehiclePos(vid, tx, ty, tz+3);
836 PutPlayerInVehicle(pid, vid, 0);
837 }
838 else
839 {
840 SetPlayerPos(pid, tx, ty, tz);
841 }
842
843 return 1;
844 }
845 }
846 else
847 return Permission(pid);
848}
849
850CMD:gethere(pid, params[])
851{
852 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
853 {
854 new tid;
855 if(sscanf(params, "u", tid)) return Ussage(pid, "/gethere <Player ID/Name>");
856 else
857 {
858 new Float:tx, Float:ty, Float:tz;
859 GetPlayerPos(pid, tx, ty, tz);
860 SetPlayerPos(tid, tx, ty, tz);
861
862 return 1;
863 }
864 }
865 else
866 return Permission(pid);
867}
868
869
870
871
872CMD:kick(pid, params[])
873{
874 if(IsPlayerAdmin(pid) || PlayerInfo[pid][pAdmin] >= 1)
875 {
876 new tid, res;
877 if(sscanf(params, "us", tid, res)) return Ussage(pid, "/kick <Player ID/Name> <Reason>");
878 {
879 new string[128];
880 format(string, sizeof(string), COLOR_RED"AdmLog: %s was kicked by admin %s. | Reason: %s", getName(tid), getName(pid), res);
881 SCMTA(-1, string);
882 Kick(pid);
883 return 1;
884 }
885 }
886 else return Permission(pid);
887}
888
889CMD:ahelp(pid, params[])
890{
891 return cmd_ah(pid, params);
892}
893
894CMD:adminhelp(pid, params[])
895{
896 return cmd_ah(pid, params);
897}
898
899CMD:cc(pid, params[])
900{
901 if(PlayerInfo[pid][pAdmin] >= 1)
902 {
903 for(new i; i < 120; i++)
904 {
905 SCMTA(-1, "");
906 }
907 SCMTA(-1, "Chat-ul a fost sters.");
908 return 1;
909 }
910 else
911 return Permission(pid);
912}
913
914
915CMD:clearchat(pid, params[])
916{
917 return cmd_cc(pid, params);
918}
919
920
921
922
923//admin 2
924
925
926
927//admin 3
928
929
930//admin 4
931
932
933
934
935
936//Admin 5
937CMD:makeadmin(pid, params[])
938{
939 if(IsPlayerAdmin(pid))
940 {
941 new tid, alevel;
942 if(sscanf(params, "ud", tid, alevel)) return Ussage(pid, "/makeadmin <Player ID/Name> <Admin Level 0-5>");
943 else
944 {
945 new string[128];
946 if(alevel > 0 && alevel <= 5)
947 {
948 format(string, sizeof(string), "%s a fost promovat la nivelul de admin %d.", getName(pid), alevel);
949 SendOOC("System", string);
950
951 format(string, sizeof(string), "Ai fost promovat la nivelul de admin %d", alevel);
952 SCM(tid, -1, string);
953
954 PlayerInfo[tid][pAdmin] = alevel;
955 }
956 else if(alevel == 0)
957 {
958 SCM(tid, -1, "Nu mai ai permisiuni de admin!");
959 SCM(pid, -1, "Actiunea a fost realizata cu succes");
960 PlayerInfo[tid][pAdmin] = 0;
961 }
962 else
963 return Ussage(pid, "/makeadmin <Player ID/Name> <Admin Level 0-5>");
964
965 return 1;
966 }
967
968
969 }
970 else
971 return Permission(pid);
972}
973
974
975
976
977/*==============================================================================
978Comanda: /animlist
979==============================================================================*/
980CMD:animlist( playerid, params[] )
981{
982 if( IsPlayerConnected( playerid ) ) {
983 if( PlayerInfo[ playerid ][ pLoggedIn ] == true )
984 {
985 SendClientMessage(playerid, -1, ""GRI"|________________________________ Animations ________________________________|");
986 SendClientMessage(playerid, -1, ""ROSU2"Type/stopanim to stop animation");
987 SendClientMessage(playerid, -1,""GRI"** ANIMATIONS ** /getarrest, /chairsit, /chat, /crack /dance, /drunk, /injured, /carlock, /bomb");
988 SendClientMessage(playerid, -1,""GRI"** ANIMATIONS ** /laugh, /elbow, /funnywalk, /lean, /dealstance, /hide, /pee, /fakepee, /medic");
989 SendClientMessage(playerid, -1,""GRI"** ANIMATIONS ** /lay, /smoke, /kiss, /wave, /excited, /taichi, /carjack, /vomit, /aim, /box");
990 SendClientMessage(playerid, -1,""GRI"** ANIMATIONS ** /kickass, /beach, /gro, /fallbak, /fall, /rap, /knife, /basket, /reload, /headbut");
991 SendClientMessage(playerid, -1,""GRI"** ANIMATIONS ** /strip, /crossarms, /slapass, /fucku, /sup, /spray, /leftslap, /push, /exhaust");
992 SendClientMessage(playerid, -1,""GRI"** ANIMATIONS ** /carjacked, /rcarjack, /lcarjack, /walk, /gwalk, /airkick, /gkick");
993 SendClientMessage(playerid, -1, ""GRI"|_________________________________________________________________________________________|");
994 }
995 else return SendClientMessage(playerid, -1, ""GRI" You are not logged in.");
996 }
997 return 1;
998}
999/*==============================================================================
1000Comanda: /stopanim
1001==============================================================================*/
1002CMD:stopanim(playerid, params[])
1003{
1004 if(IsPlayerConnected(playerid))
1005 {
1006 if(pInfo[pid][pLoggedIn] == true)
1007 {
1008 //if ( AnimationTime [ playerid ] > 0 ) { return 1 ; }
1009 if ( GetPlayerVehicleID ( playerid ) ) return SCM ( playerid , -1 , ""GRI"You can't use this command in a car." ) ;
1010 //if( JobRoute[ playerid ] == 5 ) return 1;
1011 ClearAnimations(playerid);
1012 }
1013 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1014 }
1015 return 1;
1016}
1017/*==============================================================================
1018Comanda: /getarrest
1019==============================================================================*/
1020CMD:getarrest(playerid, params[])
1021{
1022 if(IsPlayerConnected(playerid))
1023 {
1024 if(pInfo[pid][pLoggedIn] == true)
1025 {
1026 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1027 ApplyAnimation( playerid,"ped", "ARRESTgun", 4.0, 1, 0, 0, 0, 0);
1028 }
1029 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1030 }
1031 return 1;
1032}
1033/*==============================================================================
1034Comanda: /chairsit
1035==============================================================================*/
1036CMD:chairsit(playerid, params[])
1037{
1038 if(IsPlayerConnected(playerid))
1039 {
1040 if(pInfo[pid][pLoggedIn] == true)
1041 {
1042 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1043 ApplyAnimation(playerid, "PED", "SEAT_idle", 4.0999, 1, 0, 0, 0, 0);
1044 }
1045 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1046 }
1047 return 1;
1048}
1049/*==============================================================================
1050Comanda: /chat
1051==============================================================================*/
1052CMD:chat(playerid, params[])
1053{
1054 if(IsPlayerConnected(playerid))
1055 {
1056 if(pInfo[pid][pLoggedIn] == true)
1057 {
1058 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1059 ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,1,1,1);
1060 }
1061 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1062 }
1063 return 1;
1064}
1065/*==============================================================================
1066Comanda: /crack
1067==============================================================================*/
1068CMD:crack(playerid, params[])
1069{
1070 if(IsPlayerConnected(playerid))
1071 {
1072 if(pInfo[pid][pLoggedIn] == true)
1073 {
1074 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1075 ApplyAnimation(playerid,"CRACK", "crckdeth2",4.1,1,1,1,1,10000);
1076 }
1077 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1078 }
1079 return 1;
1080}
1081/*==============================================================================
1082Comanda: /dance
1083==============================================================================*/
1084CMD:dance(playerid, params[])
1085{
1086 if(IsPlayerConnected(playerid))
1087 {
1088 if(pInfo[pid][pLoggedIn] == true)
1089 {
1090 new dancestyle;
1091 if(sscanf(params, "d", dancestyle)) return Ussage(pid, "/dance [Style [1-4]]");
1092 else
1093 {
1094
1095 if(dancestyle < 1 || dancestyle > 4)
1096 {
1097 Ussage(pid, "/dance [Style [1-4]]");
1098 return 1;
1099 }
1100 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1101 if(dancestyle == 1)
1102 {
1103 SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
1104 }
1105 else if(dancestyle == 2)
1106 {
1107 SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
1108 }
1109 else if(dancestyle == 3)
1110 {
1111 SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
1112 }
1113 else if(dancestyle == 4)
1114 {
1115 SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
1116 }
1117 }
1118 }
1119 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1120 }
1121 return 1;
1122}
1123/*==============================================================================
1124Comanda: /drunk
1125==============================================================================*/
1126CMD:drunk(playerid, params[])
1127{
1128 if(IsPlayerConnected(playerid))
1129 {
1130 if(pInfo[pid][pLoggedIn] == true)
1131 {
1132 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1133 ApplyAnimation(playerid,"PED", "WALK_DRUNK",4.0,1,1,0,0,0);
1134 }
1135 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1136 }
1137 return 1;
1138}
1139/*==============================================================================
1140Comanda: /injured
1141==============================================================================*/
1142CMD:injured(playerid, params[])
1143{
1144 if(IsPlayerConnected(playerid))
1145 {
1146 if(pInfo[pid][pLoggedIn] == true)
1147 {
1148 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1149 ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
1150 }
1151 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1152 }
1153 return 1;
1154}
1155/*==============================================================================
1156Comanda: /carlock
1157==============================================================================*/
1158CMD:carlock(playerid, params[])
1159{
1160 if(IsPlayerConnected(playerid))
1161 {
1162 if(pInfo[pid][pLoggedIn] == true)
1163 {
1164 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1165 ApplyAnimation(playerid,"PED","CAR_doorlocked_LHS",4.0,0,0,0,0,0);
1166 }
1167 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1168 }
1169 return 1;
1170}
1171/*==============================================================================
1172Comanda: /bomb
1173==============================================================================*/
1174CMD:bomb(playerid, params[])
1175{
1176 if(IsPlayerConnected(playerid))
1177 {
1178 if(pInfo[pid][pLoggedIn] == true)
1179 {
1180 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1181 ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 1, 0, 0, 0, 0);
1182 }
1183 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1184 }
1185 return 1;
1186}
1187/*==============================================================================
1188Comanda: /laugh
1189==============================================================================*/
1190CMD:laugh(playerid, params[])
1191{
1192 if(IsPlayerConnected(playerid))
1193 {
1194 if(pInfo[pid][pLoggedIn] == true)
1195 {
1196 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1197 ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
1198 }
1199 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1200 }
1201 return 1;
1202}
1203/*==============================================================================
1204Comanda: /elbow
1205==============================================================================*/
1206CMD:elbow(playerid, params[])
1207{
1208 if(IsPlayerConnected(playerid))
1209 {
1210 if(pInfo[pid][pLoggedIn] == true)
1211 {
1212 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1213 ApplyAnimation(playerid,"FIGHT_D","FightD_3",4.0,0,1,1,0,0);
1214 }
1215 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1216 }
1217 return 1;
1218}
1219/*==============================================================================
1220Comanda: /funnywalk
1221==============================================================================*/
1222CMD:funnywalk(playerid, params[])
1223{
1224 if(IsPlayerConnected(playerid))
1225 {
1226 if(pInfo[pid][pLoggedIn] == true)
1227 {
1228 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1229 ApplyAnimation(playerid,"WUZI","Wuzi_Walk",4.1,0,0,0,0,0);
1230 }
1231 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1232 }
1233 return 1;
1234}
1235/*==============================================================================
1236Comanda: /lean
1237==============================================================================*/
1238CMD:lean(playerid, params[])
1239{
1240 new tmp[128], idx;
1241 if(IsPlayerConnected(playerid))
1242 {
1243 if(pInfo[pid][pLoggedIn] == true)
1244 {
1245 tmp = strtok(params, idx);
1246 if(!strlen(tmp))
1247 {
1248 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/lean [1-2]");
1249 return 1;
1250 }
1251 new leanstyle = strval(tmp);
1252 if(leanstyle < 1 || leanstyle > 2)
1253 {
1254 SendClientMessage(playerid, -1,""PORTOCALIU"Scrie: "ALBASTRU"/lean [1-2]");
1255 return 1;
1256 }
1257 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1258 if(leanstyle == 1)
1259 {
1260 ApplyAnimation(playerid,"GANGS","leanIDLE",4.0,0,1,1,1,0);
1261 }
1262 else if(leanstyle == 2)
1263 {
1264 ApplyAnimation(playerid,"MISC","Plyrlean_loop",4.0,0,1,1,1,0);
1265 }
1266 }
1267 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1268 }
1269 return 1;
1270}
1271/*==============================================================================
1272Comanda: /dealstance
1273==============================================================================*/
1274CMD:dealstance(playerid, params[])
1275{
1276 if(IsPlayerConnected(playerid))
1277 {
1278 if(pInfo[pid][pLoggedIn] == true)
1279 {
1280 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1281 ApplyAnimation(playerid,"DEALER","DEALER_IDLE",4.0,1,0,0,0,0);
1282 }
1283 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1284 }
1285 return 1;
1286}
1287/*==============================================================================
1288Comanda: /hide
1289==============================================================================*/
1290CMD:hide(playerid, params[])
1291{
1292 if(IsPlayerConnected(playerid))
1293 {
1294 if(pInfo[pid][pLoggedIn] == true)
1295 {
1296 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1297 ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
1298 }
1299 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1300 }
1301 return 1;
1302}
1303/*==============================================================================
1304Comanda: /pee
1305==============================================================================*/
1306CMD:pee(playerid, params[])
1307{
1308 if(IsPlayerConnected(playerid))
1309 {
1310 if(pInfo[pid][pLoggedIn] == true)
1311 {
1312 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1313 //if ( AnimationTime [ playerid ] > 0 ) { return 1 ; }
1314 SetPlayerSpecialAction(playerid, 68);
1315 }
1316 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1317 }
1318 return 1;
1319}
1320/*==============================================================================
1321Comanda: /fakepee
1322==============================================================================*/
1323CMD:fakepee(playerid, params[])
1324{
1325 if(IsPlayerConnected(playerid))
1326 {
1327 if(pInfo[pid][pLoggedIn] == true)
1328 {
1329 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1330 ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0);
1331 }
1332 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1333 }
1334 return 1;
1335}
1336/*==============================================================================
1337Comanda: /medic
1338==============================================================================*/
1339CMD:medic(playerid, params[])
1340{
1341 if(IsPlayerConnected(playerid))
1342 {
1343 if(pInfo[pid][pLoggedIn] == true)
1344 {
1345 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1346 ApplyAnimation(playerid,"MEDIC","CPR",4.1,0,1,1,1,1);
1347 }
1348 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1349 }
1350 return 1;
1351}
1352/*==============================================================================
1353Comanda: /lay
1354==============================================================================*/
1355CMD:lay(playerid, params[])
1356{
1357 new tmp[128], idx;
1358 if(IsPlayerConnected(playerid))
1359 {
1360 if(pInfo[pid][pLoggedIn] == true)
1361 {
1362 tmp = strtok(params, idx);
1363 if(!strlen(tmp))
1364 {
1365 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/lay [1-2]");
1366 return 1;
1367 }
1368 new laystyle = strval(tmp);
1369 if(laystyle < 1 || laystyle > 2)
1370 {
1371 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/lay [1-2]");
1372 return 1;
1373 }
1374 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1375 if(laystyle == 1)
1376 {
1377 ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
1378 }
1379 else if(laystyle == 2)
1380 {
1381 ApplyAnimation(playerid,"SUNBATHE","Lay_Bac_in",3.0,0,1,1,1,0);
1382 }
1383 }
1384 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1385 }
1386 return 1;
1387}
1388/*==============================================================================
1389Comanda: /smoke
1390==============================================================================*/
1391CMD:smoke(playerid, params[])
1392{
1393 new tmp[128], idx;
1394 if(IsPlayerConnected(playerid))
1395 {
1396 if(pInfo[pid][pLoggedIn] == true)
1397 {
1398 tmp = strtok(params, idx);
1399 if(!strlen(tmp))
1400 {
1401 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/smoke [1-4]");
1402 return 1;
1403 }
1404 new smokestyle = strval(tmp);
1405 if(smokestyle < 1 || smokestyle > 4)
1406 {
1407 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/smoke [1-4]");
1408 return 1;
1409 }
1410 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1411 if(smokestyle == 1)
1412 {
1413 ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
1414 }
1415 else if(smokestyle == 2)
1416 {
1417 ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
1418 }
1419 else if(smokestyle == 3)
1420 {
1421 ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0);
1422 }
1423 else if(smokestyle == 4)
1424 {
1425 ApplyAnimation(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0);
1426 }
1427 }
1428 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1429 }
1430 return 1;
1431}
1432/*==============================================================================
1433Comanda: /kiss
1434==============================================================================*/
1435CMD:kiss(playerid, params[])
1436{
1437 if(IsPlayerConnected(playerid))
1438 {
1439 if(pInfo[pid][pLoggedIn] == true)
1440 {
1441 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1442 ApplyAnimation(playerid, "KISSING", "Playa_Kiss_02", 3.0, 1, 0, 0, 0, 0);
1443 }
1444 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1445 }
1446 return 1;
1447}
1448/*==============================================================================
1449Comanda: /wave
1450==============================================================================*/
1451CMD:wave(playerid, params[])
1452{
1453 if(IsPlayerConnected(playerid))
1454 {
1455 if(pInfo[pid][pLoggedIn] == true)
1456 {
1457 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1458 ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0);
1459 }
1460 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1461 }
1462 return 1;
1463}
1464/*==============================================================================
1465Comanda: /excited
1466==============================================================================*/
1467CMD:excited(playerid, params[])
1468{
1469 if(IsPlayerConnected(playerid))
1470 {
1471 if(pInfo[pid][pLoggedIn] == true)
1472 {
1473 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1474 ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);
1475 }
1476 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1477 }
1478 return 1;
1479}
1480/*==============================================================================
1481Comanda: /taichi
1482==============================================================================*/
1483CMD:taichi(playerid, params[])
1484{
1485 if(IsPlayerConnected(playerid))
1486 {
1487 if(pInfo[pid][pLoggedIn] == true)
1488 {
1489 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1490 ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
1491 }
1492 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1493 }
1494 return 1;
1495}
1496/*==============================================================================
1497Comanda: /carjack
1498==============================================================================*/
1499CMD:carjack(playerid, params[])
1500{
1501 new tmp[128], idx;
1502 if(IsPlayerConnected(playerid))
1503 {
1504 if(pInfo[pid][pLoggedIn] == true)
1505 {
1506 tmp = strtok(params, idx);
1507 if(!strlen(tmp))
1508 {
1509 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/carjack [1-2]");
1510 return 1;
1511 }
1512 new carjackstyle = strval(tmp);
1513 if(carjackstyle < 1 || carjackstyle > 2)
1514 {
1515 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/carjack [1-2]");
1516 return 1;
1517 }
1518 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1519 if(carjackstyle == 1)
1520 {
1521 ApplyAnimation(playerid,"PED","CAR_pullout_LHS",4.0,0,0,0,0,0);
1522 }
1523 else if(carjackstyle == 2)
1524 {
1525 ApplyAnimation(playerid,"PED","CAR_pulloutL_RHS",4.0,0,0,0,0,0);
1526 }
1527 }
1528 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1529 }
1530 return 1;
1531}
1532/*==============================================================================
1533Comanda: /vomit
1534==============================================================================*/
1535CMD:vomit(playerid, params[])
1536{
1537 if(IsPlayerConnected(playerid))
1538 {
1539 if(pInfo[pid][pLoggedIn] == true)
1540 {
1541 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1542 ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
1543 }
1544 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1545 }
1546 return 1;
1547}
1548/*==============================================================================
1549Comanda: /aim
1550==============================================================================*/
1551CMD:aim(playerid, params[])
1552{
1553 new tmp[128], idx;
1554 if(IsPlayerConnected(playerid))
1555 {
1556 if(pInfo[pid][pLoggedIn] == true)
1557 {
1558 tmp = strtok(params, idx);
1559 if(!strlen(tmp))
1560 {
1561 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/aim [1-3]");
1562 return 1;
1563 }
1564 new aimstyle = strval(tmp);
1565 if(aimstyle < 1 || aimstyle > 3)
1566 {
1567 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/aim [1-3]");
1568 return 1;
1569 }
1570 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1571 if(aimstyle == 1)
1572 {
1573 ApplyAnimation(playerid,"PED","gang_gunstand",4.0,1,1,1,1,1);
1574 }
1575 else if(aimstyle == 2)
1576 {
1577 ApplyAnimation(playerid,"PED","Driveby_L",4.0,0,1,1,1,1);
1578 }
1579 else if(aimstyle == 3)
1580 {
1581 ApplyAnimation(playerid,"PED","Driveby_R",4.0,0,1,1,1,1);
1582 }
1583 }
1584 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1585 }
1586 return 1;
1587}
1588/*==============================================================================
1589Comanda: /kickass
1590==============================================================================*/
1591CMD:kickass(playerid, params[])
1592{
1593 if(IsPlayerConnected(playerid))
1594 {
1595 if(pInfo[pid][pLoggedIn] == true)
1596 {
1597 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1598 ApplyAnimation(playerid,"FIGHT_E","Hit_fightkick",4.1,0,0,0,0,0);
1599 }
1600 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1601 }
1602 return 1;
1603}
1604/*==============================================================================
1605Comanda: /beach
1606==============================================================================*/
1607CMD:beach(playerid, params[])
1608{
1609 if(IsPlayerConnected(playerid))
1610 {
1611 if(pInfo[pid][pLoggedIn] == true)
1612 {
1613 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1614 ApplyAnimation(playerid,"BEACH","SitnWait_loop_W",4.1,0,1,1,1,1);
1615 }
1616 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1617 }
1618 return 1;
1619}
1620/*==============================================================================
1621Comanda: /gro
1622==============================================================================*/
1623CMD:gro(playerid, params[])
1624{
1625 if(IsPlayerConnected(playerid))
1626 {
1627 if(pInfo[pid][pLoggedIn] == true)
1628 {
1629 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1630 ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
1631 }
1632 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1633 }
1634 return 1;
1635}
1636/*==============================================================================
1637Comanda: /fallback
1638==============================================================================*/
1639CMD:fallback(playerid, params[])
1640{
1641 if(IsPlayerConnected(playerid))
1642 {
1643 if(pInfo[pid][pLoggedIn] == true)
1644 {
1645 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1646 ApplyAnimation(playerid, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
1647 }
1648 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1649 }
1650 return 1;
1651}
1652/*==============================================================================
1653Comanda: /fall
1654==============================================================================*/
1655CMD:fall(playerid, params[])
1656{
1657 if(IsPlayerConnected(playerid))
1658 {
1659 if(pInfo[pid][pLoggedIn] == true)
1660 {
1661 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1662 ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
1663 }
1664 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1665 }
1666 return 1;
1667}
1668/*==============================================================================
1669Comanda: /rap
1670==============================================================================*/
1671CMD:rap(playerid, params[])
1672{
1673 new tmp[128], idx;
1674 if(IsPlayerConnected(playerid))
1675 {
1676 if(pInfo[pid][pLoggedIn] == true)
1677 {
1678 tmp = strtok(params, idx);
1679 if(!strlen(tmp))
1680 {
1681 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/rap [1-4]");
1682 return 1;
1683 }
1684 new rapstyle = strval(tmp);
1685 if(rapstyle < 1 || rapstyle > 4)
1686 {
1687 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/rap [1-4]");
1688 return 1;
1689 }
1690 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1691 if(rapstyle == 1)
1692 {
1693 ApplyAnimation(playerid,"RAPPING","RAP_A_Loop",4.0,1,0,0,0,0);
1694 }
1695 else if(rapstyle == 2)
1696 {
1697 ApplyAnimation(playerid,"RAPPING","RAP_C_Loop",4.0,1,0,0,0,0);
1698 }
1699 else if(rapstyle == 3)
1700 {
1701 ApplyAnimation(playerid,"GANGS","prtial_gngtlkD",4.0,1,0,0,0,0);
1702 }
1703 else if(rapstyle == 4)
1704 {
1705 ApplyAnimation(playerid,"GANGS","prtial_gngtlkH",4.0,1,0,0,1,1);
1706 }
1707 }
1708 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1709 }
1710 return 1;
1711}
1712
1713
1714/*==============================================================================
1715Comanda: /knife
1716==============================================================================*/
1717CMD:knife(playerid, params[])
1718{
1719 new tmp[128], idx;
1720 if(IsPlayerConnected(playerid))
1721 {
1722 if(pInfo[pid][pLoggedIn] == true)
1723 {
1724 tmp = strtok(params, idx);
1725 if(!strlen(tmp))
1726 {
1727 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/knife [1-4]");
1728 return 1;
1729 }
1730 new knifestyle = strval(tmp);
1731 if(knifestyle < 1 || knifestyle > 4)
1732 {
1733 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/knife [1-4]");
1734 return 1;
1735 }
1736 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1737 if(knifestyle == 1)
1738 {
1739 ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Damage",4.0,0,1,1,1,0);
1740 }
1741 else if(knifestyle == 2)
1742 {
1743 ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Die",4.0,0,1,1,1,0);
1744 }
1745 else if(knifestyle == 3)
1746 {
1747 ApplyAnimation(playerid,"KNIFE","KILL_Knife_Player",4.0,0,0,0,0,0);
1748 }
1749 else if(knifestyle == 4)
1750 {
1751 ApplyAnimation(playerid,"KNIFE","KILL_Partial",4.0,0,1,1,1,1);
1752 }
1753 }
1754 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1755 }
1756 return 1;
1757}
1758/*==============================================================================
1759Comanda: /basket
1760==============================================================================*/
1761CMD:basket(playerid, params[])
1762{
1763 new tmp[128], idx;
1764 if(IsPlayerConnected(playerid))
1765 {
1766 if(pInfo[pid][pLoggedIn] == true)
1767 {
1768 tmp = strtok(params, idx);
1769 if(!strlen(tmp))
1770 {
1771 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/basket [1-6]");
1772 return 1;
1773 }
1774 new basketstyle = strval(tmp);
1775 if(basketstyle < 1 || basketstyle > 6)
1776 {
1777 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/basket [1-6]");
1778 return 1;
1779 }
1780 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1781 if(basketstyle == 1)
1782 {
1783 ApplyAnimation(playerid,"BSKTBALL","BBALL_idleloop",4.0,1,0,0,0,0);
1784 }
1785 else if(basketstyle == 2)
1786 {
1787 ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
1788 }
1789 else if(basketstyle == 3)
1790 {
1791 ApplyAnimation(playerid,"BSKTBALL","BBALL_pickup",4.0,0,0,0,0,0);
1792 }
1793 else if(basketstyle == 4)
1794 {
1795 ApplyAnimation(playerid,"BSKTBALL","BBALL_run",4.1,1,1,1,1,1);
1796 }
1797 else if(basketstyle == 5)
1798 {
1799 ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
1800 }
1801 else if(basketstyle == 6)
1802 {
1803 ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);
1804 }
1805 }
1806 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1807 }
1808 return 1;
1809}
1810/*==============================================================================
1811Comanda: /reload
1812==============================================================================*/
1813CMD:reload(playerid, params[])
1814{
1815 new tmp[128], idx;
1816 if(IsPlayerConnected(playerid))
1817 {
1818 if(pInfo[pid][pLoggedIn] == true)
1819 {
1820 tmp = strtok(params, idx);
1821 if(!strlen(tmp))
1822 {
1823 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/reload [1-2]");
1824 return 1;
1825 }
1826 new reloadstyle = strval(tmp);
1827 if(reloadstyle < 1 || reloadstyle > 2)
1828 {
1829 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/reload [1-2]");
1830 return 1;
1831 }
1832 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1833 if(reloadstyle == 1)
1834 {
1835 ApplyAnimation(playerid,"COLT45","colt45_reload",4.0,0,0,0,0,1);
1836 }
1837 else if(reloadstyle == 2)
1838 {
1839 ApplyAnimation(playerid,"UZI","UZI_reload",4.0,0,0,0,0,0);
1840 }
1841 }
1842 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1843 }
1844 return 1;
1845}
1846/*==============================================================================
1847Comanda: /box
1848==============================================================================*/
1849CMD:box(playerid, params[])
1850{
1851 if(IsPlayerConnected(playerid))
1852 {
1853 if(pInfo[pid][pLoggedIn] == true)
1854 {
1855 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1856 ApplyAnimation(playerid,"GYMNASIUM","GYMshadowbox",4.0,1,1,1,1,0);
1857 }
1858 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1859 }
1860 return 1;
1861}
1862/*==============================================================================
1863Comanda: /strip
1864==============================================================================*/
1865CMD:strip(playerid, params[])
1866{
1867 new tmp[128], idx;
1868 if(IsPlayerConnected(playerid))
1869 {
1870 if(pInfo[pid][pLoggedIn] == true)
1871 {
1872 tmp = strtok(params, idx);
1873 if(!strlen(tmp))
1874 {
1875 SendClientMessage(playerid, -1,""PORTOCALIU"Scrie: "ALBASTRU"/strip [1-6]");
1876 return 1;
1877 }
1878 new stripstyle = strval(tmp);
1879 if(stripstyle < 1 || stripstyle > 6)
1880 {
1881 SendClientMessage(playerid, -1,""PORTOCALIU"Scrie: "ALBASTRU"/strip [1-6]");
1882 return 1;
1883 }
1884 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1885 if(stripstyle == 1)
1886 {
1887 ApplyAnimation(playerid,"STRIP", "strip_A", 4.1, 1, 1, 1, 1, 1 );
1888 }
1889 else if(stripstyle == 2)
1890 {
1891 ApplyAnimation(playerid,"STRIP", "strip_B", 4.1, 1, 1, 1, 1, 1 );
1892 }
1893 else if(stripstyle == 3)
1894 {
1895 ApplyAnimation(playerid,"STRIP", "strip_C", 4.1, 1, 1, 1, 1, 1 );
1896 }
1897 else if(stripstyle == 4)
1898 {
1899 ApplyAnimation(playerid,"STRIP", "strip_D", 4.1, 1, 1, 1, 1, 1 );
1900 }
1901 else if(stripstyle == 5)
1902 {
1903 ApplyAnimation(playerid,"STRIP", "strip_E", 4.1, 1, 1, 1, 1, 1 );
1904 }
1905 else if(stripstyle == 6)
1906 {
1907 ApplyAnimation(playerid,"STRIP", "strip_F", 4.1, 1, 1, 1, 1, 1 );
1908 }
1909 }
1910 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1911 }
1912 return 1;
1913}
1914/*==============================================================================
1915Comanda: /crossarms
1916==============================================================================*/
1917CMD:crossarms(playerid, params[])
1918{
1919 if(IsPlayerConnected(playerid))
1920 {
1921 if(pInfo[pid][pLoggedIn] == true)
1922 {
1923 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1924 ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
1925 }
1926 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1927 }
1928 return 1;
1929}
1930/*==============================================================================
1931Comanda: /slapass
1932==============================================================================*/
1933CMD:slapass(playerid, params[])
1934{
1935 if(IsPlayerConnected(playerid))
1936 {
1937 if(pInfo[pid][pLoggedIn] == true)
1938 {
1939 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1940 ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0);
1941 }
1942 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1943 }
1944 return 1;
1945}
1946/*==============================================================================
1947Comanda: /fucku
1948==============================================================================*/
1949CMD:fucku(playerid, params[])
1950{
1951 if(IsPlayerConnected(playerid))
1952 {
1953 if(pInfo[pid][pLoggedIn] == true)
1954 {
1955 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1956 ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
1957 }
1958 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1959 }
1960 return 1;
1961}
1962/*==============================================================================
1963Comanda: /sup
1964==============================================================================*/
1965CMD:sup(playerid, params[])
1966{
1967 new tmp[128], idx;
1968 if(IsPlayerConnected(playerid))
1969 {
1970 if(pInfo[pid][pLoggedIn] == true)
1971 {
1972 tmp = strtok(params, idx);
1973 if(!strlen(tmp))
1974 {
1975 SendClientMessage(playerid, -1,""PORTOCALIU"Scrie: "ALBASTRU"/sup [1-3]");
1976 return 1;
1977 }
1978 new supstyle = strval(tmp);
1979 if(supstyle < 1 || supstyle > 3)
1980 {
1981 SendClientMessage(playerid, -1,""PORTOCALIU"Scrie: "ALBASTRU"/sup [1-3]");
1982 return 1;
1983 }
1984 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
1985 if(supstyle == 1)
1986 {
1987 ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
1988 }
1989 else if(supstyle == 2)
1990 {
1991 ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
1992 }
1993 else if(supstyle == 3)
1994 {
1995 ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0);
1996 }
1997 }
1998 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
1999 }
2000 return 1;
2001}
2002/*==============================================================================
2003Comanda: /spray
2004==============================================================================*/
2005CMD:spray(playerid, params[])
2006{
2007 if(IsPlayerConnected(playerid))
2008 {
2009 if(pInfo[pid][pLoggedIn] == true)
2010 {
2011 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2012 ApplyAnimation(playerid,"GANGS","shake_cara",4.0,0,0,0,0,0);
2013 }
2014 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2015 }
2016 return 1;
2017}
2018/*==============================================================================
2019Comanda: /headbut
2020==============================================================================*/
2021CMD:headbut(playerid, params[])
2022{
2023 if(IsPlayerConnected(playerid))
2024 {
2025 if(pInfo[pid][pLoggedIn] == true)
2026 {
2027 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2028 ApplyAnimation(playerid,"WAYFARER","WF_Fwd",4.0,0,0,0,0,0);
2029 }
2030 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2031 }
2032 return 1;
2033}
2034/*==============================================================================
2035Comanda: /carjacked
2036==============================================================================*/
2037CMD:carjacked(playerid, params[])
2038{
2039 new tmp[128], idx;
2040 if(IsPlayerConnected(playerid))
2041 {
2042 if(pInfo[pid][pLoggedIn] == true)
2043 {
2044 tmp = strtok(params, idx);
2045 if(!strlen(tmp))
2046 {
2047 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/carjacked [1-2]");
2048 return 1;
2049 }
2050 new carjackedstyle = strval(tmp);
2051 if(carjackedstyle < 1 || carjackedstyle > 2)
2052 {
2053 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/carjacked [1-2]");
2054 return 1;
2055 }
2056 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2057 if(carjackedstyle == 1)
2058 {
2059 ApplyAnimation(playerid,"PED","CAR_jackedLHS",4.0,0,1,1,1,0);
2060 }
2061 else if(carjackedstyle == 2)
2062 {
2063 ApplyAnimation(playerid,"PED","CAR_jackedRHS",4.0,0,1,1,1,0);
2064 }
2065 }
2066 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2067 }
2068 return 1;
2069}
2070/*==============================================================================
2071Comanda: /rcarjack
2072==============================================================================*/
2073CMD:rcarjack(playerid, params[])
2074{
2075 new tmp[128], idx;
2076 if(IsPlayerConnected(playerid))
2077 {
2078 if(pInfo[pid][pLoggedIn] == true)
2079 {
2080 tmp = strtok(params, idx);
2081 if(!strlen(tmp))
2082 {
2083 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/rcarjack [1-2]");
2084 return 1;
2085 }
2086 new rcarjackstyle = strval(tmp);
2087 if(rcarjackstyle < 1 || rcarjackstyle > 2)
2088 {
2089 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/rcarjack [1-2]");
2090 return 1;
2091 }
2092 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2093 if(rcarjackstyle == 1)
2094 {
2095 ApplyAnimation(playerid,"PED","CAR_pulloutL_LHS",4.0,0,0,0,0,0);
2096 }
2097 else if(rcarjackstyle == 2)
2098 {
2099 ApplyAnimation(playerid,"PED","CAR_pullout_LHS",4.0,0,0,0,0,0);
2100 }
2101 }
2102 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2103 }
2104 return 1;
2105}
2106/*==============================================================================
2107Comanda: /lcarjack
2108==============================================================================*/
2109CMD:lcarjack(playerid, params[])
2110{
2111 new tmp[128], idx;
2112 if(IsPlayerConnected(playerid))
2113 {
2114 if(pInfo[pid][pLoggedIn] == true)
2115 {
2116 tmp = strtok(params, idx);
2117 if(!strlen(tmp))
2118 {
2119 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/lcarjack [1-2]");
2120 return 1;
2121 }
2122 new lcarjackstyle = strval(tmp);
2123 if(lcarjackstyle < 1 || lcarjackstyle > 2)
2124 {
2125 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/lcarjack [1-2]");
2126 return 1;
2127 }
2128 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2129 if(lcarjackstyle == 1)
2130 {
2131 ApplyAnimation(playerid,"PED","CAR_pulloutL_RHS",4.0,0,0,0,0,0);
2132 }
2133 else if(lcarjackstyle == 2)
2134 {
2135 ApplyAnimation(playerid,"PED","CAR_pullout_RHS",4.0,0,0,0,0,0);
2136 }
2137 }
2138 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2139 }
2140 return 1;
2141}
2142/*==============================================================================
2143Comanda: /exhaust
2144==============================================================================*/
2145CMD:exhaust(playerid, params[])
2146{
2147 if(IsPlayerConnected(playerid))
2148 {
2149 if(pInfo[pid][pLoggedIn] == true)
2150 {
2151 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2152 ApplyAnimation(playerid,"PED","IDLE_tired",3.0,1,0,0,0,0);
2153 }
2154 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2155 }
2156 return 1;
2157}
2158/*==============================================================================
2159Comanda: /leftslap
2160==============================================================================*/
2161CMD:leftslap(playerid, params[])
2162{
2163 if(IsPlayerConnected(playerid))
2164 {
2165 if(pInfo[pid][pLoggedIn] == true)
2166 {
2167 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2168 ApplyAnimation(playerid,"PED","BIKE_elbowL",4.0,0,0,0,0,0);
2169 }
2170 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2171 }
2172 return 1;
2173}
2174/*==============================================================================
2175Comanda: /airkick
2176==============================================================================*/
2177CMD:airkick(playerid, params[])
2178{
2179 if(IsPlayerConnected(playerid))
2180 {
2181 if(pInfo[pid][pLoggedIn] == true)
2182 {
2183 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2184 ApplyAnimation(playerid,"FIGHT_C","FightC_M",4.0,0,1,1,0,0);
2185 }
2186 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2187 }
2188 return 1;
2189}
2190/*==============================================================================
2191Comanda: /gkick
2192==============================================================================*/
2193CMD:gkick(playerid, params[])
2194{
2195 if(IsPlayerConnected(playerid))
2196 {
2197 if(pInfo[pid][pLoggedIn] == true)
2198 {
2199 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2200 ApplyAnimation(playerid,"FIGHT_D","FightD_G",4.0,0,0,0,0,0);
2201 }
2202 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2203 }
2204 return 1;
2205}
2206/*==============================================================================
2207Comanda: /walk
2208==============================================================================*/
2209CMD:walk(playerid, params[])
2210{
2211 new tmp[128], idx;
2212 if(IsPlayerConnected(playerid))
2213 {
2214 if(pInfo[pid][pLoggedIn] == true)
2215 {
2216 tmp = strtok(params, idx);
2217 if(!strlen(tmp))
2218 {
2219 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/walk [1-14]");
2220 return 1;
2221 }
2222 new walkstyle = strval(tmp);
2223 if(walkstyle < 1 || walkstyle > 14)
2224 {
2225 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/walk [1-14]");
2226 return 1;
2227 }
2228 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2229 if(walkstyle == 1)
2230 {
2231 ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1,1);
2232 }
2233 else if(walkstyle == 2)
2234 {
2235 ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1,1);
2236 }
2237 else if(walkstyle == 3)
2238 {
2239 ApplyAnimation(playerid,"FAT","FatWalk",4.1,1,1,1,1,1,1);
2240 }
2241 else if(walkstyle == 4)
2242 {
2243 ApplyAnimation(playerid,"WUZI","CS_Wuzi_pt1",4.1,1,1,1,1,1,1);
2244 }
2245 else if(walkstyle == 5)
2246 {
2247 ApplyAnimation(playerid,"WUZI","Wuzi_walk",3.0,1,1,1,1,1,1);
2248 }
2249 else if(walkstyle == 6)
2250 {
2251 ApplyAnimation(playerid,"POOL","Pool_walk",3.0,1,1,1,1,1,1);
2252 }
2253 else if(walkstyle == 7)
2254 {
2255 ApplyAnimation(playerid,"PED","Walk_player",3.0,1,1,1,1,1,1);
2256 }
2257 else if(walkstyle == 8)
2258 {
2259 ApplyAnimation(playerid,"PED","Walk_old",3.0,1,1,1,1,1,1);
2260 }
2261 else if(walkstyle == 9)
2262 {
2263 ApplyAnimation(playerid,"PED","Walk_fatold",3.0,1,1,1,1,1,1);
2264 }
2265 else if(walkstyle == 10)
2266 {
2267 ApplyAnimation(playerid,"PED","woman_walkfatold",3.0,1,1,1,1,1,1);
2268 }
2269 else if(walkstyle == 11)
2270 {
2271 ApplyAnimation(playerid,"PED","woman_walknorm",3.0,1,1,1,1,1,1);
2272 }
2273 else if(walkstyle == 12)
2274 {
2275 ApplyAnimation(playerid,"PED","woman_walkold",3.0,1,1,1,1,1,1);
2276 }
2277 else if(walkstyle == 13)
2278 {
2279 ApplyAnimation(playerid,"PED","woman_walkpro",3.0,1,1,1,1,1,1);
2280 }
2281 else if(walkstyle == 14)
2282 {
2283 ApplyAnimation(playerid,"PED","woman_walkshop",3.0,1,1,1,1,1,1);
2284 }
2285 }
2286 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2287 }
2288 return 1;
2289}
2290/*==============================================================================
2291Comanda: /gwalk
2292==============================================================================*/
2293CMD:gwalk(playerid, params[])
2294{
2295 new tmp[128], idx;
2296 if(IsPlayerConnected(playerid))
2297 {
2298 if(pInfo[pid][pLoggedIn] == true)
2299 {
2300 tmp = strtok(params, idx);
2301 if(!strlen(tmp))
2302 {
2303 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/gwalk [1-2]");
2304 return 1;
2305 }
2306 new gwalkstyle = strval(tmp);
2307 if(gwalkstyle < 1 || gwalkstyle > 2)
2308 {
2309 SendClientMessage(playerid, -1,""PORTOCALIU"Type: "ALBASTRU"/gwalk [1-2]");
2310 return 1;
2311 }
2312 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2313 if(gwalkstyle == 1)
2314 {
2315 ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
2316 }
2317 else if(gwalkstyle == 2)
2318 {
2319 ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
2320 }
2321 }
2322 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2323 }
2324 return 1;
2325}
2326/*==============================================================================
2327Comanda: /push
2328==============================================================================*/
2329CMD:push(playerid, params[])
2330{
2331 if(IsPlayerConnected(playerid))
2332 {
2333 if(pInfo[pid][pLoggedIn] == true)
2334 {
2335 if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
2336 ApplyAnimation(playerid,"SPRAYCAN","spraycan_full",4.0,0,0,0,0,0);
2337 }
2338 else return SendClientMessage(playerid, -1, ""ALBASTRU"You are not logged in !");
2339 }
2340 return 1;
2341}