Guest User

main roleplay, pls help

a guest
Sep 16th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.68 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <YSI\y_ini.inc>
  7. #include <ZCMD>
  8. #include <sscanf2>
  9.  
  10. #define DIALOG_REGISTER 1
  11. #define DIALOG_LOGIN 2
  12. #define DIALOG_SUCCESS_1 3
  13. #define DIALOG_SUCCESS_2 4
  14. #define SERVER_NAME "Main Roleplay"
  15.  
  16. #define COL_WHITE "{FFFFFF}"
  17. #define COL_RED "{F81414}"
  18. #define COL_GREEN "{00FF22}"
  19. #define COL_LIGHTBLUE "{00CED1}"
  20. #define COLOR_PURPLE 0xC2A2DAAA
  21. #define COLOR_ORANGE "{FFA500}"
  22.  
  23. #define PATH "conturi/%s.ini"
  24.  
  25. enum pInfo
  26. {
  27. pPass,
  28. pCash,
  29. pAdmin,
  30. pTester,
  31. pFaction,
  32. pLeader,
  33. pDeveloper,
  34. pKills,
  35. pDeaths,
  36. DT,
  37. DTT
  38. }
  39. enum fInfo
  40. {
  41. fLeader,
  42. fRank,
  43. fCar,
  44. fRanks,
  45. fRankName,
  46. fGov
  47. }
  48. enum aInfo
  49. {
  50. aDuty,
  51. aLevel
  52. }
  53. new PlayerInfo[MAX_PLAYERS][pInfo];
  54. new FactionInfo[MAX_PLAYERS][fInfo];
  55. new AdminInfo[MAX_PLAYERS][aInfo];
  56. new levels,Nam[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],str[128],ID;
  57.  
  58. forward dttimer(playerid);
  59. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  60. forward OnPlayerHealthChange(playerid, Float:newhealth, Float:oldhealth);
  61. forward SendAdminMessage(playerid, message[]);
  62.  
  63. new PlayerText:gMyPlayerText[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
  64. new Text:spawntextdraw;
  65.  
  66. main()
  67. {
  68. print("\n----------------------------------");
  69. print(" MAIN ROLEPLAY NETWORK 0.1 [BETA] ");
  70. print("----------------------------------\n");
  71. }
  72.  
  73. public OnGameModeInit()
  74. {
  75. // Don't use these lines if it's a filterscript
  76. SetGameModeText("Main-RP 0.1[BETA]");
  77. spawntextdraw = TextDrawCreate(10.0, 240.0, "[BETA] Trebuie sa apesi pe 'Spawn' sa te spawnezi!");
  78. TextDrawFont(spawntextdraw, 2);
  79. TextDrawColor(spawntextdraw, 0xFFFFFFFF);
  80. return 1;
  81. }
  82.  
  83. public OnGameModeExit()
  84. {
  85. return 1;
  86. }
  87.  
  88. public OnPlayerRequestClass(playerid, classid)
  89. {
  90. SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  91. return 1;
  92. }
  93.  
  94. public OnPlayerConnect(playerid)
  95. {
  96. if(fexist(UserPath(playerid)))
  97. {
  98. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  99. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Bine ai revenit!",""COL_WHITE"Contul acesta este deja inregistrat.\nIntrodu-ti parola in caseta de mai jos.","LOGARE","IESI");
  100. }
  101. else
  102. {
  103. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Bine ai venit!",""COL_WHITE"Bine ai venit pe "SERVER_NAME". Contul acesta nu este inregistrat.\nIntrodu-ti parola in caseta de mai jos pentru a te inregistra.","CREEAZA","IESI");
  104. }
  105. return 1;
  106. }
  107.  
  108. public OnPlayerDisconnect(playerid, reason)
  109. {
  110. new INI:File = INI_Open(UserPath(playerid));
  111. INI_SetTag(File,"data");
  112. INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  113. INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  114. INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  115. INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  116. INI_WriteInt(File,"Tester",PlayerInfo[playerid][pTester]);
  117. INI_WriteInt(File,"Developer",PlayerInfo[playerid][pDeveloper]);
  118. INI_WriteInt(File,"Factiune",PlayerInfo[playerid][pFaction]);
  119. INI_WriteInt(File,"Lider",PlayerInfo[playerid][fLeader]);
  120. INI_WriteInt(File,"Rank",PlayerInfo[playerid][fRank]);
  121. INI_Close(File);
  122. /*if(pInfo[playerid][DT] = 1)
  123. {
  124. new playerName[MAX_PLAYER_NAME];
  125. new szString[64];
  126. GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
  127. BanExWithMessage(playerid, 0xFF0000FF, "Ai fost banat 3 zile pentru /q in DT.", "/q in DT");
  128. format(szString, sizeof szString, "%s a iesit de pe server [/q in DT detectat].", playerName);
  129. ProxDetector(50.0, playerid, string[], COL_WHITE,COL_WHITE,COL_WHITE,COL_WHITE,COL_WHITE);
  130. format(szString, sizeof szString, "%s a fost banat pentru 3 zile de catre SERVER. Motiv: /q in DT.", playerName);
  131. SendClientMessageToAll(0xFF0000, sZstring);
  132. }*/
  133. return 1;
  134. }
  135.  
  136. public OnPlayerSpawn(playerid)
  137. {
  138. TextDrawHideForPlayer(playerid, spawntextdraw);
  139. return 1;
  140. }
  141.  
  142. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  143. {
  144. if(!success) SendClientMessage(playerid, COLOR_PURPLE, ""SERVER_NAME": {FFFFFF}Comanda necunoscuta. Foloseste [/help] pentru comenzi.");
  145. return 1;
  146. }
  147.  
  148. public OnPlayerDeath(playerid, killerid, reason)
  149. {
  150. return 1;
  151. }
  152.  
  153. public OnVehicleSpawn(vehicleid)
  154. {
  155. return 1;
  156. }
  157.  
  158. public OnVehicleDeath(vehicleid, killerid)
  159. {
  160. return 1;
  161. }
  162.  
  163. public OnPlayerText(playerid, text[])
  164. {
  165. new string[128];
  166. if(strfind(text, "?", true) != -1)
  167. {
  168. new msg[128];
  169. format(msg, sizeof(msg), "%s intreaba: %s");
  170. ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  171. }
  172. if(strfind(text, "!", true) != -1)
  173. {
  174. new msg[128];
  175. format(msg, sizeof(msg), "%s striga: %s");
  176. ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  177. }
  178. new msg[128];
  179. format(msg, sizeof(msg), "%s: %s");
  180. ProxDetector(50.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  181. return 1;
  182. }
  183.  
  184. CMD:acceptdeath(playerid, params[]) {
  185. if(PlayerInfo[playerid][DT] != 1)
  186. return SendClientMessage(playerid, 0xfffffff, "Nu esti in deathtimer!");
  187. if(PlayerInfo[playerid][DTT] != 1) return SendClientMessage(playerid, 0xfffffff, "Nu au trecut 120 secunde!");
  188. SetPlayerPos(playerid,317.2694,54.9657,3.3750);
  189. SendClientMessage(playerid, 0xfffffff, "Un medic care nu era la datorie te-a gasit si te-a dus la el acasa.");
  190. SendClientMessage(playerid, 0xfffffff, "Acolo ti-a oferit primul ajutor iar acum te simti bine!");
  191. TogglePlayerControllable(playerid, 1);
  192. PlayerInfo[playerid][DT] = 0;
  193. return 1;
  194. }
  195.  
  196.  
  197. CMD:setadmin(playerid, params[])
  198. {
  199. new string1[250];
  200. if(PlayerInfo[playerid][pAdmin] = 6)return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administring1ator, nu poti folosi comanda. Simplu.");
  201. if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "FOLOSESTE: /setadmin [Nume sau ID] [Nivel(1-6)]");//it will show this if you dont use the format properly
  202. if(levels > 4) return SendClientMessage(playerid,0xFF0000FF,"POTI DA UN NIVEL DE LA 1 LA 6!");//Available levels
  203. if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF00000,"Utilizatorul selectat nu este inregistring1at.");//Detect if the id/partofname is connected
  204. if(PlayerInfo[ID][pAdmin] == levels) return SendClientMessage(playerid,0xFF0000FF, "EROARE: Persoana selectata are deja acest nivel!");//Detect if the guy is already the level you setted
  205. GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//define the playerid name
  206. GetPlayerName(ID,pname,MAX_PLAYER_NAME);//define the other person name
  207. if(levels == 0)
  208. {
  209. format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator la {FFFFFF}%d{FF0000}.",Nam,levels);
  210. SendClientMessage(ID,0xFF9900AA,string1);
  211. format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d!",pname,levels);
  212. SendClientMessage(playerid,0xFF9900AA,string1);
  213. PlayerInfo[ID][pAdmin] = levels;//this sets the player level
  214. return 1;
  215. }
  216. format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator {FFFFFF}%d{FF0000}!",Nam,levels);
  217. SendClientMessage(ID,0xFF9900AA,string1);
  218. format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d{FF0000}!",pname,levels);
  219. SendClientMessage(playerid,0xFF9900AA,string1);
  220. PlayerInfo[ID][pAdmin] = levels;
  221. return 1;
  222. }
  223.  
  224. CMD:aduty(playerid,params[])
  225. {
  226. if(PlayerInfo[playerid][pAdmin] >= 1)
  227. {
  228. if(PlayerInfo[playerid][aDuty] = 0)
  229. {
  230. new playerName[MAX_PLAYER_NAME];
  231. new szString[68];
  232. SetPlayerColor(playerid, 0xFFA500);
  233. GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
  234. format(szString, sizeof szString, "[ADMIN] %s este acum la datorie!", playerName);
  235. SendAdminMessage(playerid, szString);
  236. PlayerInfo[playerid][aDuty] = 1;
  237. }
  238. else if(PlayerInfo[playerid][aDuty] = 1)
  239. {
  240. new playerName[MAX_PLAYER_NAME];
  241. new szString[68];
  242. SetPlayerColor(playerid, 0xFFFFFFF);
  243. GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
  244. format(szString, sizeof szString, "[ADMIN] %s nu mai este la datorie.", playerName);
  245. SendAdminMessage(playerid, szString);
  246. PlayerInfo[playerid][aDuty] = 0;
  247. }
  248. }
  249. else
  250. {
  251. SendClientMessage(playerid, 0xFFFFFFF, "Nu esti administrator.");
  252. }
  253. return 1;
  254. }
  255.  
  256. /* Comenzi in lucru
  257. CMD:developer(playerid,params[])
  258. {
  259. if
  260. CMD:sethp(playerid, params[])
  261. {
  262. new id, string[128], Float:Health;
  263. new Float:Health;
  264. if(sscanf(params,"ui",ID,Float:health)) return SendClientMessage(playerid, 0xFF9900AA, "FOLOSESTE: /setadmin [Nume sau ID] [HP]");
  265. if(Float:health < 0 || Float:health > 120) return SendClientMessage(playerid, 0xFF9900AA, "Viata trebuie sa fie intre 0 si 120.");
  266. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF9900AA, "Utilizatorul selectat nu este conectat.");
  267. GetPlayerName(ID,pname,MAX_PLAYER_NAME); // targetid
  268. GetPlayerName(playerid,Nam, MAX_PLAYER_NAME); // playerid
  269. format(str, sizeof(str), "{FFFFFF}%s {FF0000}ti-a setat viata la {FFFFFF}%d.",Nam,Float:health);
  270. SendClientMessage(ID, -1);
  271. format(str, sizeof(str), "{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}viata la {FFFFFF}%d{FF0000}.",pname,Float:health);
  272. SendClientMessage(playerid, -1,str);
  273.  
  274. SetPlayerHealth(ID, Float:health);
  275. return 1;
  276. }*/
  277.  
  278. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  279. {
  280. return 1;
  281. }
  282.  
  283. public OnPlayerExitVehicle(playerid, vehicleid)
  284. {
  285. return 1;
  286. }
  287.  
  288. public OnPlayerStateChange(playerid, newstate, oldstate)
  289. {
  290. return 1;
  291. }
  292.  
  293. public OnPlayerEnterCheckpoint(playerid)
  294. {
  295. return 1;
  296. }
  297.  
  298. public OnPlayerLeaveCheckpoint(playerid)
  299. {
  300. return 1;
  301. }
  302.  
  303. public OnPlayerEnterRaceCheckpoint(playerid)
  304. {
  305. return 1;
  306. }
  307.  
  308. public OnPlayerLeaveRaceCheckpoint(playerid)
  309. {
  310. return 1;
  311. }
  312.  
  313. public OnRconCommand(cmd[])
  314. {
  315. return 1;
  316. }
  317.  
  318. public OnPlayerHealthChange(playerid, Float:newhealth, Float:oldhealth)
  319. {
  320. if(newhealth > 20)
  321. {
  322. TogglePlayerControllable(playerid,0);
  323. new Text3D:label = Create3DTextLabel("(( JUCATORUL ESTE RANIT. IN-CHARACTER ESTE PE JOS. ))", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
  324. Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
  325. SendClientMessage(playerid, 0xff00000, "Ai intrat in DEATH-TIMER! Peste 120 secunde vei putea folosii /deathtimer.");
  326. SetTimerEx("dttimer", 120000, false, "i", playerid);
  327. PlayerInfo[playerid][DT] = 1;
  328. PlayerInfo[playerid][DTT] = 1;
  329. }
  330. return 1;
  331. }
  332.  
  333. public dttimer(playerid)
  334. {
  335. SendClientMessage(playerid, 0xff00000, "Au trecut 120 secunde. Acum poti da /acceptdeath.");
  336. PlayerInfo[playerid][DTT] = 0;
  337. }
  338.  
  339. public OnPlayerRequestSpawn(playerid)
  340. {
  341. return 1;
  342. }
  343.  
  344. public OnObjectMoved(objectid)
  345. {
  346. return 1;
  347. }
  348.  
  349. public OnPlayerObjectMoved(playerid, objectid)
  350. {
  351. return 1;
  352. }
  353.  
  354. public OnPlayerPickUpPickup(playerid, pickupid)
  355. {
  356. return 1;
  357. }
  358.  
  359. public OnVehicleMod(playerid, vehicleid, componentid)
  360. {
  361. return 1;
  362. }
  363.  
  364. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  365. {
  366. return 1;
  367. }
  368.  
  369. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  370. {
  371. return 1;
  372. }
  373.  
  374. public OnPlayerSelectedMenuRow(playerid, row)
  375. {
  376. return 1;
  377. }
  378.  
  379. public OnPlayerExitedMenu(playerid)
  380. {
  381. return 1;
  382. }
  383.  
  384. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  385. {
  386. return 1;
  387. }
  388.  
  389. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  390. {
  391. return 1;
  392. }
  393.  
  394. public OnRconLoginAttempt(ip[], password[], success)
  395. {
  396. return 1;
  397. }
  398.  
  399. public OnPlayerUpdate(playerid)
  400. {
  401. return 1;
  402. }
  403.  
  404. public OnPlayerStreamIn(playerid, forplayerid)
  405. {
  406. return 1;
  407. }
  408.  
  409. public OnPlayerStreamOut(playerid, forplayerid)
  410. {
  411. return 1;
  412. }
  413.  
  414. public OnVehicleStreamIn(vehicleid, forplayerid)
  415. {
  416. return 1;
  417. }
  418.  
  419. public OnVehicleStreamOut(vehicleid, forplayerid)
  420. {
  421. return 1;
  422. }
  423.  
  424. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  425. {
  426. switch( dialogid )
  427. {
  428. case DIALOG_REGISTER:
  429. {
  430. if (!response) return Kick(playerid);
  431. if(response)
  432. {
  433. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF0000}EROARE","{FF0000}Nu ai introdus o parola"COL_WHITE".\n"COL_WHITE"Introdu-ti parola mai jos pentru a te inregistra.","Register","Quit");
  434. new INI:File = INI_Open(UserPath(playerid));
  435. INI_SetTag(File,"data");
  436. INI_WriteInt(File,"Password",udb_hash(inputtext));
  437. INI_WriteInt(File,"Cash",0);
  438. INI_WriteInt(File,"Admin",0);
  439. INI_WriteInt(File,"Kills",0);
  440. INI_WriteInt(File,"Deaths",0);
  441. INI_WriteInt(File,"Tester",0);
  442. INI_WriteInt(File,"Developer",0);
  443. INI_WriteInt(File,"Factiune",0);
  444. INI_WriteInt(File,"Lider",0);
  445. INI_Close(File);
  446.  
  447. SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  448. SpawnPlayer(playerid);
  449. TextDrawShowForPlayer(playerid, spawntextdraw);
  450. }
  451. }
  452.  
  453. case DIALOG_LOGIN:
  454. {
  455. if ( !response ) return Kick ( playerid );
  456. if( response )
  457. {
  458. if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  459. {
  460. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  461. GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  462. SpawnPlayer(playerid);
  463. TextDrawShowForPlayer(playerid, spawntextdraw);
  464.  
  465. }
  466. else
  467. {
  468. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"{FF0000}EROARE","{FF0000}Parola incorecta.\n"COL_WHITE"Te rog introdu-ti parola in casuta de mai jos.","LOGHEAZA","IESI");
  469. }
  470. return 1;
  471. }
  472. }
  473. }
  474. return 1;
  475. }
  476.  
  477. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  478. {
  479. return 1;
  480. }
  481.  
  482. stock UserPath(playerid)
  483. {
  484. new string[128],playername[MAX_PLAYER_NAME];
  485. GetPlayerName(playerid,playername,sizeof(playername));
  486. format(string,sizeof(string),PATH,playername);
  487. return string;
  488. }
  489.  
  490. /*Credits to Dracoblue*/
  491. stock udb_hash(buf[]) {
  492. new length=strlen(buf);
  493. new s1 = 1;
  494. new s2 = 0;
  495. new n;
  496. for (n=0; n<length; n++)
  497. {
  498. s1 = (s1 + buf[n]) % 65521;
  499. s2 = (s2 + s1) % 65521;
  500. }
  501. return (s2 << 16) + s1;
  502. }
  503.  
  504. forward LoadUser_data(playerid,name[],value[]);
  505. public LoadUser_data(playerid,name[],value[])
  506. {
  507. INI_Int("Password",PlayerInfo[playerid][pPass]);
  508. INI_Int("Cash",PlayerInfo[playerid][pCash]);
  509. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  510. INI_Int("Kills",PlayerInfo[playerid][pKills]);
  511. INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  512. INI_Int("Tester",PlayerInfo[playerid][pTester]);
  513. INI_Int("Developer",PlayerInfo[playerid][pDeveloper]);
  514. INI_Int("Factiune",PlayerInfo[playerid][pFaction]);
  515. INI_Int("Lider",PlayerInfo[playerid][pLeader]);
  516. INI_Int("Rank",FactionInfo[playerid][fRank]);
  517. return 1;
  518. }
  519.  
  520. public SendAdminMessage(playerid, message[])
  521. {
  522. if(PlayerInfo[playerid][pAdmin] = 1)
  523. {
  524. new szString[68];
  525. SendClientMessage(playerid, 0xFFFFFFF, szString);
  526. }
  527. return 1;
  528. }
  529.  
  530. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  531. {
  532. if(IsPlayerConnected(playerid))
  533. {
  534. new Float:posx, Float:posy, Float:posz;
  535. new Float:oldposx, Float:oldposy, Float:oldposz;
  536. new Float:tempposx, Float:tempposy, Float:tempposz;
  537. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  538. for(new i = 0; i < MAX_PLAYERS; i++)
  539. {
  540. if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  541. {
  542. GetPlayerPos(i, posx, posy, posz);
  543. tempposx = (oldposx -posx);
  544. tempposy = (oldposy -posy);
  545. tempposz = (oldposz -posz);
  546. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  547. {
  548. SendClientMessage(i, col1, string);
  549. }
  550. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  551. {
  552. SendClientMessage(i, col2, string);
  553. }
  554. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  555. {
  556. SendClientMessage(i, col3, string);
  557. }
  558. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  559. {
  560. SendClientMessage(i, col4, string);
  561. }
  562. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  563. {
  564. SendClientMessage(i, col5, string);
  565. }
  566. }
  567. else
  568. {
  569. SendClientMessage(i, col1, string);
  570. }
  571. }
  572. }
  573. return 1;
  574. }
  575.  
  576. forward BanExPublic(playerid, reason[]);
  577.  
  578. public BanExPublic(playerid, reason[])
  579. {
  580. BanEx(playerid, reason);
  581. }
  582. stock BanExWithMessage(playerid, color, message[], reason[])
  583. {
  584. SendClientMessage(playerid, color, message);
  585. SetTimerEx("BanExPublic", 1000, false, "ds", playerid, reason);
  586. }
Advertisement
Add Comment
Please, Sign In to add comment