Guest User

Untitled

a guest
Jan 8th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.03 KB | None | 0 0
  1. /* Server Includes */
  2. #include <a_samp>
  3. #include <streamer>
  4. #include <zcmd>
  5. #include <foreach>
  6. #include <sscanf2>
  7. #include <YSI\y_ini>
  8. #include <a_actor>
  9. #include <fly>
  10.  
  11. /* Server Colors */
  12. #define COLOR_PURPLE 0xC2A2DAAA
  13. #define COLOR_GRAD2 0xBFC0C2FF
  14. #define COLOR_GRAD1 0xB4B5B7FF
  15. #define COLOR_GRAD2 0xBFC0C2FF
  16. #define COLOR_GREY 0xAFAFAFAA
  17. #define COLOR_GRAD3 0xCBCCCEFF
  18. #define COLOR_LIGHTBLUE 0x006FDD96
  19. #define COLOR_GRAD4 0xD8D8D8FF
  20. #define COLOR_FADE 0xC8C8C8C8
  21. #define COLOR_FADE2 0xC8C8C8C8
  22. #define COLOR_FADE3 0xAAAAAAAA
  23. #define COLOR_FADE4 0x8C8C8C8C
  24. #define COLOR_YELLOW 0xDABB3E00
  25. #define COLOR_FADE5 0x6E6E6E6E
  26. #define COLOR_GRAD5 0xE3E3E3FF
  27. #define COLOR_FADE1 0xE6E6E6E6
  28. #define COLOR_GRAD6 0xF0F0F0FF
  29. #define TEAM_HIT_COLOR 0xFFFFFF00
  30. #define COLOR_RED 0xFF0000FF
  31. #define COLOR_GREEN 0x90EE90FF
  32. #define COL_RED "{F81414}"
  33. #define COL_WHITE "{FFFFFF}"
  34.  
  35. /* Server Defines */
  36. #define PATH "Accounts/%s.ini"
  37. #define SECONDS(%1) ((%1)*(1000))
  38. #define ALTCOMMAND:%1->%2; \
  39. COMMAND:%1(playerid, params[]) \
  40. return cmd_%2(playerid, params);
  41. #define function%0(%1) forward%0(%1); public%0(%1)
  42.  
  43. #define FILTERSCRIPT
  44. #if defined FILTERSCRIPT
  45.  
  46. /* NEWS-URI*/
  47. new vCar[MAX_PLAYERS] = -1;
  48.  
  49. /* SERVER SIDE CASH */
  50. #define GivePlayerCash(%0,%1) SetPVarInt(%0,"Money",GetPlayerCash(%0)+%1),GivePlayerMoney(%0,%1)
  51. #define ResetPlayerCash(%0) SetPVarInt(%0,"Money",0), ResetPlayerMoney(%0)
  52. #define GetPlayerCash(%0) GetPVarInt(%0,"Money")
  53.  
  54. /* DIALOGS */
  55. #define DIALOG_REGISTER 1
  56. #define DIALOG_LOGIN 2
  57. #define DIALOG_AGE 3
  58. #define DIALOG_SEX 4
  59. #define DIALOG_WEAPON 5
  60. #define DIALOG_tplist 6
  61.  
  62. /* ENUMS */
  63. enum pInfo
  64. {
  65. pPass,
  66. pCash,
  67. pAdmin,
  68. pSex,
  69. pAge,
  70. Float:pPos_x,
  71. Float:pPos_y,
  72. Float:pPos_z,
  73. pSkin,
  74. pTeam,
  75. }
  76. new PlayerInfo[MAX_PLAYERS][pInfo];
  77. /* <--------------------------------------------> */
  78.  
  79. main()
  80. {
  81. print(" ");
  82. print(" ");
  83. print("- CONNECTED TO SERVER -");
  84. print(" ");
  85. }
  86.  
  87. new
  88. noooc = 0,
  89. Logged[ MAX_PLAYERS ],
  90. gOoc[ MAX_PLAYERS ]
  91. ;
  92.  
  93. public OnPlayerConnect(playerid)
  94. {
  95. InitFly(playerid);
  96. gOoc[ playerid ] = 0; Logged[ playerid ] = 0;
  97. // Reset stats!
  98. PlayerInfo[ playerid ][ pCash ] = 0;
  99. PlayerInfo[ playerid ][ pAdmin ] = 0;
  100. PlayerInfo[ playerid ][ pSex ] = 0;
  101. PlayerInfo[ playerid ][ pAge ] = 0;
  102. PlayerInfo[ playerid ][ pPos_x ] = 0.0;
  103. PlayerInfo[ playerid ][ pPos_y ] = 0.0;
  104. PlayerInfo[ playerid ][ pPos_z ] = 0.0;
  105. PlayerInfo[ playerid ][ pSkin ] = 0;
  106. PlayerInfo[ playerid ][ pTeam ] = 0;
  107.  
  108. if(fexist(UserPath(playerid)))
  109. {
  110. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  111. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"LOGIN","Type your password below to login:","Login","Quit");
  112. }
  113. else
  114. {
  115. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"REGISTER","Type your password below to register a new account:","Register","Quit");
  116. }
  117. return 1;
  118. }
  119. //================================================================//
  120. public OnPlayerRequestClass(playerid, classid)
  121. {
  122. SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0);
  123. TogglePlayerSpectating(playerid, 1);
  124. SpawnPlayer(playerid);
  125. SetTimerEx("SkipOnPlayerRequestClass", 100, false, "i", playerid);
  126. return 1;
  127. }
  128.  
  129. forward SkipOnPlayerRequestClass(playerid);
  130. public SkipOnPlayerRequestClass(playerid)
  131. {
  132. SpawnPlayer(playerid);
  133. TogglePlayerSpectating(playerid, 0);
  134. return 1;
  135. }
  136.  
  137. public OnGameModeInit()
  138. {
  139. /* <-------------------------------------------> */
  140. AddPlayerClass(233,1243.9525,-317.7200,9.3428,197.2483,0,0,0,0,0,0);
  141. AddPlayerClass(233,1243.9525,-317.7200,9.3428,197.2483,0,0,0,0,0,0);
  142. AddStaticVehicle(411,1835.8517,-1866.5050,13.3828,338.0116,211,226); // infernus #1
  143. /* <-------------------------------------------> */
  144. ShowPlayerMarkers(0);
  145. ShowNameTags(1);
  146. DisableInteriorEnterExits();
  147. EnableStuntBonusForAll(0);
  148. SetNameTagDrawDistance(30.0);
  149. UsePlayerPedAnims();
  150. // =========== TIMERS ===========
  151. SetTimer("MoneyUpdate",1000,1);
  152. SetTimer("SaveAccounts", SECONDS(13), 1);
  153. return 1;
  154. }
  155. //================================================================//
  156. public OnPlayerSpawn(playerid)
  157. {
  158. if(IsPlayerConnected(playerid))
  159. {
  160. SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
  161. SetPlayerToTeamColor(playerid);
  162. Logged[playerid] = 1;
  163. }
  164. if(PlayerInfo[playerid][pPos_x] == 0 && PlayerInfo[playerid][pPos_y] == 0)
  165. {
  166. SetPlayerPos(playerid,1799.8875,-1866.1479,13.5718);
  167. SetPlayerFacingAngle( playerid,359.7014);
  168. Logged[playerid] = 1;
  169. }
  170. else
  171. {
  172. SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  173. Logged[playerid] = 1;
  174. }
  175. return 1;
  176. }
  177.  
  178. public OnPlayerDeath(playerid, killerid, reason)
  179. {
  180. GameTextForPlayer(playerid, "Wasted", 5000, 2);
  181. return 1;
  182. }
  183.  
  184. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  185. {
  186. if(dialogid == 6)
  187. {
  188. if(response) // If they clicked 'Select' or double-clicked a weapon
  189. {
  190. switch(listitem)
  191. {
  192. case 0: if(IsPlayerInAnyVehicle(playerid))
  193. {
  194. new vehicleid = GetPlayerVehicleID(playerid);
  195. //set vehicle position if he is in a vehicle
  196. SetVehiclePos(vehicleid,1462.4116,-1013.3667,26.8438);
  197. //Gametext and client message for the player
  198. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Bank LS successfully!");
  199. GameTextForPlayer(playerid, "~b~Welcome to~r~ Bank LS!", 3000, 3);
  200. }
  201. //if the player is on foot
  202. else
  203. {
  204. SetPlayerPos(playerid,1462.4116,-1013.3667,26.8438);//set the player position
  205. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  206. //client message and game text
  207. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Bank LS successfully!");
  208. GameTextForPlayer(playerid, "~b~Welcome to~r~ Bank LS!", 3000, 3);
  209. }
  210. case 1: if(IsPlayerInAnyVehicle(playerid))
  211. {
  212. new vehicleid = GetPlayerVehicleID(playerid);
  213. //set vehicle position if he is in a vehicle
  214. SetVehiclePos(vehicleid,-2307.9568,-1637.9387,483.6966);
  215. //Gametext and client message for the player
  216. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Chilliad successfully!");
  217. GameTextForPlayer(playerid, "~b~Welcome to~r~ Chilliad!", 3000, 3);
  218. }
  219. //if the player is on foot
  220. else
  221. {
  222. SetPlayerPos(playerid,-2307.9568,-1637.9387,483.6966);//set the player position
  223. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  224. //client message and game text
  225. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Chilliad successfully!");
  226. GameTextForPlayer(playerid, "~b~Welcome to~r~ Chilliad!", 3000, 3);
  227. }
  228. case 2: if(IsPlayerInAnyVehicle(playerid))
  229. {
  230. new vehicleid = GetPlayerVehicleID(playerid);
  231. //set vehicle position if he is in a vehicle
  232. SetVehiclePos(vehicleid,1544.6248,-1675.6541,13.5588);
  233. //Gametext and client message for the player
  234. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to LSPD successfully!");
  235. GameTextForPlayer(playerid, "~b~Welcome to~r~ LSPD!", 3000, 3);
  236. }
  237. //if the player is on foot
  238. else
  239. {
  240. SetPlayerPos(playerid,1544.6248,-1675.6541,13.5588);//set the player position
  241. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  242. //client message and game text
  243. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to LSPD successfully!");
  244. GameTextForPlayer(playerid, "~b~Welcome to~r~ LSPD!", 3000, 3);
  245. }
  246. case 3: if(IsPlayerInAnyVehicle(playerid))
  247. {
  248. new vehicleid = GetPlayerVehicleID(playerid);
  249. //set vehicle position if he is in a vehicle
  250. SetVehiclePos(vehicleid,1365.5562,-1279.7185,13.5469);
  251. //Gametext and client message for the player
  252. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Gun Shop successfully!");
  253. GameTextForPlayer(playerid, "~b~Welcome to~r~ Gun Shop!", 3000, 3);
  254. }
  255. //if the player is on foot
  256. else
  257. {
  258. SetPlayerPos(playerid,1365.5562,-1279.7185,13.5469);//set the player position
  259. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  260. //client message and game text
  261. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Gun Shop successfully!");
  262. GameTextForPlayer(playerid, "~b~Welcome to~r~ Gun Shop!", 3000, 3);
  263. }
  264. case 4: if(IsPlayerInAnyVehicle(playerid))
  265. {
  266. new vehicleid = GetPlayerVehicleID(playerid);
  267. //set vehicle position if he is in a vehicle
  268. SetVehiclePos(vehicleid,1821.9342,-1849.9662,13.4141);
  269. //Gametext and client message for the player
  270. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Spawn Civil successfully!");
  271. GameTextForPlayer(playerid, "~b~Welcome to~r~ Spawn Civil!", 3000, 3);
  272. }
  273. //if the player is on foot
  274. else
  275. {
  276. SetPlayerPos(playerid,1821.9342,-1849.9662,13.4141);//set the player position
  277. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  278. //client message and game text
  279. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Spawn Civil successfully!");
  280. GameTextForPlayer(playerid, "~b~Welcome to~r~ Spawn Civil!", 3000, 3);
  281. }
  282. case 5: if(IsPlayerInAnyVehicle(playerid))
  283. {
  284. new vehicleid = GetPlayerVehicleID(playerid);
  285. //set vehicle position if he is in a vehicle
  286. SetVehiclePos(vehicleid,2084.9773,-2539.1396,13.5532);
  287. //Gametext and client message for the player
  288. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Airport Los Santos successfully!");
  289. GameTextForPlayer(playerid, "~b~Welcome to~r~ Airport Los Santos!", 3000, 3);
  290. }
  291. //if the player is on foot
  292. else
  293. {
  294. SetPlayerPos(playerid,2084.9773,-2539.1396,13.5532);//set the player position
  295. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  296. //client message and game text
  297. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Airport Los Santos successfully!");
  298. GameTextForPlayer(playerid, "~b~Welcome to~r~ Airport Los Santos!", 3000, 3);
  299. }
  300. case 6: if(IsPlayerInAnyVehicle(playerid))
  301. {
  302. new vehicleid = GetPlayerVehicleID(playerid);
  303. //set vehicle position if he is in a vehicle
  304. SetVehiclePos(vehicleid,1128.8594,-1446.3535,15.7969);
  305. //Gametext and client message for the player
  306. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to CNN Los Santos successfully!");
  307. GameTextForPlayer(playerid, "~b~Welcome to~r~ CNN Los Santos!", 3000, 3);
  308. }
  309. //if the player is on foot
  310. else
  311. {
  312. SetPlayerPos(playerid,1128.8594,-1446.3535,15.7969);//set the player position
  313. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  314. //client message and game text
  315. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to CNN Los Santos successfully!");
  316. GameTextForPlayer(playerid, "~b~Welcome to~r~ CNN Los Santos!", 3000, 3);
  317. }
  318. case 7: if(IsPlayerInAnyVehicle(playerid))
  319. {
  320. new vehicleid = GetPlayerVehicleID(playerid);
  321. //set vehicle position if he is in a vehicle
  322. SetVehiclePos(vehicleid,345.4262,-1783.5619,5.2552);
  323. //Gametext and client message for the player
  324. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to the beach successfully!");
  325. GameTextForPlayer(playerid, "~b~Welcome to~r~ the beach!", 3000, 3);
  326. }
  327. //if the player is on foot
  328. else
  329. {
  330. SetPlayerPos(playerid,345.4262,-1783.5619,5.2552);//set the player position
  331. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  332. //client message and game text
  333. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to the beach successfully!");
  334. GameTextForPlayer(playerid, "~b~Welcome to~r~ the beach!", 3000, 3);
  335. }
  336. case 8: if(IsPlayerInAnyVehicle(playerid))
  337. {
  338. new vehicleid = GetPlayerVehicleID(playerid);
  339. //set vehicle position if he is in a vehicle
  340. SetVehiclePos(vehicleid,334.6613,-1520.3934,35.8672);
  341. //Gametext and client message for the player
  342. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to DealerShip successfully!");
  343. GameTextForPlayer(playerid, "~b~Welcome to~r~ DealerShip!", 3000, 3);
  344. }
  345. //if the player is on foot
  346. else
  347. {
  348. SetPlayerPos(playerid,334.6613,-1520.3934,35.8672);//set the player position
  349. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  350. //client message and game text
  351. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to DealerShip successfully!");
  352. GameTextForPlayer(playerid, "~b~Welcome to~r~ DealerShip!", 3000, 3);
  353. }
  354. case 9: if(IsPlayerInAnyVehicle(playerid))
  355. {
  356. new vehicleid = GetPlayerVehicleID(playerid);
  357. //set vehicle position if he is in a vehicle
  358. SetVehiclePos(vehicleid,714.2040,-537.2700,16.3359);
  359. //Gametext and client message for the player
  360. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Dillimore successfully!");
  361. GameTextForPlayer(playerid, "~b~Welcome to~r~ Dillimore!", 3000, 3);
  362. }
  363. //if the player is on foot
  364. else
  365. {
  366. SetPlayerPos(playerid,714.2040,-537.2700,16.3359);//set the player position
  367. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  368. //client message and game text
  369. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Dillimore successfully!");
  370. GameTextForPlayer(playerid, "~b~Welcome to~r~ Dillimore!", 3000, 3);
  371. }
  372. case 10: if(IsPlayerInAnyVehicle(playerid))
  373. {
  374. new vehicleid = GetPlayerVehicleID(playerid);
  375. //set vehicle position if he is in a vehicle
  376. SetVehiclePos(vehicleid,1434.6615,1701.2008,10.8203);
  377. //Gametext and client message for the player
  378. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Airport Las Venturas successfully!");
  379. GameTextForPlayer(playerid, "~b~Welcome to~r~ Airport Las Venturas!", 3000, 3);
  380. }
  381. //if the player is on foot
  382. else
  383. {
  384. SetPlayerPos(playerid,1434.6615,1701.2008,10.8203);//set the player position
  385. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  386. //client message and game text
  387. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to Airport Las Venturas successfully!");
  388. GameTextForPlayer(playerid, "~b~Welcome to~r~ Airport Las Venturas!", 3000, 3);
  389. }
  390. case 11: if(IsPlayerInAnyVehicle(playerid))
  391. {
  392. new vehicleid = GetPlayerVehicleID(playerid);
  393. //set vehicle position if he is in a vehicle
  394. SetVehiclePos(vehicleid,2087.4399,2035.3589,10.8203);
  395. //Gametext and client message for the player
  396. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to CNN Las Venturas successfully!");
  397. GameTextForPlayer(playerid, "~b~Welcome to~r~ CNN Las Venturas!", 3000, 3);
  398. }
  399. //if the player is on foot
  400. else
  401. {
  402. SetPlayerPos(playerid,2087.4399,2035.3589,10.8203);//set the player position
  403. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  404. //client message and game text
  405. SendClientMessage(playerid,COLOR_GREEN,"SERVER: You have been teleported to CNN Las Venturas successfully!");
  406. GameTextForPlayer(playerid, "~b~Welcome to~r~ CNN Las Venturas!", 3000, 3);
  407. }
  408. }
  409. }
  410. return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
  411. }
  412.  
  413. if(dialogid == 5)
  414. {
  415. if(response)
  416. {
  417. switch(listitem)
  418. {
  419. case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
  420. case 1: GivePlayerWeapon(playerid, WEAPON_M4, 999);
  421. case 2: GivePlayerWeapon(playerid, WEAPON_MP5, 999);
  422. case 3: GivePlayerWeapon(playerid, WEAPON_SNIPER, 100);
  423. case 4: GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 999);
  424. case 5: GivePlayerWeapon(playerid, WEAPON_TEC9, 999);
  425. case 6: GivePlayerWeapon(playerid, WEAPON_MINIGUN, 999);
  426. case 7: GivePlayerWeapon(playerid, WEAPON_FLAMETHROWER, 999);
  427. case 8: GivePlayerWeapon(playerid, WEAPON_SPRAYCAN, 999);
  428. case 9: GivePlayerWeapon(playerid, WEAPON_CHAINSAW, 1);
  429. case 10: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA,999);
  430. case 11: GivePlayerWeapon(playerid, WEAPON_SAWEDOFF,999);
  431. case 12: GivePlayerWeapon(playerid, WEAPON_AK47, 999);
  432. }
  433. }
  434. return 1;
  435. }
  436.  
  437. if(dialogid == DIALOG_AGE)
  438. {
  439. if(!response)
  440. {
  441. Kick(playerid);
  442. }
  443. else
  444. {
  445. if(strlen(inputtext))
  446. {
  447. new age = strval(inputtext);
  448. if(age > 100 || age < 8)
  449. {
  450. ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 8 - 100 ))","Answer","Quit");
  451. }
  452. else
  453. {
  454. PlayerInfo[playerid][pAge] = age;
  455. new
  456. string[ 64 ]
  457. ;
  458. format(string, sizeof(string), "INFO: You're {3BB9FF}%d years old.",age);
  459. SendClientMessage(playerid, -1, string);
  460. GivePlayerCash(playerid, 600);
  461. SaveAccountStats(playerid);
  462. SpawnPlayer(playerid);
  463. }
  464. }
  465. else
  466. {
  467. return 0;
  468. }
  469. }
  470. }
  471. if(dialogid == DIALOG_SEX)
  472. {
  473. if(response)
  474. {
  475. PlayerInfo[playerid][pSex] = 1;
  476. SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}male.");
  477. SetPlayerSkin(playerid, 60);
  478. PlayerInfo[playerid][pSkin] = 60;
  479. ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 8 - 100 ))","Answer","Quit");
  480. }
  481. else
  482. {
  483. PlayerInfo[playerid][pSex] = 2;
  484. SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}female.");
  485. SetPlayerSkin(playerid, 233);
  486. PlayerInfo[playerid][pSkin] = 233;
  487. ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 8 - 100 ))","Answer","Quit");
  488. }
  489. }
  490. switch( dialogid )
  491. {
  492. case DIALOG_REGISTER:
  493. {
  494. if (!response) return Kick(playerid);
  495. if(response)
  496. {
  497. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
  498. new INI:File = INI_Open(UserPath(playerid));
  499. INI_SetTag(File,"data");
  500. INI_WriteInt(File,"Password",udb_hash(inputtext));
  501. INI_WriteInt(File,"Cash",0);
  502. INI_WriteInt(File,"Admin",0);
  503. INI_WriteInt(File,"Sex",0);
  504. INI_WriteInt(File,"Age",0);
  505. INI_WriteFloat(File,"Pos_x",0);
  506. INI_WriteFloat(File,"Pos_y",0);
  507. INI_WriteFloat(File,"Pos_z",0);
  508. INI_WriteInt(File,"Skin",0);
  509. INI_WriteInt(File,"Team",0);
  510. INI_Close(File);
  511.  
  512. ShowPlayerDialog(playerid, DIALOG_SEX, DIALOG_STYLE_MSGBOX, "- Sex -","What gender are you?","Male","Female");
  513. }
  514. }
  515. case DIALOG_LOGIN:
  516. {
  517. if ( !response ) return Kick ( playerid );
  518. if( response )
  519. {
  520. if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  521. {
  522. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  523. new
  524. tmp2[ 256 ],
  525. playername2[ MAX_PLAYER_NAME ]
  526. ;
  527. GetPlayerName(playerid, playername2, sizeof(playername2));
  528. format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~g~%s", playername2);
  529. GameTextForPlayer(playerid, tmp2, 5000, 1);
  530. SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
  531. GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
  532. SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
  533. }
  534. else
  535. {
  536. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
  537. TogglePlayerSpectating(playerid, 0);
  538. }
  539. return 1;
  540. }
  541. }
  542. }
  543. return 1;
  544. }
  545.  
  546. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  547. {
  548. if(success)
  549. {
  550. return 1;
  551. }
  552. //================================================================//
  553. if(strcmp(cmdtext,"/jetpack",true) == 0)
  554. {
  555. if(PlayerInfo[playerid][pAdmin] >= 1 )
  556. {
  557. new Float:X,Float:Y,Float:Z;
  558. GetPlayerPos(playerid,X,Y,Z);
  559. SetPlayerPos(playerid, X, Y, Z);
  560. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
  561. SendClientMessage(playerid, COLOR_GREEN, "SERVER: You have spawned a jetpack!");
  562. }
  563. else
  564. {
  565. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  566. }
  567. return 1;
  568. }
  569. //================================================================//
  570. if(strcmp(cmdtext,"/removejetpack",true) == 0)
  571. {
  572. if(PlayerInfo[playerid][pAdmin] >= 1 )
  573. {
  574. SetPlayerSpecialAction(playerid,0);
  575. SendClientMessage(playerid, COLOR_GREEN, "SERVER: You have just removed your jetpack!");
  576. }
  577. else
  578. {
  579. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  580. }
  581. return 1;
  582. }
  583. return 1;
  584. }
  585. //================================================================//
  586. public OnPlayerText(playerid, text[])
  587. {
  588. new pname[24], str[128];
  589. GetPlayerName(playerid, pname, 24);
  590. format(str, sizeof(str), "%s:%s.", pname, text);
  591. ProxDetector(30.0, playerid, str, -1, -1, -1, -1, COLOR_FADE2);
  592. return 0;
  593. }
  594.  
  595. public OnPlayerDisconnect(playerid, reason)
  596. {
  597. SaveAccountStats(playerid);
  598. vCar[playerid] = -1;
  599. return 1;
  600. }
  601. //================================================================//
  602. function SetPlayerToTeamColor(playerid)
  603. {
  604. if(IsPlayerConnected(playerid))
  605. {
  606. SetPlayerColor(playerid,TEAM_HIT_COLOR);
  607. }
  608. }
  609.  
  610. function OOCOff(color,const string[])
  611. {
  612. foreach (Player,i)
  613. {
  614. if(!gOoc{i})
  615. {
  616. SendClientMessage(i, color, string);
  617. }
  618. }
  619. }
  620.  
  621. function SaveAccountStats(playerid)
  622. {
  623. if(Logged[playerid] == 1)
  624. {
  625. new
  626. INI:File = INI_Open(UserPath(playerid))
  627. ;
  628. INI_SetTag(File,"data");
  629.  
  630. PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
  631. PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
  632.  
  633. INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
  634. INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  635. INI_WriteInt(File,"Sex",PlayerInfo[playerid][pSex]);
  636. INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
  637. INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
  638. INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
  639.  
  640. INI_Close(File);
  641. }
  642. return 1;
  643. }
  644. //================================================================//
  645. function SaveAccounts()
  646. {
  647. for(new i = 0; i < MAX_PLAYERS; i++)
  648. {
  649. if(IsPlayerConnected(i))
  650. {
  651. SaveAccountStats(i);
  652. }
  653. }
  654. }
  655.  
  656. function GameModeExitFunc()
  657. {
  658. GameModeExit();
  659. return 1;
  660. }
  661. //================================================================//
  662. function LoadUser_data(playerid,name[],value[])
  663. {
  664. INI_Int("Password",PlayerInfo[playerid][pPass]);
  665. INI_Int("Cash",PlayerInfo[playerid][pCash]);
  666. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  667. INI_Int("Sex",PlayerInfo[playerid][pSex]);
  668. INI_Int("Age",PlayerInfo[playerid][pAge]);
  669. INI_Float("Pos_x",PlayerInfo[playerid][pPos_x]);
  670. INI_Float("Pos_y",PlayerInfo[playerid][pPos_y]);
  671. INI_Float("Pos_z",PlayerInfo[playerid][pPos_z]);
  672. INI_Int("Skin",PlayerInfo[playerid][pSkin]);
  673. INI_Int("Team",PlayerInfo[playerid][pTeam]);
  674. return 1;
  675. }
  676.  
  677. function MoneyUpdate(playerid)
  678. {
  679. if(GetPlayerCash(playerid) < GetPlayerMoney(playerid))
  680. {
  681. foreach(Player, i)
  682. {
  683. new const old_money = GetPlayerCash(playerid);
  684. ResetPlayerCash(playerid), GivePlayerCash(playerid, old_money);
  685. }
  686. }
  687. return 1;
  688. }
  689. //================================================================//
  690. function ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  691. {
  692. if(IsPlayerConnected(playerid))
  693. {
  694. new Float:posx, Float:posy, Float:posz;
  695. new BigEar[MAX_PLAYERS];
  696. new Float:oldposx, Float:oldposy, Float:oldposz;
  697. new Float:tempposx, Float:tempposy, Float:tempposz;
  698. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  699. for(new i = 0; i < MAX_PLAYERS; i++)
  700. {
  701. if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  702. {
  703. if(!BigEar[i])
  704. {
  705. GetPlayerPos(i, posx, posy, posz);
  706. tempposx = (oldposx -posx);
  707. tempposy = (oldposy -posy);
  708. tempposz = (oldposz -posz);
  709. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  710. {
  711. SendClientMessage(i, col1, string);
  712. }
  713. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  714. {
  715. SendClientMessage(i, col2, string);
  716. }
  717. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  718. {
  719. SendClientMessage(i, col3, string);
  720. }
  721. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  722. {
  723. SendClientMessage(i, col4, string);
  724. }
  725. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  726. {
  727. SendClientMessage(i, col5, string);
  728. }
  729. }
  730. else
  731. {
  732. SendClientMessage(i, col1, string);
  733. }
  734. }
  735. }
  736. }
  737. return 1;
  738. }
  739.  
  740. // ============ STOCKS ============
  741. stock SendAdminMessage( color, string[] )
  742. {
  743. foreach (Player,i)
  744. {
  745. if( PlayerInfo[ i] [ pAdmin ] > 1 )
  746. {
  747. SendClientMessage( i, color, string );
  748. }
  749. }
  750. }
  751.  
  752. stock UserPath(playerid)
  753. {
  754. new string[128],playername[MAX_PLAYER_NAME];
  755. GetPlayerName(playerid,playername,sizeof(playername));
  756. format(string,sizeof(string),PATH,playername);
  757. return string;
  758. }
  759.  
  760. /* Credits to Dracoblue */
  761. stock udb_hash(buf[]) {
  762.  
  763. new length=strlen(buf);
  764. new s1 = 1;
  765. new s2 = 0;
  766. new n;
  767. for (n=0; n<length; n++)
  768. {
  769. s1 = (s1 + buf[n]) % 65521;
  770. s2 = (s2 + s1) % 65521;
  771. }
  772. return (s2 << 16) + s1;
  773. }
  774.  
  775. stock RPName(playerid)
  776. {
  777. new string[24];
  778. GetPlayerName(playerid,string,24);
  779. new str[24];
  780. strmid(str,string,0,strlen(string),24);
  781. for(new i = 0; i < MAX_PLAYER_NAME; i++)
  782. {
  783. if (str[i] == '_') str[i] = ' ';
  784. }
  785. return str;
  786. }
  787. // =================================
  788.  
  789. /* LOGS */
  790.  
  791. function OOCLog(string[])
  792. {
  793. new
  794. entry[ 128 ],
  795. year,
  796. month,
  797. day,
  798. hour,
  799. minute,
  800. second
  801. ;
  802. getdate(year, month, day);
  803. gettime(hour, minute, second);
  804.  
  805. format(entry, sizeof(entry), "%s | (%d-%d-%d) (%d:%d:%d)\n",string, day, month, year, hour, minute, second);
  806. new File:hFile;
  807. hFile = fopen("Basic/logs/OOCLog.log", io_append);
  808. fwrite(hFile, entry);
  809. fclose(hFile);
  810. }
  811.  
  812. //===========================================///* COMMANDS *///===========================================//
  813.  
  814. CMD:stats(playerid, params[])
  815. {
  816. if(IsPlayerConnected(playerid))
  817. {
  818. new
  819. string[ 128 ],
  820. Age = PlayerInfo[ playerid ][ pAge ],
  821. Money = GetPlayerCash( playerid )
  822. ;
  823.  
  824. new Sex[20];
  825. if(PlayerInfo[ playerid ][ pSex ] == 1) { Sex = "Male"; }
  826. else if(PlayerInfo[ playerid ][ pSex ] == 2) { Sex = "Female"; }
  827.  
  828. SendClientMessage(playerid, COLOR_LIGHTBLUE, "------------------------------------------------------------------------");
  829. format(string, sizeof(string), "Name: %s | Money: %d | Age: %d | Sex: %s", RPName(playerid), Money, Age, Sex);
  830. SendClientMessage(playerid, COLOR_GRAD2, string);
  831. }
  832. return 1;
  833. }
  834. //===========================================//
  835. CMD:veh(playerid, params[]) {
  836.  
  837. new vehid;
  838. if(PlayerInfo[playerid][pAdmin] == 6 )
  839. if(sscanf(params, "i", vehid)) SendClientMessage(playerid, COLOR_RED, "SYNTAX: /veh <carid>");
  840. else if (vehid < 400 || vehid > 611) SendClientMessage(playerid, COLOR_RED, "[ERROR] Invalid car id! [ Car ID's range from 400 - 611 ]");
  841. else
  842. {
  843. if(vCar[playerid] != -1)
  844. {
  845. DestroyVehicle(vCar[playerid]);
  846. }
  847. new Float:x, Float:y, Float:z;
  848. GetPlayerPos(playerid, x, y, z);
  849. vCar[playerid] = CreateVehicle(vehid, x, y + 7, z, 0, 0,0, -1);
  850. SendClientMessage(playerid, COLOR_GREEN, "SERVER: Car spawned at your location!");
  851. }
  852. else
  853. {
  854. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 6 administrator to use this command!");
  855. }
  856. return 1;
  857. }
  858. #endif
  859. //===========================================//
  860. CMD:ahelp(playerid, params[])
  861. {
  862. if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1,"You are not admin!");
  863. SendClientMessage(playerid, -1, "____________________________________________________________________");
  864. if(PlayerInfo[playerid][pAdmin] >= 1)
  865. {
  866. SendClientMessage(playerid, COLOR_FADE, "Level 1: No commands yet!");
  867. }
  868. if(PlayerInfo[playerid][pAdmin] >= 2)
  869. {
  870. SendClientMessage(playerid, COLOR_FADE, "Level 2: No commands yet!");
  871. }
  872. if(PlayerInfo[playerid][pAdmin] >= 3)
  873. {
  874. SendClientMessage(playerid, COLOR_FADE, "Level 3: No commands yet!");
  875. }
  876. if(PlayerInfo[playerid][pAdmin] >= 4)
  877. {
  878. SendClientMessage(playerid, COLOR_FADE, "Level 4: No commands yet!");
  879. }
  880. if(PlayerInfo[playerid][pAdmin] >= 5)
  881. {
  882. SendClientMessage(playerid, COLOR_FADE, "Level 5: No commands yet!");
  883. }
  884. if(PlayerInfo[playerid][pAdmin] >= 6)
  885. {
  886. SendClientMessage(playerid, COLOR_FADE, "Level 6: No commands yet!");
  887. }
  888. if(PlayerInfo[playerid][pAdmin] >= 1337)
  889. {
  890. SendClientMessage(playerid, COLOR_FADE, "Level 1337: /givemoney -");
  891. }
  892. SendClientMessage(playerid, -1, "____________________________________________________________________");
  893. return 1;
  894. }
  895. //===========================================//
  896. CMD:help(playerid, params[])
  897. {
  898. SendClientMessage(playerid, COLOR_LIGHTBLUE,"------------------------------------------------------------");
  899. SendClientMessage(playerid, COLOR_GRAD2,"/do - /me");
  900. SendClientMessage(playerid, COLOR_LIGHTBLUE,"------------------------------------------------------------");
  901. return 1;
  902. }
  903. //===========================================//
  904. ALTCOMMAND:o->ooc;
  905. CMD:ooc(playerid, params[])
  906. {
  907. if(PlayerInfo[playerid][pAdmin] >= 1 )
  908. {
  909. new
  910. string[ 186 ]
  911. ;
  912. if((noooc) && PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD2, "OOC Chat closed by administrator!");
  913. if(isnull(params)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF}(/o)oc [ooc chat]");
  914.  
  915. format(string, sizeof(string), "(( OOC: %s: %s ))", RPName(playerid), params);
  916. OOCOff(0xCCFFFF00, string);
  917. OOCLog(string);
  918. printf("%s", string);
  919. }
  920. else
  921. {
  922. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  923. }
  924. return 1;
  925. }
  926. //===========================================//
  927. CMD:b(playerid, params[])
  928. {
  929. if(PlayerInfo[playerid][pAdmin] >= 1 )
  930. {
  931. new
  932. string[ 128 ]
  933. ;
  934. if(isnull(params)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF} /b [ooc chat]");
  935. format(string, sizeof(string), "(( OOC: %s[%i]: %s ))", RPName( playerid ), playerid, params);
  936. printf("%s", string);
  937. ProxDetector(30.0, playerid, string, COLOR_FADE,COLOR_FADE,COLOR_FADE,COLOR_FADE,COLOR_FADE);
  938. }
  939. else
  940. {
  941. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  942. }
  943. return 1;
  944. }
  945. //===========================================//
  946. CMD:do(playerid, params[])
  947. {
  948. new
  949. result[ 128 ],
  950. string[ 128 ]
  951. ;
  952. if(sscanf(params, "s[128]", result)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF}/do [action]");
  953. format(string, sizeof(string), "* %s (( %s ))", result, RPName(playerid));
  954. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  955. printf("%s", string);
  956. return 1;
  957. }
  958. //===========================================//
  959. CMD:me(playerid, params[])
  960. {
  961. new
  962. result[ 128 ],
  963. string[ 128 ]
  964. ;
  965. if(sscanf(params, "s[128]", result)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF}/do [action]");
  966. format(string, sizeof(string), "* %s %s", RPName(playerid), result);
  967. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  968. printf("%s", string);
  969. return 1;
  970. }
  971. //===========================================//
  972. CMD:killme(playerid, params[])
  973. {
  974. if(PlayerInfo[playerid][pAdmin] >= 1)
  975. {
  976. SetPlayerHealth(playerid, 0);
  977. SendClientMessage(playerid, COLOR_RED, "SERVER: You are dead!");
  978. }
  979. else
  980. {
  981. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  982. }
  983. return 1;
  984. }
  985. //===========================================//
  986. CMD:weapon(playerid,params[])
  987. {
  988. if(PlayerInfo[playerid][pAdmin] >= 1)
  989. {
  990. SendClientMessage(playerid, COLOR_GREEN, "SERVER: You have listed weapon list for administrators!");
  991. ShowPlayerDialog(playerid, 5, DIALOG_STYLE_TABLIST, "Weapons",
  992. "Deagle\t0$\t999 Ammo - [ADMIN SHOP]\n\
  993. M4\t0$\t999 Ammo - [ADMIN SHOP]\n\
  994. MP5\t0$\t999 Ammo - [ADMIN SHOP]\n\
  995. Sniper\t0$\t999 Ammo - [ADMIN SHOP]\n\
  996. Rocket\t0$\t999 Ammo - [ADMIN SHOP]\n\
  997. TEC-9\t0$\t999 Ammo - [ADMIN SHOP]\n\
  998. Minigun\t0$\t999 Ammo - [ADMIN SHOP]\n\
  999. FlameThrower\t0$\t999 Ammo - [ADMIN SHOP]\n\
  1000. Spray\t0$\t999 Ammo - [ADMIN SHOP]\n\
  1001. Chainsaw\t0$\t999 Ammo - [ADMIN SHOP]\n\
  1002. CombatShotgun\t0$\t999 Ammo - [ADMIN SHOP]\n\
  1003. Sawnoff\t0$\t999 Ammo - [ADMIN SHOP]\n\
  1004. AK-47\t0$\t999 Ammo - [ADMIN SHOP]",
  1005. "Select", "Close");
  1006. }
  1007. else
  1008. {
  1009. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  1010. }
  1011. }
  1012. //===========================================//
  1013. CMD:ateleport(playerid,params[])
  1014. {
  1015. if(PlayerInfo[playerid][pAdmin] >= 1 )
  1016. {
  1017. ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Admin Teleport Locations", "Bank Los Santos\nChilliad\nLos Santos Police Departament\nGun Shop\nSpawn Civil\nAirport Los Santos\nCNN Los Santos\nBeach\nDealerShip\nDillimore\nAirport Las Venturas\nCNN Las Venturas", "Select", "Close");
  1018. }
  1019. else
  1020. {
  1021. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  1022. }
  1023. }
  1024. //===========================================//
  1025. CMD:fly(playerid, params[])
  1026. {
  1027. if(PlayerInfo[playerid][pAdmin] >= 1)
  1028. {
  1029. StartFly(playerid);
  1030. SendClientMessage(playerid, COLOR_GREEN, "SERVER: Flying system ON!");
  1031. SetPlayerHealth(playerid, 9999999999999999999999999999999999.0);
  1032. SetPlayerArmour(playerid, 9999999999999999999999999999999999.0);
  1033. GameTextForPlayer(playerid, "~b~Flying ~r~ System ON!", 3000, 3); //TEXT INFORMATIV MAI SCURT
  1034. }
  1035. else
  1036. {
  1037. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  1038. }
  1039. return 1;
  1040. }
  1041.  
  1042. CMD:stopfly(playerid, params[])
  1043. {
  1044. if(PlayerInfo[playerid][pAdmin] >= 1)
  1045. {
  1046. StopFly(playerid);
  1047. SendClientMessage(playerid, COLOR_GREEN, "SERVER: Flying system OFF!");
  1048. SetPlayerHealth(playerid, 100.0);
  1049. SetPlayerArmour(playerid, 0);
  1050. GameTextForPlayer(playerid, "~b~Flying ~r~ System OFF!", 3000, 3); //TEXT INFORMATIV MAI SCURT
  1051. }
  1052. else
  1053. {
  1054. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  1055. }
  1056. return 1;
  1057. }
  1058. //===========================================//
  1059. CMD:tune(playerid, params[])
  1060. {
  1061. if(IsPlayerInAnyVehicle(playerid))
  1062. if(PlayerInfo[playerid][pAdmin] >= 1)
  1063. {
  1064. AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
  1065. AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
  1066. SendClientMessage(playerid, COLOR_GREEN, "SERVER: Car TUNED!");
  1067. GameTextForPlayer(playerid, "~r~ Car TUNNED!", 3000, 3);
  1068. }
  1069. else
  1070. {
  1071. if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "SERVER: You're not in a vehicle.");
  1072. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  1073. }
  1074. return 1;
  1075. }
  1076.  
  1077. CMD:rtune(playerid, params[])
  1078. {
  1079. if(IsPlayerInAnyVehicle(playerid))
  1080. if(PlayerInfo[playerid][pAdmin] >= 1)
  1081. {
  1082. RemoveVehicleComponent(GetPlayerVehicleID(playerid),1010);
  1083. RemoveVehicleComponent(GetPlayerVehicleID(playerid),1080);
  1084. SendClientMessage(playerid, COLOR_GREEN, "SERVER: Car tunning removed!");
  1085. GameTextForPlayer(playerid, "~r~ Car tunning removed!", 3000, 3);
  1086. }
  1087. else
  1088. {
  1089. if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, COLOR_RED, "SERVER: You're not in a vehicle.");
  1090. SendClientMessage(playerid, COLOR_RED, "SERVER: You must be a level 1+ administrator to use this command!");
  1091. }
  1092. return 1;
  1093. }
  1094. //===========================================//
Advertisement
Add Comment
Please, Sign In to add comment