Advertisement
Guest User

Sadda

a guest
Nov 23rd, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.41 KB | None | 0 0
  1.  
  2. // include
  3.  
  4. #include <a_samp>
  5. #include <sscanf>
  6. #include <double-o-Files>
  7. #define FILTERSCRIPT
  8. #include <zcmd>
  9.  
  10. // kolory
  11.  
  12. #define COLOR_YELLOW 0xFFFF00AA
  13. #define COLOR_WHITE 0xFFFFFFAA
  14. #define COLOR_ADMIN 0xFF0000AA
  15. #define COLOR_RED 0xAA3333AA
  16.  
  17. #define SCM SendClientMessage
  18.  
  19. #pragma unused strtok
  20. #pragma unused ret_memcpy
  21.  
  22. new Vip[MAX_PLAYERS];
  23. new Mute[MAX_PLAYERS];
  24. new UnMutex;
  25. new Warn[MAX_PLAYERS];
  26. new Text:Ann;
  27.  
  28. stock PlayerName(playerid)
  29. {
  30. new name[124];
  31. GetPlayerName(playerid,name,sizeof(name));
  32. return name;
  33. }
  34.  
  35. stock PlayerIP(playerid)
  36. {
  37. new ajpi[16];
  38. GetPlayerIp(playerid, ajpi, sizeof(ajpi));
  39. return ajpi;
  40. }
  41.  
  42. stock SendClientMessageToVip(color, msg[])
  43. {
  44. for(new a;a<GetMaxPlayers();a++)
  45. {
  46. if(IsPlayerConnected(a) && Vip[a])
  47.  
  48. {
  49. SendClientMessage(a,color,msg);
  50. }
  51. }
  52. return 1;
  53. }
  54.  
  55. public OnFilterScriptInit()
  56. {
  57. print("\n--------------------------------------");
  58. print(" System Vipa by Skipper98");
  59. print("--------------------------------------\n");
  60. Ann = TextDrawCreate(319.000000, 326.000000," ");
  61. TextDrawUseBox(Ann, 1);
  62. TextDrawBoxColor(Ann, COLOR_WHITE);
  63. TextDrawTextSize(Ann, 32.000000,378.000000);
  64. TextDrawAlignment(Ann, 2);
  65. TextDrawBackgroundColor(Ann, 0x000000ff);
  66. TextDrawFont(Ann, 2);
  67. TextDrawLetterSize(Ann, 0.399999,1.000000);
  68. TextDrawColor(Ann, 0xffffffff);
  69. TextDrawSetShadow(Ann, 1);
  70. SetTimer("Cosie",500000,1);
  71.  
  72. return 1;
  73. }
  74. public OnFilterScriptExit()
  75. {
  76. DOF_Exit();
  77. return 1;
  78. }
  79. public OnPlayerText(playerid, text[])
  80. {
  81. if(Mute[playerid] == 1)
  82.  
  83.  
  84. {
  85. SendClientMessage(playerid,COLOR_YELLOW,"Nie możesz pisać zostałeś/aś uciszony.");
  86. return 0;
  87.  
  88.  
  89. }
  90. return 1;
  91. }
  92.  
  93. public OnPlayerDisconnect(playerid, reason)
  94. {
  95. Vip[playerid] = 0;
  96. Mute[playerid] = 0;
  97. Warn[playerid] = 0;
  98. return 1;
  99. }
  100.  
  101.  
  102. CMD:cmdvip(playerid,params[])
  103. {
  104. if(!Vip[playerid]) return SendClientMessage(playerid,COLOR_ADMIN,"Nie jesteś vipem !");
  105. new string[1024];
  106. strcat(string,"Komendy dla vipa:\n");
  107. strcat(string,"{FFFF00}/vkick [ID] [Powód] {FFFFFF}- Dajesz graczowi kicka\n");
  108. strcat(string,"{FFFF00}/vmute [ID] [Czas] {FFFFFF}- Uciszasz gracza\n");
  109. strcat(string,"{FFFF00}/vunmute [ID] {FFFFFF}- Odciszasz gracza\n");
  110. strcat(string,"{FFFF00}/vwarn [ID] [Powód] {FFFFFF}- Dajesz ostrzeżenie graczu\n");
  111. strcat(string,"{FFFF00}/vunwarn [ID] {FFFFFF}- Zdejmujesz graczu ostrzeżenie\n");
  112. strcat(string,"{FFFF00}/vgivemoney [ID] [Kasa] {FFFFFF}- Dajesz graczu kase\n");
  113. strcat(string,"{FFFF00}/vheal [ID] {FFFFFF}- Leczysz gracza\n");
  114. strcat(string,"{FFFF00}/varmor [ID] {FFFFFF}- Dajesz graczu pancerz\n");
  115. strcat(string,"{FFFF00}/vsay [Tekst] {FFFFFF}- Piszesz na chacie vip\n");
  116. strcat(string,"{FFFF00}/v [Tekst] {FFFFFF}- Rozmawiasz na chacie vipów\n");
  117. strcat(string,"{FFFF00}/vukryj {FFFFFF}- Robisz się niewidzialny na mapie\n");
  118. strcat(string,"{FFFF00}/vpokaz {FFFFFF}- Robisz się widoczny na mapie\n");
  119. strcat(string,"Koniec komend vipa.\n");
  120. ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"System vipa by skipper",string,"OK","OK");
  121. return 1;
  122. }
  123.  
  124. CMD:viplogin(playerid,cmdtext[])
  125. {
  126. if(isnull(cmdtext)) return SendClientMessage(playerid,COLOR_WHITE,"/vlogin [Hasło]");
  127. if(Vip[playerid] == 1) return SendClientMessage(playerid,COLOR_ADMIN,"Już jesteś zalogowany na vipa.");
  128.  
  129. new tmp[256];
  130. new playername[MAX_PLAYER_NAME];
  131. GetPlayerName(playerid,playername,sizeof(playername));
  132. tmp = DOF_GetString("Vip.ini",playername);
  133. new Log = strval(tmp);
  134.  
  135. if(Log < 1)
  136.  
  137.  
  138. {
  139. SendClientMessage(playerid,COLOR_ADMIN,"Zostajesz wyrzucony z serwera powód: Wkradanie się do konta vipa.");
  140. Kick(playerid);
  141.  
  142.  
  143. }
  144.  
  145. if(DOF_FileExists("Vip.ini"))
  146.  
  147.  
  148. {
  149. if(strcmp(cmdtext,DOF_GetString("Vip.ini","Haslo"),true)==0)
  150.  
  151.  
  152. {
  153. Vip[playerid] = 1;
  154. new string[124];
  155. format(string,sizeof(string),"Witaj %s.\nZalogowałeś się poprawnie jako vip.\nWszystkie Komendy Znajdziesz pod /cmdvip",PlayerName(playerid));
  156. ShowPlayerDialog(playerid,2,0,"Zalogowano !",string,"OK","OK");
  157. new printx[124];
  158. format(printx,sizeof(printx),"%s - Logowanie Vip",PlayerName(playerid));
  159. print(printx);
  160.  
  161.  
  162. }
  163. else
  164.  
  165.  
  166. {
  167. new xx[124];
  168. format(xx,sizeof(xx),"Hasło: %s jest niepoprawne !",cmdtext);
  169. ShowPlayerDialog(playerid,2,0,"Złe Hasło",xx,"OK","OK");
  170.  
  171.  
  172. }
  173.  
  174.  
  175. }
  176. else
  177.  
  178.  
  179. {
  180. DOF_CreateFile("Vip.ini");
  181. DOF_SetString("Vip.ini","Haslo","Haslo");
  182. new c = 1;
  183. DOF_SetInt("Vip.ini",PlayerName(playerid),c);
  184.  
  185.  
  186.  
  187. }
  188. return 1;
  189. }
  190. CMD:viploguj(playerid,params[])
  191. {
  192. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Nie jesteś Head Admin");
  193. new id = strval(params);
  194. if(id < 0 || id > GetMaxPlayers()) return SendClientMessage(playerid,-1,"Wpisz: /viploguj [ID]");
  195. if(!IsPlayerConnected(id)) return SCM(playerid,-1,"Nie ma takiego gracza.");
  196. new string[124];
  197. Vip[id] = 1;
  198.  
  199. DOF_SetString("Vip.ini",PlayerName(id),"1");
  200.  
  201. format(string,sizeof(string),"Head Admin %s (id: %d) Zalogował cię jako Vipa.",PlayerName(playerid),playerid);
  202. SendClientMessage(id,COLOR_YELLOW,string);
  203. format(string,sizeof(string),"Zalogowałeś i dodałeś Gracza %s Do listy Vipów.",PlayerName(id));
  204. SendClientMessage(playerid,COLOR_YELLOW,string);
  205. return 1;
  206. }
  207.  
  208. CMD:viphaslo(playerid,cmdtext[])
  209. {
  210. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Nie jesteś Head Admin");
  211. if(isnull(cmdtext)) return SCM(playerid,-1,"Wpisz: /viphaslo [Hasło] ");
  212. DOF_SetString("Vip.ini","Haslo",cmdtext);
  213. new string[124];
  214. format(string,sizeof(string),"Ustawiłeś hasło Vipa na: %s",cmdtext);
  215. SendClientMessage(playerid,COLOR_ADMIN,string);
  216. return 1;
  217. }
  218. if(strcmp(cmdtext, "/v-visible", true) == 0) {
  219. if (VIP[playerid]){
  220. {
  221. SetPlayerColor(playerid, playerColors[playerid]);
  222. SendClientMessage(playerid, playerColors[playerid],"AS: Stałeś sie widzialny");
  223. format(string, sizeof(string), "Admin %s (id:%d) stal sie widzialny",PlayerName(playerid), playerid);
  224. printf(string);
  225. }
  226. }
  227. return 1;
  228. }
  229.  
  230. if(strcmp(cmdtext, "/v-invisible", true)==0) {
  231. if (VIP[playerid]){
  232. SetPlayerColor(playerid, 0xFFFFFF00);
  233. SendClientMessage(playerid, COLOR_GREEN,"VIP: stałeś się niewidzialny");
  234. format(string, sizeof(string), "VIP %s (id:%d) zrobil sie niewidzialnym",PlayerName(playerid),playerid);
  235. printf(string);
  236. }
  237. return 1;
  238. }
  239. if (strcmp(cmd, "/v-givecash", true)==0 && VIP[playerid]) {
  240. new moneyplayer;
  241. new moneyplus;
  242. tmp = strtok(cmdtext, idx);
  243. if(!strlen(tmp)) {
  244. SendClientMessage(playerid, BIALY, "VS: /v-givecash [ID gracza] [suma]");
  245. } else {
  246. moneyplayer = strval(tmp);
  247. tmp = strtok(cmdtext, idx);
  248. if(!strlen(tmp)) {
  249. SendClientMessage(playerid, CZERWONY, "AS: Zła waluta");
  250. } else {
  251. moneyplus = strval(tmp);
  252. new kasa_gracza = GetPlayerMoney(moneyplayer);
  253. if(moneyplus<=30000 && kasa_gracza <= 50000){
  254. new moneyplayername[MAX_PLAYER_NAME];
  255. GetPlayerName(moneyplayer,moneyplayername,sizeof(moneyplayername));
  256. format(string, sizeof(string), "VIP %s (id:%d) dal %d$ graczowi %s (id: %d)",PlayerName(playerid),playerid, moneyplus, moneyplayername,giveplayerid);
  257. printf(string);
  258. format(string, sizeof(string), "VS: Dałeś %d$ graczowi %s",moneyplus, moneyplayername);
  259. SendClientMessage(playerid, ZIELONY, string);
  260. format(string, sizeof(string), "VIP %s dał ci %d$",PlayerName(playerid),moneyplus);
  261. SendClientMessage(moneyplayer, ZIELONY, string);
  262. GivePlayerMoney(moneyplayer, moneyplus);
  263. }else{
  264. SendClientMessage(playerid, CZERWONY, "Możesz dać po 30000 Max!");
  265. }
  266. }
  267. }
  268. return 1;
  269. }
  270. if(strcmp(cmd, "/v-settime", true)==0 && VIP[playerid]) {
  271. new newtime;
  272. tmp = strtok(cmdtext, idx);
  273. newtime = strval(tmp);
  274.  
  275. if(!newtime) {
  276. SendClientMessage(playerid, BIALY, "VS: /v-settime [godzina]");
  277. }
  278. else if (newtime >24 || newtime <0) {
  279. SendClientMessage(playerid, ZIELONY, "VS: Zła godzina.");
  280. }
  281. else {
  282. format(string, sizeof(string), "VIP %s (id:%d) zmienil czas na %d:00",PlayerName(playerid), playerid,newtime);
  283. printf(string);
  284. format(tmp, sizeof(tmp), "Czas został zmieniony na %d:00 przez VIPa %s", newtime, PlayerName(playerid));
  285. SendClientMessageToAll(ZIELONY,tmp);
  286. SetWorldTime(newtime);
  287. }
  288. return true;
  289. }
  290. if(strcmp(cmd, "/v-tp", true) == 0 && VIP[playerid]) {
  291. tmp = strtok(cmdtext, idx);
  292.  
  293. if(!strlen(tmp)) {
  294. SendClientMessage(playerid, BIALY, "VS: /v-tp [ID 1 gracza] [do ID 2 gracza]");
  295. return 1;
  296. }
  297. giveplayerid = strval(tmp);
  298.  
  299. tmp = strtok(cmdtext, idx);
  300. if(!strlen(tmp)) {
  301. SendClientMessage(playerid, BIALY, "VS: /v-tp [ID 1 gracza] [do ID 2 gracza]");
  302. return 1;
  303. }
  304. teleid = strval(tmp);
  305.  
  306. if (IsPlayerConnected(giveplayerid) && IsPlayerConnected(teleid)) {
  307. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  308. GetPlayerName(playerid, sendername, sizeof(sendername));
  309. GetPlayerName(teleid, telename, sizeof(telename));
  310. GetPlayerPos(teleid, pX,pY,pZ);
  311. new Interior;
  312. Interior = GetPlayerInterior(teleid);
  313. SetPlayerInterior(giveplayerid, Interior);
  314. SetPlayerPos(giveplayerid, pX,pY,pZ);
  315. format(string, sizeof(string), "VIP %s (id:%d) teleportowal %s (id: %d) do %s (id: %d)",PlayerName(playerid),playerid,giveplayer,giveplayerid,telename,teleid);
  316. printf(string);
  317. format(string, sizeof(string), "Teleportowałeś %s do %s", giveplayer,telename);
  318. SendClientMessage(playerid, ZIELONY, string);
  319. format(string, sizeof(string), "Zostałes teleportowany do %s",telename);
  320. SendClientMessage(giveplayerid, ZIELONY, string);
  321. format(string, sizeof(string), "Teleportowano do ciebie gracza: %s",giveplayer);
  322. SendClientMessage(teleid, ZIELONY, string);
  323. }
  324. if (!IsPlayerConnected(giveplayerid)) {
  325. format(string, sizeof(string), "VS: %d nie jest aktywnym graczem.", giveplayerid);
  326. SendClientMessage(playerid, CZERWONY, string);
  327. }
  328. if (!IsPlayerConnected(teleid)) {
  329. format(string, sizeof(string), "VS: %d nie jest aktywnym graczem.", teleid);
  330. SendClientMessage(playerid, CZERWONY, string);
  331. }
  332.  
  333. return 1;
  334. }
  335. else if(strcmp(cmd, "/v-tp-to", true) == 0 && VIP[playerid]) {
  336. tmp = strtok(cmdtext, idx);
  337. if(!strlen(tmp)) {
  338. SendClientMessage(playerid, BIALY, "VS: /v-tp-to [id gracza]");
  339. } else {
  340. if(!IsPlayerConnected(strval(tmp))) {
  341. SendClientMessage(playerid, CZERWONY, "Złe ID gracza");
  342. } else {
  343. new Float:X;
  344. new Float:Y;
  345. new Float:Z;
  346. new Float:Angle;
  347. new Interior = GetPlayerInterior(strval(tmp));
  348. if(IsPlayerInAnyVehicle(playerid)) {
  349. new VehicleID;
  350. VehicleID = GetPlayerVehicleID(playerid);
  351. SetPlayerInterior(playerid, Interior);
  352. GetPlayerPos(strval(tmp),X,Y,Z);
  353. GetPlayerFacingAngle(strval(tmp),Angle);
  354. SetVehiclePos(VehicleID, X + 0.01, Y + 0.01, Z);
  355. SetPlayerFacingAngle(playerid,Angle);
  356. } else {
  357. GetPlayerPos(strval(tmp),X,Y,Z);
  358. SetPlayerInterior(playerid, Interior);
  359. GetPlayerFacingAngle(strval(tmp),Angle);
  360. SetPlayerFacingAngle(playerid,Angle);
  361. SetPlayerPos(playerid, X + 0.01, Y + 0.01, Z);
  362. }
  363. format(tempstr, sizeof(tempstr), "VIP %s teleportowal sie do ciebie",PlayerName(playerid));
  364. SendClientMessage(strval(tmp),ZIELONY, tempstr);
  365. format(tempstr, sizeof(tempstr), "VS: teleportowałeś się do %s Interior:%d",PlayerName(strval(tmp)), Interior);
  366. SendClientMessage(playerid,ZIELONY, tempstr);
  367. format(string, sizeof(string), "VIP %s (id:%d) teleportowal sie do gracza %s (id:%d) Interior:%d",PlayerName(playerid),playerid,GetPlayerNick(strval(tmp)),strval(tmp), Interior);
  368. printf(string);
  369. }
  370. }
  371. return 1;
  372. }if (strcmp(cmd, "/v-acolor", true)==0 && VIP[playerid]) {
  373. new colorplayer;
  374. new colorplayername[MAX_PLAYER_NAME];
  375. tmp = strtok(cmdtext, idx);
  376. if(!strlen(tmp)) {
  377. SendClientMessage(playerid,BIALY, "VS: /v-acolor [ID gracza] [ID koloru]");
  378. } else {
  379. colorplayer = strval(tmp);
  380. }
  381. GetPlayerName(colorplayer,colorplayername,sizeof(colorplayername));
  382. tmp2 = strtok(cmdtext, idx);
  383. new color;
  384. color = strval(tmp2);
  385. if(color == 1){
  386. SetPlayerColor(colorplayer, COLOR_GREY);
  387. } else if(color == 2){
  388. SetPlayerColor(colorplayer, COLOR_LIGHTGREEN);
  389. } else if(color == 3){
  390. SetPlayerColor(colorplayer, COLOR_RED);
  391. } else if(color == 4){
  392. SetPlayerColor(colorplayer, COLOR_YELLOW);
  393. } else if(color == 5){
  394. SetPlayerColor(colorplayer, COLOR_WHITE);
  395. } else if(color == 6){
  396. SetPlayerColor(colorplayer, COLOR_BLUE);
  397. } else if(color == 7){
  398. SetPlayerColor(colorplayer, COLOR_ORANGE);
  399. } else if(color == 8){
  400. SetPlayerColor(colorplayer, COLOR_PINK);
  401. } else if(color == 9){
  402. SetPlayerColor(colorplayer, 0xFFFFFF00);
  403. } else if(color == 10){
  404. SetPlayerColor(colorplayer, COLOR_VIOLET);
  405. } else if(color == 11){
  406. SetPlayerColor(colorplayer, COLOR_BLACK);
  407. } else if(color == 12){
  408. SetPlayerColor(colorplayer, COLOR_BROWN);
  409. } else if(color == 13){
  410. SetPlayerColor(colorplayer, COLOR_LIGHTBLUE);
  411. } else if(color == 14){
  412. SetPlayerColor(colorplayer, COLOR_GREEN);
  413. } else if(color == 15){
  414. SetPlayerColor(colorplayer, COLOR_KREM);
  415. } else if(color == 16){
  416. SetPlayerColor(colorplayer, COLOR_ADMIN);
  417. } else {
  418. SendClientMessage(playerid, COLOR_ADMIN, "Zły ID koloru: ID (od 1 do 16)");
  419. }
  420. format(string, sizeof(string), "VS: Zmieniłeś kolor graczowi %s na: %d",PlayerName(strval(tmp)), color);
  421. SendClientMessage(playerid,ZIELONY,string);
  422. format(string, sizeof(string), "VIP %s zmienil ci kolor na: %d",PlayerName(playerid), color);
  423. SendClientMessage(strval(tmp),ZIELONY,string);
  424. format(string, sizeof(string), "VIP %s (id:%d) zmienil kolor (id:%d) graczowi %s (id:%d)",PlayerName(playerid), playerid, color, GetPlayerNick(strval(tmp)),strval(tmp));
  425. printf(string);
  426. return 1;
  427. }if(strcmp(cmdtext,"/v-repair-all",true)==0) {
  428. if (!VIP[playerid]) {
  429. SendClientMessage(playerid,0xAA3333AA,"Nie jestes VIP");
  430. return 1;
  431. }
  432. for(new i=0; i<MAX_PLAYERS; i++) {
  433. if (IsPlayerConnected(i)) {
  434. SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
  435. }
  436. }
  437. format(string, sizeof(string), "VIP %s (id:%d) naprawił pojazdy wszystkim graczom",PlayerName(playerid),playerid);
  438. printf(string);
  439. format(string, sizeof(string), "VIP %s naprawił pojazdy wszystkim graczom",PlayerName(playerid));
  440. SendClientMessageToAll(ZIELONY,string);
  441. return 1;
  442. }
  443. if(strcmp(cmd, "/v-repair", true) == 0 && VIP[playerid]) {
  444. tmp = strtok(cmdtext, idx);
  445.  
  446. if(!strlen(tmp)) {
  447. SendClientMessage(playerid, BIALY, "VS: /v-repair [id gracza]");
  448. return 1;
  449. }
  450. giveplayerid = strval(tmp);
  451.  
  452. if (IsPlayerConnected(giveplayerid)) {
  453. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  454. GetPlayerName(playerid, sendername, sizeof(sendername));
  455. SetVehicleHealth(GetPlayerVehicleID(giveplayerid), 1000.0);
  456. format(string, sizeof(string), "VIP %s (id:%d) naprawił pojazd graczowi %s (id: %d)",PlayerName(playerid),playerid,giveplayer,giveplayerid);
  457. printf(string);
  458. format(string, sizeof(string), "VS: Naprawiłeś pojazd graczowi %s.", giveplayer,giveplayerid);
  459. SendClientMessage(playerid, ZIELONY, string);
  460. format(string, sizeof(string), "VIP %s (id: %d) naprawił ci pojazd.", PlayerName(playerid),playerid);
  461. SendClientMessage(giveplayerid, ZIELONY, string);
  462. }
  463. else {
  464. format(string, sizeof(string), "VS: %d nie jest aktywnym graczem.", giveplayerid);
  465. SendClientMessage(playerid, CZERWONY, string);
  466. }
  467.  
  468. return 1;
  469. }
  470. if(strcmp(cmdtext, "/v-armor", true)==0)
  471. {
  472. if (!VIP[playerid]) return SendClientMessage(playerid, CZERWONY,"Nie jestes VIPem!");
  473.  
  474. SetPlayerArmour(playerid, 100.0);
  475. format(string, sizeof(string), "VIP %s (id:%d) dostal pancerz",PlayerName(playerid),playerid);
  476. printf(string);
  477. SendClientMessage(playerid, ZIELONY,"VS: Dostałeś pancerz!");
  478. return 1;
  479. }
  480. if(strcmp(cmdtext,"/v-armor-all",true)==0) {
  481. if (!VIP[playerid]) {
  482. SendClientMessage(playerid,CZERWONY,"Nie jestes VIPem!");
  483. return 1;
  484. }
  485. for(new i=0; i<MAX_PLAYERS; i++) {
  486. if (IsPlayerConnected(i)) {
  487. SetPlayerArmour(i,100.0);
  488. }
  489. }
  490. format(string, sizeof(string), "VIP %s (id:%d) dal pancerz wszystkim graczom",PlayerName(playerid),playerid);
  491. printf(string);
  492. format(string, sizeof(string), "VIP %s dal pancerz wszystkim graczom",PlayerName(playerid));
  493. SendClientMessageToAll(ZIELONY,string);
  494. return 1;
  495. }
  496. return 0;
  497. }
  498.  
  499. PlayerName(playerid){
  500. new Name[MAX_PLAYER_NAME];
  501. GetPlayerName(playerid, Name, sizeof(Name));
  502. return Name;
  503. }
  504. GetPlayerNick(playerid){
  505. new Name[MAX_PLAYER_NAME];
  506. GetPlayerName(playerid, Name, sizeof(Name));
  507. return Name;
  508. }
  509. strrest(const string[], index)
  510. {
  511. new length = strlen(string),offset = index,result[256];
  512. while ((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r'))
  513. {
  514. result[index - offset] = string[index];index++;
  515. }
  516. result[index - offset] = EOS;
  517. return result;
  518. }
  519. SendClientMessageToVIP(color, const zmienna[]) {
  520. for(new a=0; a<MAX_PLAYERS; a++) {
  521. if(IsPlayerConnected(a)) {
  522. if(VIP[a] || IsPlayerAdmin(a)) {
  523. SendClientMessage(a, color, zmienna);
  524. }
  525. }
  526. }
  527. }
  528. CMD:vsay(playerid,cmdtext[])
  529. {
  530. if(!Vip[playerid]) return SendClientMessage(playerid,COLOR_ADMIN,"Nie jesteś vipem !");
  531. if(isnull(cmdtext)) return SCM(playerid,-1,"Wpisz: /vsay [Tekst]");
  532. new string[124];
  533. format(string,sizeof(string),"Vip: %s",cmdtext);
  534. SendClientMessageToAll(COLOR_YELLOW,string);
  535. return 1;
  536. }
  537. public OnPlayerText(playerid, text)
  538. {
  539. new var0[256];
  540. if(globC8[playerid])
  541. {
  542. format(var0, 256, "%d (VIP) : %s", playerid, text);
  543. SendPlayerMessageToAll(playerid, var0);
  544. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement