Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dcmd_rac(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/kick(k) [ID gracza] [powód] - \
- wyrzuca wskazanego gracza z serwera");
- SendClientMessage(playerid, COLOR_YELLOW, "/playerinfo(pi) [ID gracza] - \
- wywietla informacje o wskazanym graczu");
- SendClientMessage(playerid, COLOR_YELLOW, "/warn(w) [ID gracza] [powód] - \
- wręcza ostrzeżenie wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/readwarns(rw) [ID gracza] - \
- wywietla ostrzeżenia wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/readpraises(rp) [ID gracza] - \
- wywietla pochwały wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/jail(j) [ID gracza] [Czas] [Opcjonalnie powód] - \
- umieszcza wskazanego gracza w więzieniu");
- SendClientMessage(playerid, COLOR_YELLOW, "/unjail(uj) [ID gracza] - \
- wypuszcza gracza z więzienia");
- SendClientMessage(playerid, COLOR_YELLOW, "/respawncars(rc) - \
- respawnuje nieużywane pojazdy");
- }
- else if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/kick(k) [ID gracza] [powód] - \
- wyrzuca wskazanego gracza z serwera");
- SendClientMessage(playerid, COLOR_YELLOW, "/ban(b) [ID gracza] [powód] - \
- banuje oraz wyrzuca wskazanego gracza z serwera");
- SendClientMessage(playerid, COLOR_YELLOW, "/playerinfo(pi) [ID gracza] - \
- wywietla informacje o wskazanym graczu");
- SendClientMessage(playerid, COLOR_YELLOW, "/warn(w) [ID gracza] [powód] - \
- wręcza ostrzeżenie wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/readwarns(rw) [ID gracza] - \
- wywietla ostrzeżenia wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/readpraises(rp) [ID gracza] - \
- wywietla pochwały wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/jail(j) [ID gracza] [Czas] [Opcjonalnie powód] - \
- umieszcza wskazanego gracza w więzieniu");
- SendClientMessage(playerid, COLOR_YELLOW, "/unjail(uj) [ID gracza] - \
- wypuszcza gracza z więzienia");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/kick(k) [ID gracza] [powód] - \
- wyrzuca wskazanego gracza z serwera");
- SendClientMessage(playerid, COLOR_YELLOW, "/ban(b) [ID gracza] [powód] - \
- banuje oraz wyrzuca wskazanego gracza z serwera");
- SendClientMessage(playerid, COLOR_YELLOW, "/banacc(ba) [Nazwa konta] - \
- blokuje wskazane konto");
- SendClientMessage(playerid, COLOR_YELLOW, "/unbanacc(unba) [Nazwa konta] - \
- odblokowuje wskazane konto");
- SendClientMessage(playerid, COLOR_YELLOW, "/delacc(dac) [Nazwa konta] - \
- kasuje wskazane konto");
- SendClientMessage(playerid, COLOR_YELLOW, "/banip(bip) [Adres IP] - \
- banuje wskazany adres IP");
- SendClientMessage(playerid, COLOR_YELLOW, "/unbanip(unb) [Adres IP] - \
- odbanowuje wskazany adres IP");
- SendClientMessage(playerid, COLOR_YELLOW, "/playerinfo(pi) [ID gracza] - \
- wywietla informacje o wskazanym graczu");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac2 - następna strona");
- return 1;
- }
- dcmd_rac2(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/freeze(f) [ID gracza] - \
- zamraża wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/unfreeze(uf) [ID gracza] - \
- odmraża wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/gunlist(gl) - \
- wywietla listę ID broni");
- SendClientMessage(playerid, COLOR_YELLOW, "/gun(g) [ID broni] [Amunicja] - \
- daje Ci wybranš broń wraz ze wskazanš ilociš amunicji");
- SendClientMessage(playerid, COLOR_YELLOW, "/gunpack(gp) - \
- daje Ci predefiniowany zestaw broni");
- SendClientMessage(playerid, COLOR_YELLOW, "/blockpm(bpm) - \
- wyłšczasz/włšczasz swojš skrzynkę PM");
- SendClientMessage(playerid, COLOR_YELLOW, "/mute(m) [ID gracza] - \
- blokujesz wskazanemu graczowi możliwoć wysyłania wiadomoci");
- SendClientMessage(playerid, COLOR_YELLOW, "/unmute(um) [ID gracza] - \
- komenda o działaniu odwrotnym do powyższej");
- }
- else if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/freeze(f) [ID gracza] - \
- zamraża wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/unfreeze(uf) [ID gracza] - \
- odmraża wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/setgravity(sg) [grawitacja] - \
- ustawia wybrany poziom gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/setweather(sw) [pogoda] - \
- ustawia wybranš pogodę");
- SendClientMessage(playerid, COLOR_YELLOW, "/settime(st) [godzina] - \
- ustawia wybranš godzinę");
- SendClientMessage(playerid, COLOR_YELLOW, "/gunlist(gl) - \
- wywietla listę ID broni");
- SendClientMessage(playerid, COLOR_YELLOW, "/gun(g) [ID broni] [Amunicja] - \
- daje Ci wybranš broń wraz ze wskazanš ilociš amunicji");
- SendClientMessage(playerid, COLOR_YELLOW, "/gunpack(gp) - \
- daje Ci predefiniowany zestaw broni");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/warn(w) [ID gracza] [powód] - \
- wręcza ostrzeżenie wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/readwarns(rw) [ID gracza] - \
- wywietla ostrzeżenia wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/deletewarn(dw) [ID gracza] [ID warna] - \
- kasuje wybrane ostrzeżenie u wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/praise(p) [ID gracza] [powód] - \
- wręcza pochwałę wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/readpraises(rp) [ID gracza] - \
- wywietla pochwały wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/deletepraise(dp) [ID gracza] [ID pochwały] - \
- kasuje wybranš pochwałę u wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/jail(j) [ID gracza] [Czas] [Opcjonalnie powód] - \
- umieszcza wskazanego gracza w więzieniu");
- SendClientMessage(playerid, COLOR_YELLOW, "/unjail(uj) [ID gracza] - \
- wypuszcza gracza z więzienia");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac - poprzednia strona <> /rac3 - następna strona");
- return 1;
- }
- dcmd_rac3(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/spectate(spec) [ID gracza] - \
- obserwujesz wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/spectateoff(specoff) - \
- wyłšcza tryb podglšdu gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/clearchat(cc) - \
- czyci czat");
- SendClientMessage(playerid, COLOR_YELLOW, "/lastlogin [Nazwa konta] - \
- podaje datę ostatniego logowania na wskazanym koncie");
- SendClientMessage(playerid, COLOR_YELLOW, "/hideme [Nowy nick] - \
- zmienia Twój nick, znikasz z listy adminów; /showme - komenda o działaniu odwrotnym");
- SendClientMessage(playerid, COLOR_YELLOW, "/ignore [ID gracza] -\
- ignoruje wskazanego gracza");
- }
- else if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/givegun(gg) [ID gracza] [ID broni] [Amunicja] - \
- daje broń wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/disarm(d) [ID gracza] - \
- rozbraja wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/blockpm(bpm) - \
- wyłšczasz/włšczasz swojš skrzynkę PM");
- SendClientMessage(playerid, COLOR_YELLOW, "/mute(m) [ID gracza] - \
- blokujesz wskazanemu graczowi możliwoć wysyłania wiadomoci");
- SendClientMessage(playerid, COLOR_YELLOW, "/unmute(um) [ID gracza] - \
- komenda o działaniu odwrotnym do powyższej");
- SendClientMessage(playerid, COLOR_YELLOW, "/clearchat(cc) - \
- czyci czat");
- SendClientMessage(playerid, COLOR_YELLOW, "/spectate(spec) [ID gracza] - \
- obserwujesz wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/spectateoff(specoff) - \
- wyłšcza tryb podglšdu gracza");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/freeze(f) [ID gracza] - \
- zamraża wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/unfreeze(uf) [ID gracza] - \
- odmraża wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/setgravity(sg) [grawitacja] - \
- ustawia wybrany poziom gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/setweather(sw) [pogoda] - \
- ustawia wybranš pogodę");
- SendClientMessage(playerid, COLOR_YELLOW, "/settime(st) [godzina] - \
- ustawia wybranš godzinę");
- SendClientMessage(playerid, COLOR_YELLOW, "/gunlist(gl) - \
- wywietla listę ID broni");
- SendClientMessage(playerid, COLOR_YELLOW, "/gun(g) [ID broni] [Amunicja] - \
- daje Ci wybranš broń wraz ze wskazanš ilociš amunicji");
- SendClientMessage(playerid, COLOR_YELLOW, "/gunpack(gp) - \
- daje Ci predefiniowany zestaw broni");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac2 - poprzednia strona <> /rac4 - następna strona");
- return 1;
- }
- dcmd_rac4(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- else if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/announce(ann) [Czas] [Tekst] - \
- wywietla ogłoszenie");
- SendClientMessage(playerid, COLOR_YELLOW, "/lockall(la) - zamyka wszystkie pojazdy; \
- /unlockall(ula) - otwiera wszystkie pojazdy");
- SendClientMessage(playerid, COLOR_YELLOW, "/medic(md) [ID gracza] - \
- ulecza wskazanego gracza; /armor(a) [ID gracza] - daje pancerz wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/repairvehicle(rv) [ID gracza] - \
- naprawia pojazd wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleportto(tpto) [ID gracza] - \
- teleportuje Cię do innego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleporthere(tphere) [ID gracza] - \
- teleportuje innego gracza do Ciebie");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleport(tp) [ID gracza] [ID gracza] - \
- teleportuje gracza do innego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleportloc(tpl) [slot] - \
- teleportuje Cię do zapisanej pozycji zapisanej przy użyciu /setloc(sl) [slot]");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/givegun(gg) [ID gracza] [ID broni] [Amunicja] - \
- daje broń wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/givegunall(gga) [ID broni] [Amunicja] - \
- daje broń wszystkim graczom");
- SendClientMessage(playerid, COLOR_YELLOW, "/disarm(d) [ID gracza] - \
- rozbraja wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/disarmall(da) - \
- rozbraja wszystkich graczy");
- SendClientMessage(playerid, COLOR_YELLOW, "/blockpm(bpm) - \
- wyłšczasz/włšczasz swojš skrzynkę PM");
- SendClientMessage(playerid, COLOR_YELLOW, "/mute(m) [ID gracza] - \
- blokujesz wskazanemu graczowi możliwoć wysyłania wiadomoci");
- SendClientMessage(playerid, COLOR_YELLOW, "/unmute(um) [ID gracza] - \
- komenda o działaniu odwrotnym do powyższej");
- SendClientMessage(playerid, COLOR_YELLOW, "/clearchat(cc) - \
- czyci czat");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac3 - poprzednia strona <> /rac5 - następna strona");
- return 1;
- }
- dcmd_rac5(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- else if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/givecash(gc) [ID gracza] [kwota] - \
- dodaje kwotę do portfela gracza; /givebank(gb) [ID gracza] [kwota] - dodaje kwotę do konta gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/respawncars(rc) - \
- respawnuje nieużywane pojazdy");
- SendClientMessage(playerid, COLOR_YELLOW, "/hideme [Nowy nick] - \
- zmienia Twój nick, znikasz z listy adminów; /showme - komenda o działaniu odwrotnym");
- SendClientMessage(playerid, COLOR_YELLOW, "/pmeye - podglšd PMów");
- SendClientMessage(playerid, COLOR_YELLOW, "/payday - wymusza rozdanie wypłat");
- SendClientMessage(playerid, COLOR_YELLOW, "/slotto - wymusza losowanie; /jackpot [kwota] - zmienia stawkę w loterii");
- SendClientMessage(playerid, COLOR_YELLOW, "/god - włšcza godmode; /givegod [ID gracza] - włšcz godmode wskazanej osobie");
- SendClientMessage(playerid, COLOR_YELLOW, "/vehgod - włšcz godmode pojazdu");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/spectate(spec) [ID gracza] - \
- obserwujesz wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/spectateoff(specoff) - \
- wyłšcza tryb podglšdu gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/announce(ann) [Czas] [Tekst] - \
- wywietla ogłoszenie");
- SendClientMessage(playerid, COLOR_YELLOW, "/lockall(la) - zamyka wszystkie pojazdy; \
- /unlockall(ula) - otwiera wszystkie pojazdy");
- SendClientMessage(playerid, COLOR_YELLOW, "/medic(md) [ID gracza] - \
- ulecza wskazanego gracza; /armor(a) [ID gracza] - daje pancerz wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/medicall(ma) - ulecza wszystkich graczy; \
- /armorall(aa) - daje pancerz wszystkim graczom");
- SendClientMessage(playerid, COLOR_YELLOW, "/repairvehicle(rv) [ID gracza] - \
- naprawia pojazd wskazanego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/repairvehicleall(rva) - \
- naprawia wszystkie pojazdy");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac4 - poprzednia strona <> /rac6 - następna strona");
- return 1;
- }
- dcmd_rac6(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/explode [ID gracza] - wysadza wskazanego gracza w powietrze");
- SendClientMessage(playerid, COLOR_YELLOW, "/eject [ID gracza] - wyrzuca gracza z pojazdu");
- SendClientMessage(playerid, COLOR_YELLOW, "/setskin [ID gracza] [ID skinu] - ustawia graczowi skin");
- SendClientMessage(playerid, COLOR_YELLOW, "/ignore [ID gracza] -\
- ignoruje wskazanego gracza");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/givecash(gc) [ID gracza] [kwota] - \
- dodaje kwotę do portfela gracza; /givebank(gb) [ID gracza] [kwota] - dodaje kwotę do konta gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/givecashall(gca) [kwota] - \
- dodaje kwotę do portfeli graczy; /givebankall(gba) [kwota] - dodaje kwotę do kont graczy");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleportto(tpto) [ID gracza] - \
- teleportuje Cię do innego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleporthere(tphere) [ID gracza] - \
- teleportuje innego gracza do Ciebie");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleport(tp) [ID gracza] [ID gracza] - \
- teleportuje gracza do innego gracza");
- SendClientMessage(playerid, COLOR_YELLOW, "/teleportloc(tpl) [slot] - \
- teleportuje Cię do zapisanej pozycji zapisanej przy użyciu /setloc(sl) [slot]");
- SendClientMessage(playerid, COLOR_YELLOW, "/respawncars(rc) - \
- respawnuje nieużywane pojazdy");
- SendClientMessage(playerid, COLOR_YELLOW, "/hideme [Nowy nick] - \
- zmienia Twój nick, znikasz z listy adminów; /showme - komenda o działaniu odwrotnym");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac5 - poprzednia strona <> /rac7 - następna strona");
- return 1;
- }
- dcmd_rac7(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/lastlogin [Nazwa konta] - \
- podaje datę ostatniego logowania na wskazanym koncie");
- SendClientMessage(playerid, COLOR_YELLOW, "/createinterior [i] [x] [y] [z] [a] [komentarz] - \
- zapisuje interior w spisie");
- SendClientMessage(playerid, COLOR_YELLOW, "/interiorslist - wywietla spis interiorów");
- SendClientMessage(playerid, COLOR_YELLOW, "/createhome [Interior ID] [Cena] - tworzy dom");
- SendClientMessage(playerid, COLOR_YELLOW, "/sethomecarspawn [ID domu] - zmienia spawn pojazdu przed domem");
- SendClientMessage(playerid, COLOR_YELLOW, "/createprop [Typ] [Interior ID] [Cena] [Zysk] [Zysk z wejcia] - \
- tworzy przedsiębiorstwo");
- SendClientMessage(playerid, COLOR_YELLOW, "/getid - wywietla ID domu/przedsiębiorstwa; \
- /reset - resetuje dom/przedsiebiorstwo; /reservation - wykonuje rezerwację");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac6 - poprzednia strona <> /rac8 - następna strona");
- return 1;
- }
- dcmd_rac8(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/payday - wymusza rozdanie wypłat");
- SendClientMessage(playerid, COLOR_YELLOW, "/slotto - wymusza losowanie; /jackpot [kwota] - zmienia stawkę w loterii");
- SendClientMessage(playerid, COLOR_YELLOW, "/god - włšcza godmode; /givegod [ID gracza] - włšcz godmode wskazanej osobie");
- SendClientMessage(playerid, COLOR_YELLOW, "/vehgod - włšcz godmode pojazdu");
- SendClientMessage(playerid, COLOR_YELLOW, "/creategang [ID lidera] [Tag] [Kolor] [Kolor strefy] - tworzy gang");
- SendClientMessage(playerid, COLOR_YELLOW, "/deletegang [Tag] - kasuje gang");
- SendClientMessage(playerid, COLOR_YELLOW, "/setleader [ID gangu] [ID lidera] - \
- przekazuje władzę nad gangiem wskazanemu graczowi");
- SendClientMessage(playerid, COLOR_YELLOW, "/givezone [ID gracza] - \
- przekazuje strefę gangowi; /removezone - resetuje strefę");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac7 - poprzednia strona <> /rac9 - następna strona");
- return 1;
- }
- dcmd_rac9(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/eye - podglšd komend");
- SendClientMessage(playerid, COLOR_YELLOW, "/pmeye - podglšd PMów");
- SendClientMessage(playerid, COLOR_YELLOW, "/explode [ID gracza] - wysadza wskazanego gracza w powietrze");
- SendClientMessage(playerid, COLOR_YELLOW, "/adlist - wywietla listę ogłoszeń");
- SendClientMessage(playerid, COLOR_YELLOW, "/delad [ID ogłoszenia] - usuwa ogłoszenie");
- SendClientMessage(playerid, COLOR_YELLOW, "/addad [opis] [tekst] - dodaje ogłoszenie");
- SendClientMessage(playerid, COLOR_YELLOW, "/adrotate - zmienia ogłoszenie na następne");
- SendClientMessage(playerid, COLOR_YELLOW, "/eject [ID gracza] - wyrzuca gracza z pojazdu");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac8 - poprzednia strona <> /rac10 - następna strona");
- return 1;
- }
- dcmd_rac10(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(!IsPlayerAdmin(playerid) && g_player_info[playerid][E_admin_lvl] == 0)
- return ERRORMSG(playerid, "Brak uprawnień!") & 1;
- format(ftext, sizeof(ftext), "%s - Panel %sa:", \
- MAPNAME, AdminLevelName(g_player_info[playerid][E_admin_lvl]));
- SendClientMessage(playerid, COLOR_BLUE, ftext);
- if(g_player_info[playerid][E_admin_lvl] == 1)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- if(g_player_info[playerid][E_admin_lvl] == 2)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "NIC TU NIE MA!");
- }
- else if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/setskin [ID gracza] [ID skinu] - ustawia graczowi skin");
- SendClientMessage(playerid, COLOR_YELLOW, "/setvip [ID gracza] 0/1 - zmienia graczowi status VIPa");
- SendClientMessage(playerid, COLOR_YELLOW, "/ignore [ID gracza] -\
- ignoruje wskazanego gracza");
- }
- SendClientMessage(playerid, COLOR_ORANGE, "/rac9 - poprzednia strona");
- return 1;
- }
- dcmd_setadminlevel(playerid, cmdtext[])
- {
- new
- id,
- a_lvl;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "ui", id, a_lvl))
- return ERRORMSG(playerid, "WPISZ: /setadminlevel [id gracza] [lvl]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id grcza!") & 1;
- if(g_player_info[id][E_admin_lvl] == 4)
- return ERRORMSG(playerid, "Nie możesz zmienić uprawnien coderowi!") & 1;
- if(a_lvl == 4 && !IsPlayerAdmin(playerid))
- return ERRORMSG(playerid, "Nie możesz ustawić uprawniej codera nie logujšc się na rcon!") & 1;
- if(a_lvl < 0 || a_lvl > 4)
- return ERRORMSG(playerid, "Błędny poziom uprawnien! Wybież liczbe z \
- zakresu 0 - 4") & 1;
- if(g_player_info[id][E_admin_lvl] < a_lvl)
- SendClientMessage(id, COLOR_GREEN, "Twoje uprawnienia zostały \
- zwiększone");
- if(g_player_info[id][E_admin_lvl] > a_lvl)
- SendClientMessage(id, COLOR_GREEN, "Twoje uprawnienia zostały \
- zmniejszone");
- g_player_info[id][E_admin_lvl] = a_lvl;
- format(ftext, sizeof(ftext), "Nadałe rangę %s dla gracza %s (ID %d)",
- AdminLevelName(a_lvl), PlayerName(id), id);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- format(ftext, sizeof(ftext), "Twój obecny poziom uprawnień to: %s",
- AdminLevelName(a_lvl));
- SendClientMessage(id, COLOR_GREEN, ftext);
- printf("%s nadal range %s dla gracza %s", PlayerName(playerid),
- AdminLevelName(a_lvl), PlayerName(id));
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_kick(playerid, cmdtext[])
- {
- new
- id,
- reason[80];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "us", id, reason))
- return ERRORMSG(playerid, "WPISZ: /kick [id gracza] [powód]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id grcza!") & 1;
- KickMsg(id, PlayerName(playerid), reason);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_k(playerid, cmdtext[])
- return dcmd_kick(playerid, cmdtext);
- dcmd_ban(playerid, cmdtext[])
- {
- new
- id,
- reason[80];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "us", id, reason))
- return ERRORMSG(playerid, "WPISZ: /ban [id gracza] [powód]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id grcza!") & 1;
- BanMsg(id, PlayerName(playerid), reason);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_b(playerid, cmdtext[])
- return dcmd_ban(playerid, cmdtext);
- dcmd_delacc(playerid, cmdtext[])
- {
- new
- uid,
- pid,
- hid,
- DBResult:result,
- field[15],
- acc_name[24];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "z", acc_name))
- return ERRORMSG(playerid, "WPISZ: /delacc [nazwa konta]") & 1;
- format(query, sizeof(query), "SELECT uid, home_id, prop_id FROM players WHERE name = '%s';", acc_name);
- result = db_query(g_server_info[E_global_db], query);
- db_get_field(result, 0, field, sizeof(field));
- uid = strval(field);
- db_get_field(result, 1, field, sizeof(field));
- hid = strval(field);
- db_get_field(result, 2, field, sizeof(field));
- pid = strval(field);
- db_free_result(result);
- if(!uid)
- return ERRORMSG(playerid, "To konto nie istnieje!") & 1;
- DeleteHouse(hid);
- DeletePropertie(pid);
- Update3DTextLabelText(g_house_info[hid][E_owner], COLOR_GREEN, "Na sprzedaż");
- Update3DTextLabelText(g_prop_info[pid][E_owner], COLOR_GREEN, "Na sprzedaż");
- format(query, sizeof(query), "DELETE FROM players WHERE uid = %d", uid);
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "DELETE FROM warns WHERE uid = %d", uid);
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "DELETE FROM praises WHERE uid = %d", uid);
- dbquery(g_server_info[E_global_db], query);
- format(ftext, sizeof(ftext), "Konto %s zostało skasowane przez %s", acc_name,
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_ORANGE, ftext);
- printf("Konto %s zostalo skasowane przez %s", acc_name,
- PlayerName(playerid));
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_dac(playerid, cmdtext[])
- return dcmd_delacc(playerid, cmdtext);
- dcmd_banacc(playerid, cmdtext[])
- {
- new
- uid,
- field[15],
- acc_name[24];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "z", acc_name))
- return ERRORMSG(playerid, "WPISZ: /banacc [nazwa konta]") & 1;
- format(query, sizeof(query), "SELECT uid FROM players WHERE name = '%s';", acc_name);
- getfield(g_server_info[E_global_db], query, 0, field, sizeof(field));
- uid = strval(field);
- if(!uid)
- return ERRORMSG(playerid, "To konto nie istnieje!") & 1;
- BanAcc(acc_name);
- format(ftext, sizeof(ftext), "Konto %s zostało zbanowane przez %s", acc_name,
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_ORANGE, ftext);
- printf("Konto %s zostalo zbanowane przez %s", acc_name,
- PlayerName(playerid));
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_ba(playerid, cmdtext[])
- return dcmd_banacc(playerid, cmdtext);
- dcmd_unbanacc(playerid, cmdtext[])
- {
- new
- uid,
- field[15],
- acc_name[24];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "z", acc_name))
- return ERRORMSG(playerid, "WPISZ: /unbanacc [nazwa konta]") & 1;
- format(query, sizeof(query), "SELECT uid FROM players WHERE name = '%s';", acc_name);
- getfield(g_server_info[E_global_db], query, 0, field, sizeof(field));
- uid = strval(field);
- if(!uid)
- return ERRORMSG(playerid, "To konto nie istnieje!") & 1;
- UnBanAcc(acc_name);
- format(ftext, sizeof(ftext), "Konto %s zostało odbanowane przez %s", acc_name,
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_ORANGE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_unba(playerid, cmdtext[])
- return dcmd_banacc(playerid, cmdtext);
- dcmd_banip(playerid, cmdtext[])
- {
- new ip[16];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "z", ip))
- return ERRORMSG(playerid, "WPISZ: /banip [ip]") & 1;
- format(ftext, sizeof(ftext), "banip %s", ip);
- SendRconCommand(ftext);
- format(ftext, sizeof(ftext), "IP %s zostało zbanowane przez %s", ip,
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_ORANGE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_bip(playerid, cmdtext[])
- return dcmd_banip(playerid, cmdtext);
- dcmd_unban(playerid, cmdtext[])
- {
- new ip[16];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "z", ip))
- return ERRORMSG(playerid, "WPISZ: /unban [ip]") & 1;
- format(ftext, sizeof(ftext), "unbanip %s", ip);
- SendRconCommand(ftext);
- SendRconCommand("reloadbans");
- format(ftext, sizeof(ftext), "IP %s zostało odbanowane przez %s", ip,
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_ORANGE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_unb(playerid, cmdtext[])
- return dcmd_unban(playerid, cmdtext);
- dcmd_playerinfo(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /playerinfo [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- ShowPlayerStats(id, playerid);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_pi(playerid, cmdtext[])
- return dcmd_playerinfo(playerid, cmdtext);
- dcmd_warn(playerid, cmdtext[])
- {
- new
- id,
- reason[80];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "us", id, reason))
- return ERRORMSG(playerid, "WPISZ /warn [id gracza] [powod]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- GiveWarn(id, PlayerName(playerid), reason);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_w(playerid, cmdtext[])
- return dcmd_warn(playerid, cmdtext);
- dcmd_readwarns(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /readwarns [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- ReadWarns(id, playerid);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_rw(playerid, cmdtext[])
- return dcmd_readwarns(playerid, cmdtext);
- dcmd_deletewarn(playerid, cmdtext[])
- {
- new
- id,
- w_id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "ui", id, w_id))
- return ERRORMSG(playerid, "WPISZ /deletewarn [id gracza] [warn id]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- DeleteWarn(id, w_id);
- SendClientMessage(playerid, COLOR_ORANGE, "Ostrzeżenie zostało usunięte!");
- SendClientMessage(id, COLOR_GREEN, "Jedno z Twoich ostrzeżeń zostało usunięte!");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_dw(playerid, cmdtext[])
- return dcmd_deletewarn(playerid, cmdtext);
- dcmd_praise(playerid, cmdtext[])
- {
- new
- id,
- reason[80];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "us", id, reason))
- return ERRORMSG(playerid, "WPISZ /praise [id gracza] [powod]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- GivePraise(id, PlayerName(playerid), reason);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_p(playerid, cmdtext[])
- return dcmd_praise(playerid, cmdtext);
- dcmd_readpraises(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /readpraises [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- ReadPraises(id, playerid);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_rp(playerid, cmdtext[])
- return dcmd_readpraises(playerid, cmdtext);
- dcmd_deletepraise(playerid, cmdtext[])
- {
- new
- id,
- p_id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "ui", id, p_id))
- return ERRORMSG(playerid, "WPISZ /deletepraise [id gracza] [warn id]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- DeletePraise(id, p_id);
- SendClientMessage(playerid, COLOR_ORANGE, "Pochwała została usunięta!");
- SendClientMessage(id, COLOR_GREEN, "Jedna z Twoich pochwał została usunięta!");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_dp(playerid, cmdtext[])
- return dcmd_deletepraise(playerid, cmdtext);
- dcmd_jail(playerid, cmdtext[])
- {
- new
- id,
- time,
- reason[80];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "uis", id, time, reason))
- return ERRORMSG(playerid, "WPISZ: /jail [id gracza] [czas] [powod]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- if(time <= 0)
- return ERRORMSG(playerid, "Błędny czas! Minimalna kara to 1 min.") & 1;
- JailMsg(id, PlayerName(playerid), reason, (time * 60));
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_j(playerid, cmdtext[])
- return dcmd_jail(playerid, cmdtext);
- dcmd_unjail(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /unjail [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- g_player_info[id][E_jail_time] = 0;
- Unjail(id, PlayerName(playerid));
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_uj(playerid, cmdtext[])
- return dcmd_unjail(playerid, cmdtext);
- dcmd_freeze(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /freez [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- TogglePlayerControllable(id, 0);
- format(ftext, sizeof(ftext), "%s został zamrożony przez %sa %s", PlayerName(id),
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_f(playerid, cmdtext[])
- return dcmd_freeze(playerid, cmdtext);
- dcmd_unfreeze(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /unfreez [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- TogglePlayerControllable(id, 1);
- format(ftext, sizeof(ftext), "%s został odmrożony przez %sa %s", PlayerName(id),
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_uf(playerid, cmdtext[])
- return dcmd_unfreeze(playerid, cmdtext);
- dcmd_setgravity(playerid, cmdtext[])
- {
- new Float:gravity;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "f", gravity))
- return ERRORMSG(playerid, "WPISZ: /setgravity [gravity]") &1;
- if(gravity < -0.025 || gravity > 0.025)
- return ERRORMSG(playerid, "Grawitację możesz ustawiać w przedziale \
- -0.025 - 0.025") & 1;
- format(ftext, sizeof(ftext), "Grawitacja została zmieniona na %f przez \
- %sa %s", gravity, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- SetGravity(gravity);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_sg(playerid, cmdtext[])
- return dcmd_setgravity(playerid, cmdtext);
- dcmd_setweather(playerid, cmdtext[])
- {
- new weather;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "d", weather))
- return ERRORMSG(playerid, "WPISZ: /setweather [weather]") &1;
- if(weather < 0 || weather > 45)
- return ERRORMSG(playerid, "Pogodę możesz ustawiać w przedziale \
- 0 - 45") & 1;
- format(ftext, sizeof(ftext), "Pogoda została zmieniona na %d przez \
- %sa %s", weather, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- SetWeather(weather);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_sw(playerid, cmdtext[])
- return dcmd_setweather(playerid, cmdtext);
- dcmd_settime(playerid, cmdtext[])
- {
- new hour;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "d", hour))
- return ERRORMSG(playerid, "WPISZ: /settime [godzina]") &1;
- if(hour < 0 || hour > 23)
- return ERRORMSG(playerid, "Godzinę możesz ustawiać w przedziale \
- 0 - 23") & 1;
- format(ftext, sizeof(ftext), "Godzina została zmieniona na %d przez \
- %sa %s", hour, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- SetWorldTime(hour);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_st(playerid, cmdtext[])
- return dcmd_settime(playerid, cmdtext);
- dcmd_gunlist(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- SendClientMessage(playerid, COLOR_BLUE, ADMPANEL" - Lista broni:");
- SendClientMessage(playerid, COLOR_YELLOW, "0 Pięć; 1 Kastet; 2 Kij Golf\
- owy; 3 Pałka Policyjna; 4 Nóż; 5 Kij Baseballowy;");
- SendClientMessage(playerid, COLOR_YELLOW, "6 Łopata; 7 Kij Bilardowy; 8 \
- Katana; 9 Piła Łańcuchowa; 10 Różowy Wibrator;");
- SendClientMessage(playerid, COLOR_YELLOW, "11 Biały Wibrator; 12 Długi \
- Wibrator; 13 Biały Wibrator 2; 14 Kwiaty; 15 Laska;");
- SendClientMessage(playerid, COLOR_YELLOW, "16 Granaty; 17 Gaz Łzawišcy; \
- 22 9mm; 23 9mm Z Tłumikiem; 24 Desert Eagle;");
- SendClientMessage(playerid, COLOR_YELLOW, "25 Shotgun; 26 Sawn Off Shotg\
- un; 27 Combat Shotgun; 28 Mac10; 29 MP5; 30 AK47;");
- SendClientMessage(playerid, COLOR_YELLOW, "31 M4; 32 Tec9; 33 Karabin; \
- 34 Snajperka; 35 RPG; 36 Wyrzutnia Rakiet; 37 Miotacz ognia;");
- SendClientMessage(playerid, COLOR_YELLOW, "38 Minigun; 39 Ładunki Wybuch\
- owe; 41 Spray; 42 Ganica; 43 Aparat; 44 Noktowizor;");
- SendClientMessage(playerid, COLOR_YELLOW, "45 Termowizor; 46 Spadochron");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gl(playerid, cmdtext[])
- return dcmd_gunlist(playerid, cmdtext);
- dcmd_gun(playerid, cmdtext[])
- {
- new
- weapon,
- ammo;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "dd", weapon, ammo))
- return ERRORMSG(playerid, "WPISZ: /gun [id broni] [amunicja]") & 1;
- if(weapon < 0 || weapon > 46)
- return ERRORMSG(playerid, "Błędne id broni! Wpisz /gunlist aby spraw\
- dzić dostępne bronie.") & 1;
- if(ammo < 0 || ammo > 99999)
- return ERRORMSG(playerid, "Zła iloć amunicji!") & 1;
- GivePlayerWeapon(playerid, weapon, ammo);
- format(ftext, sizeof(ftext), "Otrzymałe broń %s (ID: %d) z %d amunicji",
- ReturnWeaponName(weapon), weapon, ammo);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_g(playerid, cmdtext[])
- return dcmd_gun(playerid, cmdtext);
- dcmd_gunpack(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 24, 10000);
- GivePlayerWeapon(playerid, 26, 10000);
- GivePlayerWeapon(playerid, 32, 10000);
- GivePlayerWeapon(playerid, 31, 10000);
- GivePlayerWeapon(playerid, 34, 10000);
- SendClientMessage(playerid, COLOR_GREEN, "Otrzymałe zestaw broni");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gp(playerid, cmdtext[])
- return dcmd_gunpack(playerid, cmdtext);
- dcmd_givegun(playerid, cmdtext[])
- {
- new
- id,
- weapon,
- ammo;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "udd", id, weapon, ammo))
- return ERRORMSG(playerid, "WPISZ: /givegun [id gracza] [id broni] [amunicja]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- if(weapon < 0 || weapon > 46)
- return ERRORMSG(playerid, "Błędne id broni! Wpisz /gunlist aby spraw\
- dzić dostępne bronie.") & 1;
- if(ammo < 0 || ammo > 99999)
- return ERRORMSG(playerid, "Zła iloć amunicji!") & 1;
- GivePlayerWeapon(id, weapon, ammo);
- format(ftext, sizeof(ftext), "Otrzymałe broń %s (ID: %d) z %d amunicji \
- od %sa %s", ReturnWeaponName(weapon), weapon, ammo,
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessage(id, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "Dałe %s (ID: %d) broń %s (ID: %d) z %d amunicji",
- PlayerName(id), id, ReturnWeaponName(weapon), weapon, ammo);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gg(playerid, cmdtext[])
- return dcmd_givegun(playerid, cmdtext);
- dcmd_givegunall(playerid, cmdtext[])
- {
- new
- weapon,
- ammo;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "dd", weapon, ammo))
- return ERRORMSG(playerid, "WPISZ: /givegunall [id broni] [amunicja]") & 1;
- if(weapon < 0 || weapon > 46)
- return ERRORMSG(playerid, "Błędne id broni! Wpisz /gunlist aby spraw\
- dzić dostępne bronie.") & 1;
- if(ammo < 0 || ammo > 99999)
- return ERRORMSG(playerid, "Zła iloć amunicji!") & 1;
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- GivePlayerWeapon(playerid, weapon, ammo);
- }
- format(ftext, sizeof(ftext), "%sa %s dał wszystkim broń %s.",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid),
- ReturnWeaponName(weapon));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gga(playerid, cmdtext[])
- return dcmd_givegunall(playerid, cmdtext);
- dcmd_disarm(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /disarm [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- ResetPlayerWeapons(id);
- format(ftext, sizeof(ftext), "Zostałe rozbrojony przez %s", PlayerName(playerid));
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- format(ftext, sizeof(ftext), "%s (ID: %d) został rozbrojony przez %sa %s",
- PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_d(playerid, cmdtext[])
- return dcmd_disarm(playerid, cmdtext);
- dcmd_disarmall(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- ResetPlayerWeapons(i);
- }
- format(ftext, sizeof(ftext), "Wszyscy zostali rozbrojeni przez %sa %s",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_da(playerid, cmdtext[])
- return dcmd_disarmall(playerid, cmdtext);
- dcmd_mute(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /mute [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- g_player_info[id][E_is_muted] = true;
- format(ftext, sizeof(ftext), "Zostałe uciszony przez %s", PlayerName(playerid));
- SendClientMessage(id, COLOR_YELLOW, ftext);
- format(ftext, sizeof(ftext), "Uciszyłe %s (ID: %d)", PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- if(g_player_info[id][E_Uid])
- {
- format(query, sizeof(query), "INSERT INTO muted_players VALUES(%d);", g_player_info[id][E_Uid]);
- dbquery(g_server_info[E_global_db], query);
- }
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_m(playerid, cmdtext[])
- return dcmd_mute(playerid, cmdtext);
- dcmd_unmute(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /unmute [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- g_player_info[id][E_is_muted] = false;
- format(ftext, sizeof(ftext), "%s przywrócił Ci możliwoć pisania na czacie",
- PlayerName(playerid));
- SendClientMessage(id, COLOR_YELLOW, ftext);
- format(ftext, sizeof(ftext), "przywróciłe możliwoć pisania na czacie \
- %s (ID: %d)", PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(query, sizeof(query), "DELETE FROM muted_players WHERE uid = %d;", g_player_info[id][E_Uid]);
- dbquery(g_server_info[E_global_db], query);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_um(playerid, cmdtext[])
- return dcmd_unmute(playerid, cmdtext);
- dcmd_spectate(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ /spectate [id gracza]") & 1;
- if(!IsPlayerConnected(id) || id == playerid)
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- if(GetPlayerState(id) == PLAYER_STATE_SPECTATING || GetPlayerState(id) == PLAYER_STATE_NONE || GetPlayerState(id) == PLAYER_STATE_WASTED)
- return ERRORMSG(playerid, "Nie możesz spectować gracza który się jeszcze nie zrespił!") & 1;
- new interior = GetPlayerInterior(id);
- SetPlayerInterior(playerid, interior);
- new vworld = GetPlayerVirtualWorld(id);
- SetPlayerVirtualWorld(playerid, vworld);
- TogglePlayerSpectating(playerid, 1);
- if(IsPlayerInAnyVehicle(id))
- {
- TogglePlayerControllable(playerid, 0);
- PlayerSpectateVehicle(playerid, GetPlayerVehicleID(id), SPECTATE_MODE_NORMAL);
- }
- else
- {
- TogglePlayerControllable(playerid, 1);
- PlayerSpectatePlayer(playerid, id);
- }
- g_player_info[playerid][E_specting] = id;
- g_player_info[id][E_is_spected] = true;
- format(ftext, sizeof(ftext), "Obserwujesz gracza %s (ID: %d)",
- PlayerName(id), g_player_info[playerid][E_specting]);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_spec(playerid, cmdtext[])
- return dcmd_spectate(playerid, cmdtext);
- dcmd_spectateoff(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- TogglePlayerSpectating(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- g_player_info[playerid][E_specting] = -1;
- SendClientMessage(playerid, COLOR_GREEN, "Wyłšczyłe tryb podglšdu.");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_specoff(playerid, cmdtext[])
- return dcmd_spectateoff(playerid, cmdtext);
- dcmd_clearchat(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- return BlankMsg(100) & 1;
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_cc(playerid, cmdtext[])
- return dcmd_clearchat(playerid, cmdtext);
- dcmd_announce(playerid, cmdtext[])
- {
- new
- time,
- ann_text[120];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "is", time, ann_text))
- return ERRORMSG(playerid, "WPISZ: /announce [czas] [tekst]") & 1;
- GameTextForAll(ann_text, (time * 1000), 1);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_ann(playerid, cmdtext[])
- return dcmd_announce(playerid, cmdtext);
- dcmd_lockall(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- for(new i; i < MAX_VEHICLES; i++)
- g_veh_info[i][E_locked] = true;
- format(ftext, sizeof(ftext), "Wszystkie pojazdy na mapie zostały zamknię\
- te przez %sa %s!",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_la(playerid, cmdtext[])
- return dcmd_lockall(playerid, cmdtext);
- dcmd_unlockall(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- for(new i; i < MAX_VEHICLES; i++)
- g_veh_info[i][E_locked] = false;
- format(ftext, sizeof(ftext), "Wszystkie pojazdy na mapie zostały otwarte\
- przez %sa %s!",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_ula(playerid, cmdtext[])
- return dcmd_unlockall(playerid, cmdtext);
- dcmd_medic(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- {
- SetPlayerHealth2(playerid, 100.0);
- return ERRORMSG(playerid, "WPISZ: /medic [id gracza] aby uleczyć inn\
- ego gracza") & 1;
- }
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- SetPlayerHealth2(id, 100.0);
- format(ftext, sizeof(ftext), "%s (ID: %d) został uleczony przez %sa %s",
- PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_md(playerid, cmdtext[])
- return dcmd_medic(playerid, cmdtext);
- dcmd_medicall(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- SetPlayerHealth2(i, 100.0);
- }
- format(ftext, sizeof(ftext), "Wszyscy zostali uleczeni przez %sa %s",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_ma(playerid, cmdtext[])
- return dcmd_medicall(playerid, cmdtext);
- dcmd_armor(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- {
- SetPlayerArmour2(playerid, 100.0);
- return ERRORMSG(playerid, "WPISZ: /armor [id gracza] aby dać kamize\
- lke dla innego gracza") & 1;
- }
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- SetPlayerArmour2(id, 100.0);
- format(ftext, sizeof(ftext), "%s (ID: %d) dostał kamizelke od %sa %s",
- PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_a(playerid, cmdtext[])
- return dcmd_armor(playerid, cmdtext);
- dcmd_armorall(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- SetPlayerArmour2(i, 100.0);
- }
- format(ftext, sizeof(ftext), "Wszyscy dostali kamizelki od %sa %s",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_aa(playerid, cmdtext[])
- return dcmd_armorall(playerid, cmdtext);
- dcmd_repairvehicle(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- {
- if(IsPlayerInAnyVehicle(playerid))
- RepairVehicle(GetPlayerVehicleID(playerid));
- return ERRORMSG(playerid, "WPISZ: /repairvehicle [id gracza] aby \
- naprawić pojazd innego gracza") & 1;
- }
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- if(!IsPlayerInAnyVehicle(id))
- {
- format(ftext, sizeof(ftext), "%s nie jest w pojedzie!", PlayerName(id));
- return ERRORMSG(playerid, ftext) & 1;
- }
- RepairVehicle(GetPlayerVehicleID(id));
- format(ftext, sizeof(ftext), "Pojazd %s (ID: %d) został naprawiony przez %sa %s",
- PlayerName(id), id, AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_rv(playerid, cmdtext[])
- return dcmd_repairvehicle(playerid, cmdtext);
- dcmd_repairvehicleall(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- RepairVehicle(GetPlayerVehicleID(i));
- }
- format(ftext, sizeof(ftext), "Wszystkie pojazdy zostały naprawione przez %sa %s",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_rva(playerid, cmdtext[])
- return dcmd_repairvehicleall(playerid, cmdtext);
- dcmd_givecash(playerid, cmdtext[])
- {
- new
- money,
- id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "ui", id, money))
- return ERRORMSG(playerid, "WPISZ: /givecash [id gracza] [kwota]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- if(money == 0)
- return ERRORMSG(playerid, "Błędna kwota") & 1;
- if(money > 0)
- {
- format(ftext, sizeof(ftext), "Dale %d$ graczowi %s (ID: %d).",money,
- PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s Dał Tobie %d$.", PlayerName(playerid), money);
- SendClientMessage(id, COLOR_GREEN, ftext);
- }
- if(money < 0)
- {
- format(ftext, sizeof(ftext), "Zabrałe %d$ graczowi %s (ID: %d).", -money,
- PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s zabrał Tobie %d$.", PlayerName(playerid), -money);
- SendClientMessage(id, COLOR_GREEN, ftext);
- }
- GivePlayerMoney2(id, money);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gc(playerid, cmdtext[])
- return dcmd_givecash(playerid, cmdtext);
- dcmd_givecashall(playerid, cmdtext[])
- {
- new money;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "i", money))
- return ERRORMSG(playerid, "WPISZ: /givecashall [kwota]") & 1;
- if(money == 0)
- return ERRORMSG(playerid, "Błędna kwota") & 1;
- if(money > 0)
- {
- format(ftext, sizeof(ftext), "Dałe %d$ wszystkim graczom.", money);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s dał wszystkim %d$.", PlayerName(playerid), money);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- }
- if(money < 0)
- {
- format(ftext, sizeof(ftext), "Zabrałe %d$ wszystkim graczom.", -money);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s zabrał wszystkim %d$.", PlayerName(playerid), -money);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- }
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- GivePlayerMoney2(i, money);
- }
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gca(playerid, cmdtext[])
- return dcmd_givecashall(playerid, cmdtext);
- dcmd_givebank(playerid, cmdtext[])
- {
- new
- money,
- id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "ud", id, money))
- return ERRORMSG(playerid, "WPISZ /givebank [id gracza] [kwota]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- if(money == 0)
- return ERRORMSG(playerid, "Błędna kwota") & 1;
- if(money > 0)
- {
- format(ftext, sizeof(ftext), "Dodałe %d$ graczowi %s (ID: %d) do je\
- go konta bankowego.", money, PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s dodał Tobie %d$ do konta bankowego.",
- PlayerName(playerid), money);
- SendClientMessage(id, COLOR_GREEN, ftext);
- }
- if(money < 0)
- {
- format(ftext, sizeof(ftext), "Zabrałe %d$ graczowi %s (ID: %d) z konta.",
- -money, PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s zabrał Tobie %d$ z konta.",
- PlayerName(playerid), -money);
- SendClientMessage(id, COLOR_GREEN, ftext);
- }
- g_player_info[id][E_money_in_bank] += money;
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gb(playerid, cmdtext[])
- return dcmd_givebank(playerid, cmdtext);
- dcmd_givebankall(playerid, cmdtext[])
- {
- new money;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "d", money))
- return ERRORMSG(playerid, "WPISZ /givebankall [kwota]") & 1;
- if(money == 0)
- return ERRORMSG(playerid, "Błędna kwota") & 1;
- if(money > 0)
- {
- format(ftext, sizeof(ftext), "Dodałe %d$ wszystkim do ich kont bank\
- owych.", money);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s dodał wszystkim %d$ do konta bankowego.",
- PlayerName(playerid), money);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- }
- if(money < 0)
- {
- format(ftext, sizeof(ftext), "Zabrałe %d$ wszystkim graczom z ich kont.",
- -money);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s zabrał wszystkim %d$ z konta bankowego.",
- PlayerName(playerid), -money);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- }
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- g_player_info[i][E_money_in_bank] += money;
- }
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gba(playerid, cmdtext[])
- return dcmd_givebankall(playerid, cmdtext);
- dcmd_teleportto(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /teleportto [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- TeleportPlayerToPlayer(playerid, id);
- format(ftext, sizeof(ftext), "Teleportowałe się do %s (ID: %d).",
- PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s teleportował się do Ciebie.",
- PlayerName(playerid));
- SendClientMessage(id, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_tpto(playerid, cmdtext[])
- return dcmd_teleportto(playerid, cmdtext);
- dcmd_teleporthere(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /teleporthere [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- TeleportPlayerToPlayer(id, playerid);
- format(ftext, sizeof(ftext), "Teleportowałe %s (ID: %d) do siebie.",
- PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s teleportował Cię do siebie.",
- PlayerName(playerid));
- SendClientMessage(id, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_tphere(playerid, cmdtext[])
- return dcmd_teleporthere(playerid, cmdtext);
- dcmd_teleport(playerid, cmdtext[])
- {
- new
- id,
- to_id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "uu", id, to_id))
- return ERRORMSG(playerid, "WPISZ: /teleport [id gracza] [do gracza]") & 1;
- if(!IsPlayerConnected(id) || !IsPlayerConnected(to_id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- TeleportPlayerToPlayer(id, to_id);
- format(ftext, sizeof(ftext), "Teleportowałe %s (ID: %d) do %s (ID: %d).",
- PlayerName(id), id, PlayerName(to_id), to_id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s teleportował Cię do %s.",
- PlayerName(playerid), PlayerName(to_id));
- SendClientMessage(id, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s teleportował %s do Ciebie.",
- PlayerName(playerid), PlayerName(id));
- SendClientMessage(to_id, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_tp(playerid, cmdtext[])
- return dcmd_teleport(playerid, cmdtext);
- dcmd_respawncars(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- for(new i; i < MAX_VEHICLES; i++)
- if(!IsVehicleInUse(i))
- SetVehicleToRespawn(i);
- format(ftext, sizeof(ftext), "Pojazdy na mapie zostały zrespawnowane pr\
- zez %sa %s", AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_rc(playerid, cmdtext[])
- return dcmd_respawncars(playerid, cmdtext);
- dcmd_eye(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- g_player_info[playerid][E_eye] = !g_player_info[playerid][E_eye];
- if(g_player_info[playerid][E_eye])
- SendClientMessage(playerid, COLOR_GREEN, "Włšczyłe podglšd komend.");
- else
- SendClientMessage(playerid, COLOR_ORANGE, "Wyłšczyłe podglšd komend.");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_pmeye(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- g_player_info[playerid][E_pmeye] = !g_player_info[playerid][E_pmeye];
- if(g_player_info[playerid][E_pmeye])
- SendClientMessage(playerid, COLOR_GREEN, "Włšczyłe podglšd pmów.");
- else
- SendClientMessage(playerid, COLOR_ORANGE, "Wyłšczyłe podglšd pmów.");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_explode(playerid, cmdtext[])
- {
- new
- Float:pos[3],
- id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /explode [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- GetPlayerPos(id, pos[0], pos[1], pos[2]);
- CreateExplosion(pos[0], pos[1], pos[2], 2, 2.0);
- SendClientMessage(playerid, COLOR_ORANGE, "Zrobione!");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_gmx(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- SendClientMessageToAll(COLOR_YELLOW, "Za chwilę nastšpi restart mapy!");
- SendClientMessageToAll(COLOR_YELLOW, "Zapisywanie danych...");
- SendRconCommand("gmx");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_reset(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- #define HOUSE_ENTER g_house_info[i][E_enter_pos]
- #define PROP_ENTER g_prop_info[i][E_enter_pos]
- new i = 1;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- while(HOUSE_ENTER[0] && HOUSE_ENTER[1] && HOUSE_ENTER[2])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, HOUSE_ENTER[0], HOUSE_ENTER[1],
- HOUSE_ENTER[2]))
- {
- DeleteHouse(i);
- Update3DTextLabelText(g_house_info[i][E_owner], COLOR_GREEN, "Na sprzedaż");
- g_house_info[i][E_reserved] = false;
- return 1;
- }
- i++;
- }
- i = 1;
- while(PROP_ENTER[0] && PROP_ENTER[1] && PROP_ENTER[2])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, PROP_ENTER[0], PROP_ENTER[1],
- PROP_ENTER[2]))
- {
- DeletePropertie(i);
- Update3DTextLabelText(g_prop_info[i][E_owner], COLOR_BLUE, "Na sprzedaż");
- return 1;
- }
- i++;
- }
- ERRORMSG(playerid, "Musisz stać w pobliży domu lub posiadłoci aby jš kupić!");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- #undef HOUSE_ENTER
- #undef PROP_ENTER
- }
- dcmd_reservation(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- #define HOUSE_ENTER g_house_info[i][E_enter_pos]
- new i = 1;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- while(HOUSE_ENTER[0] && HOUSE_ENTER[1] && HOUSE_ENTER[2])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, HOUSE_ENTER[0], HOUSE_ENTER[1],
- HOUSE_ENTER[2]))
- {
- g_house_info[i][E_reserved] = true;
- format(query, sizeof(query), "UPDATE houses SET uid = -1, \
- owner_name = 'Rezerwacja' WHERE hid = %d", i);
- dbquery(g_server_info[E_global_db], query);
- Update3DTextLabelText(g_house_info[i][E_owner], COLOR_YELLOW, "Rezerwacja");
- return 1;
- }
- i++;
- }
- ERRORMSG(playerid, "Musisz stać w pobliży domu lub posiadłoci aby jš kupić!");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- #undef HOUSE_ENTER
- }
- dcmd_hideme(playerid, cmdtext[])
- {
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(!strlen(cmdtext))
- {
- g_player_info[playerid][E_is_hiden] = true;
- SendClientMessage(playerid, COLOR_GREEN, "Twój nick został ukryty");
- return ERRORMSG(playerid, "WPISZ /hideme [nick] aby zmienić sobie nick") & 1;
- }
- format(ftext, sizeof(ftext), "*** %s opucił grę (Time-Out)", PlayerName(playerid));
- SendClientMessageToAll(COLOR_WHITE, ftext);
- format(ftext, sizeof(ftext), "*** %s dołšczył do gry", cmdtext);
- SendClientMessageToAll(COLOR_WHITE, ftext);
- g_player_info[playerid][E_is_hiden] = true;
- SetPlayerName(playerid, cmdtext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_showme(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- g_player_info[playerid][E_is_hiden] = false;
- SetPlayerName(playerid, g_player_info[playerid][E_name]);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_god(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- SetPlayerHealth2(playerid, FLOAT_INFINITY);
- SendClientMessage(playerid, COLOR_GREEN, "Włšczyłe goda");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_givegod(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /givegod [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- SetPlayerHealth2(id, FLOAT_INFINITY);
- format(ftext, sizeof(ftext), "Włšczyłe goda dla gracza %s (ID: %d)",
- PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s %s włšczył Ci goda",
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessage(id, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_vehgod(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- return ERRORMSG(playerid, "Muisz być w pojedzie aby użyć tej komendy") & 1;
- SetVehicleHealth(GetPlayerVehicleID(playerid), 9999999999.0);
- SendClientMessage(playerid, COLOR_GREEN, "Włšczyłe goda dla pojazdu");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_slotto(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- LotteryStart();
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_payday(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- PayDay();
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_jackpot(playerid, cmdtext[])
- {
- new moneys;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if (sscanf(cmdtext, "i", moneys))
- return ERRORMSG(playerid, "WPISZ: /jackpot [kwota]") & 1;
- if(moneys == 0)
- return ERRORMSG(playerid, "Kwota nie może być równa 0") & 1;
- g_server_info[E_lottery_money] += moneys;
- SetConfigInt("lotto", g_server_info[E_lottery_money]);
- if(moneys > 0)
- {
- format(ftext, sizeof(ftext), "Pula nagród w loterii została zwiększona do: %d$",
- g_server_info[E_lottery_money]);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- if(moneys < 0) {
- format(ftext, sizeof(ftext), "Pula nagród w loterii została zmniejszona do: %d$",
- g_server_info[E_lottery_money]);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_creategang(playerid, cmd[])
- {
- new
- id,
- gtag[30],
- str[100],
- gcolor,
- zcolor;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmd, "uzhh", id, gtag, gcolor, zcolor))
- return ERRORMSG(playerid, "WPISZ: /creategang [leaderid] [tag] [gangcolor] [zonecolor]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- if(gs_GangInfo[id][gangID])
- return ERRORMSG(playerid, "Ten gracz ma już gang.") & 1;
- gs_GangInfo[id][gangID] = gs_Gang[++g_gangid][gangID] = g_gangid;
- gs_Gang[g_gangid][color] = gcolor;
- gs_Gang[g_gangid][z_color] = zcolor;
- gs_GangInfo[id][isLeader] = 1;
- format(gs_Gang[g_gangid][tag], 15, "[%s]", gtag);
- format(query, sizeof(query), "INSERT INTO gangs VALUES ('%s', '%s', %d, 1);", PlayerName(id),
- gs_Gang[g_gangid][tag], g_gangid);
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "INSERT INTO gang_info VALUES (NULL, '%s', '%s' , 0, %d, %d, 0);",
- gs_Gang[g_gangid][tag], PlayerName(id), gcolor, zcolor);
- dbquery(g_server_info[E_global_db], query);
- format(str, sizeof(str), "Utwożyłe gang. TAG: %s Lider: %s", gtag, PlayerName(id));
- SendClientMessage(playerid, COLOR_GREEN, str);
- GivePlayerGang(id, g_gangid);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień");
- return 1;
- }
- dcmd_deletegang(playerid, cmd[])
- {
- new
- gang_id,
- gtag[64],
- str[100];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmd, "d", gang_id))
- return ERRORMSG(playerid, "/deletegang [id gangu]") & 1;
- format(query, sizeof(query), "SELECT tag FROM gangs WHERE gangid = %d;", gang_id);
- new DBResult:result = db_query(g_server_info[E_global_db], query);
- db_get_field(result, 0, gtag, sizeof(gtag));
- db_free_result(result);
- if(!strlen(gtag))
- return ERRORMSG(playerid, "Dany gang nie istnieje") & 1;
- format(query, sizeof(query), "DELETE FROM gang_info WHERE gangid = %d;", gang_id);
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "DELETE FROM gangs WHERE gangid = %d;", gang_id);
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "UPDATE zone SET gang = 0, color = -137 WHERE gangid = %d;", gang_id);
- dbquery(g_server_info[E_global_db], query);
- gs_Gang[gang_id][gmoney] = 0;
- gs_Gang[gang_id][zonesnumber] = 0;
- for(new i; i < MAX_ZONES; i++)
- {
- if(gs_ZonesInfo[i][gangID] == gang_id)
- {
- gs_ZonesInfo[i][isFlashing] = 0;
- gs_ZonesInfo[i][gangID] = 0;
- gs_ZonesInfo[i][color] = -137;
- gs_ZonesInfo[i][killed] = 0;
- KillTimer(gs_ZonesInfo[i][ztimer]);
- }
- GangZoneHideForAll(i);
- GangZoneShowForAll(i, gs_ZonesInfo[i][color]);
- if(gs_ZonesInfo[i][isFlashing])
- GangZoneFlashForPlayer(playerid, i, 0xFF0000AA);
- }
- for(new id, gmax = GetMaxPlayers(); id < gmax; id++)
- if(gs_GangInfo[id][gangID] == gang_id)
- DeletePlayerGang(id);
- format(str, sizeof(str), "Gang %s został usunięty", gtag);
- SendClientMessageToAll(COLOR_ORANGE, str);
- printf("%s usunal gang %s", PlayerName(playerid), gtag);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_setleader(playerid, cmd[])
- {
- new
- gid,
- id,
- str[100];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmd, "du", gid, id))
- return ERRORMSG(playerid, "WPISZ: /setleader [gang id] [id gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- format(query, sizeof(query), "UPDATE gangs SET isleader = 0 WHERE gangid = %d AND isleader = 1;", gid);
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "UPDATE gangs SET isleader = 1 WHERE member = '%s';", PlayerName(id));
- dbquery(g_server_info[E_global_db], query);
- format(query, sizeof(query), "UPDATE gang_info SET leader = '%s' WHERE gangid = %d;",
- PlayerName(id), gid);
- dbquery(g_server_info[E_global_db], query);
- for(new i, gmax = GetMaxPlayers(); i < gmax; i++)
- {
- if(!IsPlayerConnected(i))
- continue;
- if(gs_GangInfo[i][isLeader] == 1 && gs_GangInfo[i][gangID] == gid)
- {
- SendClientMessage(i, COLOR_ORANGE, "Administrator usunšł Cię z pozycji lidera gangu");
- break;
- }
- }
- gs_GangInfo[id][isLeader] = 1;
- format(str, sizeof(str), "Mianowałe %s nowym liderem gangu", PlayerName(id));
- SendClientMessage(playerid, COLOR_YELLOW, str);
- SendClientMessage(id, COLOR_GREEN, "Zostałe nowym liderem");
- printf("%s mianowal %s nowym liderem gangu", PlayerName(playerid), PlayerName(id));
- }
- return 1;
- }
- dcmd_givezone(playerid, cmd[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmd, "u", id))
- return ERRORMSG(playerid, "/givezone [playerid]") & 1;
- for(new i; i < MAX_ZONES; i++)
- {
- if(IsPlayerInArea(playerid, ZONEPOS[0], ZONEPOS[1], ZONEPOS[2], ZONEPOS[3]) &&
- gs_ZonesInfo[i][gangID])
- return ERRORMSG(playerid, "Ta dzielnica już do kogo należy") & 1;
- if(IsPlayerInArea(playerid, ZONEPOS[0], ZONEPOS[1], ZONEPOS[2], ZONEPOS[3]))
- {
- gs_ZonesInfo[i][gangID] = gs_GangInfo[id][gangID];
- gs_Gang[gs_GangInfo[id][gangID]][zonesnumber]++;
- SendMessageToGang(gs_ZonesInfo[i][gangID], COLOR_GREEN, "Twój gang przejšł nowš strefe");
- gs_ZonesInfo[i][color] = gs_Gang[gs_GangInfo[id][gangID]][z_color];
- GangZoneHideForAll(i);
- GangZoneShowForAll(i, gs_ZonesInfo[i][color]);
- //printf("%d", gs_Gang[gs_GangInfo[id][gangID]][zonesnumber]);
- return 1;
- }
- }
- return ERRORMSG(playerid, "Musisz stać w jakiej dzielnych") & 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_removezone(playerid, cmd[])
- {
- #pragma unused cmd
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- for(new i; i < MAX_ZONES; i++)
- {
- if(IsPlayerInArea(playerid, ZONEPOS[0], ZONEPOS[1], ZONEPOS[2], ZONEPOS[3]))
- {
- gs_Gang[gs_ZonesInfo[i][gangID]][zonesnumber]--;
- SendMessageToGang(gs_ZonesInfo[i][gangID], COLOR_YELLOW, "Twój gang stracił strefe");
- gs_ZonesInfo[i][gangID] = 0;
- gs_ZonesInfo[i][color] = 0xFFFFFF77;
- GangZoneHideForAll(i);
- GangZoneShowForAll(i, gs_ZonesInfo[i][color]);
- return 1;
- }
- }
- return ERRORMSG(playerid, "Musisz stać w jakiej dzielnych") & 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_lastlogin(playerid, cmdtext[])
- {
- new
- result[60],
- name[24];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 1)
- {
- if(sscanf(cmdtext, "z", name))
- return ERRORMSG(playerid, "WPISZ: /lastlogin [nick]") & 1;
- format(query, sizeof(query), "SELECT last_login FROM players WHERE name = '%s';", name);
- getfield(g_server_info[E_global_db], query, 0, result, sizeof(result));
- if(!strlen(result))
- return ERRORMSG(playerid, "Wybrany gracz jeszcze ani razu sie nie logował") & 1;
- format(ftext, sizeof(ftext), "%s ostatnio logował się %s", name, result);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_createhome(playerid, cmdtext[])
- {
- new
- Float:pos[4],
- Float:pos2[4],
- DBResult:result,
- field[15],
- interior,
- i = 1,
- cost;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "dd", interior, cost))
- return ERRORMSG(playerid, "WPISZ: /createhome [interior id] [cena]") & 1;
- if(interior == 0)
- return ERRORMSG(playerid, "błędny interior") & 1;
- if(cost <= 0)
- return ERRORMSG(playerid, "błędna cena") & 1;
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- format(query, sizeof(query), "SELECT x, y, z, a, interior FROM interiors WHERE intid = %d",
- interior);
- result = db_query(g_server_info[E_global_db], query);
- for(new f; f < 4; f++)
- {
- db_get_field(result, f, field, sizeof(field));
- pos2[f] = floatstr(field);
- }
- db_get_field(result, 4, field, sizeof(field));
- interior = strval(field);
- db_free_result(result);
- while(g_house_info[i][E_enter_pos][0] && i < MAX_HOUSES)
- i++;
- format(query, sizeof(query), "INSERT INTO houses VALUES(NULL, 0, 'Na sprzedaż', \
- %f, %f, %f, %f, %f, %f, %f, %f, 0.0, 0.0, 0.0, 0.0, 0, 0, %d, %d, %d, 0, 0);",
- pos[0], pos[1], pos[2], pos[3], pos2[0], pos2[1], pos2[2], pos2[3], cost, interior, i);
- dbquery(g_server_info[E_global_db], query);
- g_house_info[i][E_pickup] = CreatePickup(1273, 23, pos[0], pos[1], pos[2]);
- g_house_info[i][E_owner] = Create3DTextLabel("Na sprzedaż", COLOR_GREEN,
- pos[0], pos[1] + 0.2, pos[2] + 0.5, 15, 0);
- g_house_info[i][E_enter_pos][0] = pos[0];
- g_house_info[i][E_enter_pos][1] = pos[1];
- g_house_info[i][E_enter_pos][2] = pos[2];
- g_house_info[i][E_enter_pos][3] = pos[3];
- g_house_info[i][E_exit_pos][0] = pos2[0];
- g_house_info[i][E_exit_pos][1] = pos2[1];
- g_house_info[i][E_exit_pos][2] = pos2[2];
- g_house_info[i][E_exit_pos][3] = pos2[3];
- g_house_info[i][E_cost] = cost;
- g_house_info[i][E_interior] = interior;
- g_house_info[i][E_vworld] = i;
- SendClientMessage(playerid, COLOR_YELLOW, "Utworzyłe nowy dom.");
- format(ftext, sizeof(ftext), "ID: %d Cena: %d$", i, cost);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_destroy(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- #define HOUSE_ENTER g_house_info[i][E_enter_pos]
- #define PROP_ENTER g_prop_info[i][E_enter_pos]
- new i = 1;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- while(HOUSE_ENTER[0] && HOUSE_ENTER[1] && HOUSE_ENTER[2])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, HOUSE_ENTER[0], HOUSE_ENTER[1],
- HOUSE_ENTER[2]))
- {
- HOUSE_ENTER[0] = 1;
- HOUSE_ENTER[1] = 1;
- HOUSE_ENTER[2] = 1;
- Delete3DTextLabel(g_house_info[i][E_owner]);
- DestroyPickup(g_house_info[i][E_pickup]);
- DeleteHouse(i);
- format(query, sizeof(query), "UPDATE houses SET enterx = 1, entery = 1, enterz = 1 WHERE hid = %d;",
- i);
- dbquery(g_server_info[E_global_db], query);
- return 1;
- }
- i++;
- }
- i = 1;
- while(PROP_ENTER[0] && PROP_ENTER[1] && PROP_ENTER[2])
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, PROP_ENTER[0], PROP_ENTER[1],
- PROP_ENTER[2]))
- {
- PROP_ENTER[0] = 1;
- PROP_ENTER[1] = 1;
- PROP_ENTER[2] = 1;
- Delete3DTextLabel(g_prop_info[i][E_owner]);
- DestroyPickup(g_prop_info[i][E_pickup]);
- DeletePropertie(i);
- format(query, sizeof(query), "UPDATE properties SET enterx = 1, entery = 1, enterz = 1 WHERE pid = %d;",
- i);
- dbquery(g_server_info[E_global_db], query);
- return 1;
- }
- i++;
- }
- ERRORMSG(playerid, "Musisz stać w pobliży domu lub posiadłoci aby jš kupić!");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- #undef HOUSE_ENTER
- #undef PROP_ENTER
- }
- dcmd_sethomecarspawn(playerid, cmdtext[])
- {
- new
- Float:pos[4],
- hid;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "d", hid))
- return ERRORMSG(playerid, "WPISZ: /sethomecarspawn [home id]") & 1;
- if(g_house_info[hid][E_enter_pos][0] == 0)
- return ERRORMSG(playerid, "błędne id domu") & 1;
- GetVehiclePos(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), pos[3]);
- format(query, sizeof(query), "UPDATE houses SET carx = %f, cary = %f, carz = %f, \
- cara = %f WHERE hid = %d", pos[0], pos[1], pos[2], pos[3], hid);
- dbquery(g_server_info[E_global_db], query);
- format(ftext, sizeof(ftext), "Zmieniłe spawn pojazdu pod domem o ID: %d", hid);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_createinterior(playerid, cmdtext[])
- {
- new
- Float:pos[4],
- comm[60],
- iid;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "dffffs", iid, pos[0], pos[1], pos[2], pos[3], comm))
- return ERRORMSG(playerid, "WPISZ: /createinterior [interior] [X] [Y] [Z] [Angle] [komenatarz]") & 1;
- format(query, sizeof(query), "INSERT INTO interiors VALUES(NULL, %d, %f, %f, %f, %f, '%s');",
- iid, pos[0], pos[1], pos[2], pos[3], comm);
- dbquery(g_server_info[E_global_db], query);
- format(ftext, sizeof(ftext), "Dodałe interioro ID: %d (%f, %f, %f, %f)",
- iid, pos[0], pos[1], pos[2], pos[3]);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_createprop(playerid, cmdtext[])
- {
- new
- Float:pos[4],
- Float:pos2[4],
- DBResult:result,
- field[15],
- interior,
- i = 1,
- cost,
- type,
- payment,
- ecost;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "ddddd", type, interior, cost, payment, ecost))
- return ERRORMSG(playerid, "WPISZ: /createprop [typ] [interior id] [cena] [zysk] [zysk z wejscia]") & 1;
- if(interior == 0)
- return ERRORMSG(playerid, "błędny interior") & 1;
- if(cost <= 0)
- return ERRORMSG(playerid, "błędna cena") & 1;
- if(ecost <= 0)
- return ERRORMSG(playerid, "błędny zysk z wejcia") & 1;
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- format(query, sizeof(query), "SELECT x, y, z, a, interior FROM interiors WHERE intid = %d",
- interior);
- result = db_query(g_server_info[E_global_db], query);
- for(new f; f < 4; f++)
- {
- db_get_field(result, f, field, sizeof(field));
- pos2[f] = floatstr(field);
- }
- db_get_field(result, 4, field, sizeof(field));
- interior = strval(field);
- db_free_result(result);
- while(g_prop_info[i][E_enter_pos][0] && i < MAX_PROPERTIES)
- i++;
- format(query, sizeof(query), "INSERT INTO properties VALUES(NULL, 0, 'Na sprzedaż', %f, %f, %f, %f, %f, %f, %f, %f, %d, %d, %d, %d, %d, %d);",pos[0], pos[1], pos[2], pos[3], pos2[0], pos2[1], pos2[2], pos2[3], cost, interior, i, payment, type, ecost);
- dbquery(g_server_info[E_global_db], query);
- g_prop_info[i][E_pickup] = CreatePickup(1272, 23, pos[0], pos[1], pos[2]);
- g_prop_info[i][E_owner] = Create3DTextLabel("Na sprzedaż", COLOR_BLUE,
- pos[0], pos[1] + 0.2, pos[2] + 0.5, 15, 0);
- g_prop_info[i][E_enter_pos][0] = pos[0];
- g_prop_info[i][E_enter_pos][1] = pos[1];
- g_prop_info[i][E_enter_pos][2] = pos[2];
- g_prop_info[i][E_enter_pos][3] = pos[3];
- g_prop_info[i][E_exit_pos][0] = pos2[0];
- g_prop_info[i][E_exit_pos][1] = pos2[1];
- g_prop_info[i][E_exit_pos][2] = pos2[2];
- g_prop_info[i][E_exit_pos][3] = pos2[3];
- g_prop_info[i][E_cost] = cost;
- g_prop_info[i][E_payment] = payment;
- g_prop_info[i][E_type] = type;
- g_prop_info[i][E_e_payment] = ecost;
- g_prop_info[i][E_interior] = interior;
- g_prop_info[i][E_vworld] = i;
- SendClientMessage(playerid, COLOR_YELLOW, "Utworzyłe nowy biznes.");
- format(ftext, sizeof(ftext), "ID: %d Cena: %d$ Przydód: %d$", i, cost, payment);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_interiorslist(playerid, cmd[])
- {
- #pragma unused cmd
- new
- str[60],
- result_str[25],
- result_str2[25],
- DBResult:result;
- result = db_query(g_server_info[E_global_db], "SELECT intid, comm FROM interiors");
- SendClientMessage(playerid, COLOR_GREEN, "Lista interiorów:");
- if(!db_num_rows(result))
- return SendClientMessage(playerid, COLOR_YELLOW, "Brak") & 1;
- do
- {
- db_get_field(result, 0, result_str, sizeof(result_str));
- db_get_field(result, 1, result_str2, sizeof(result_str2));
- format(str, sizeof(str), "ID: %d Opis: %s", strval(result_str), result_str2);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- }
- while(db_next_row(result));
- db_free_result(result);
- return 1;
- }
- dcmd_getid(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- new id = GetHouseID(playerid);
- if(id > 0)
- format(ftext, sizeof(ftext), "ID domku to %d", id);
- else
- {
- id = GetPropertieID(playerid);
- if(id > 0)
- format(ftext, sizeof(ftext), "ID posiadłoci to %d", id);
- else
- return ERRORMSG(playerid, "Nie jeste w pobliżu domku/posiadłoci!") & 1;
- }
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_desynch(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /desynch [id]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- format(ftext, sizeof(ftext), "Zdesynchronizowałe gracza %s", PlayerName(id));
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- g_player_info[id][E_desynch] = true;
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_undesynch(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /undesynch [id]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- format(ftext, sizeof(ftext), "Przywróciłe synchronizacje gracza %s", PlayerName(id));
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- g_player_info[id][E_desynch] = false;
- return 1;
- }
- return ERRORMSG(playerid, "Brak uprawnień.") & 1;
- }
- dcmd_addad(playerid, cmdtext[])
- {
- new
- description[32],
- content[128];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "ss", description, content))
- return ERRORMSG(playerid, "WPISZ: /addad [opis] [tekst]") & 1;
- if(!CheckWrangSings(description) || !CheckWrangSings(content))
- {
- return ERRORMSG(playerid, "Znaki ' oraz \" sš niedozwolone.") & 1;
- }
- format(query, sizeof(query), "INSERT INTO ads (description, content) \
- VALUES ('%s', '%s')",
- description, content
- );
- dbquery(g_server_info[E_global_db], query);
- SendClientMessage(playerid, COLOR_GREEN, "Dodałe ogłoszenie.");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_adlist(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- new
- DBResult:result,
- id,
- field[32];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- result = db_query(g_server_info[E_global_db], "SELECT id, description \
- FROM ads");
- if(!db_num_rows(result))
- {
- SendClientMessage(playerid, COLOR_GREEN, "Brak ogłoszeń.");
- db_free_result(result);
- return 1;
- }
- SendClientMessage(playerid, COLOR_GREEN, "Lista ogłoszeń:");
- do
- {
- db_get_field(result, 0, field, sizeof(field));
- id = strval(field);
- db_get_field(result, 1, field, sizeof(field));
- format(ftext, sizeof(ftext), "%d. %s", id, field);
- SendClientMessage(playerid, COLOR_YELLOW, ftext);
- }
- while(db_next_row(result));
- db_free_result(result);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_delad(playerid, cmdtext[])
- {
- new
- id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- if(sscanf(cmdtext, "d", id))
- return ERRORMSG(playerid, "WPISZ: /delad [ID ogłoszenia]") & 1;
- format(query, sizeof(query), "DELETE FROM ads WHERE id = %d", id);
- dbquery(g_server_info[E_global_db], query);
- SendClientMessage(playerid, COLOR_GREEN, "Ogłoszenie usunięte.");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_adrotate(playerid, cmdtext[])
- {
- #pragma unused cmdtext
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 3)
- {
- UpdateAd();
- SendClientMessage(playerid, COLOR_GREEN, "Ogłoszenie zmienione.");
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_eject(playerid, cmdtext[])
- {
- new id;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "u", id))
- return ERRORMSG(playerid, "WPISZ: /eject [ID gracza]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza!") & 1;
- RemovePlayerFromVehicle(id);
- format(ftext, sizeof(ftext), "%s został wyrzucony z pojazdu przez %sa %s", PlayerName(id),
- AdminLevelName(g_player_info[playerid][E_admin_lvl]), PlayerName(playerid));
- SendClientMessageToAll(COLOR_BLUE, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_setskin(playerid, cmdtext[])
- {
- new id, skin;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "ud", id, skin))
- return ERRORMSG(playerid, "WPISZ /setskin [id gracza] [id skinu]") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- if(!IsValidSkin(skin))
- return ERRORMSG(playerid, "Niepoprawny skin") & 1;
- g_player_info[playerid][E_skin] = skin;
- SetPlayerSkin(playerid, skin);
- format(ftext, sizeof(ftext), "Zmieniłe skin graczowi %s (ID: %d) na %d",
- PlayerName(id), id, skin);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s zmienił Twój skin na %d.",
- PlayerName(playerid), skin);
- SendClientMessage(id, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_sl(playerid, cmdtext[])
- return dcmd_setloc(playerid, cmdtext);
- dcmd_setloc(playerid, cmdtext[])
- {
- new Float:locX, Float:locY, Float:locZ, /*locInt,*/ loc;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "d", loc))
- {
- GetPlayerPos(playerid, locX, locY, locZ);
- //locInt = GetPlayerInterior(playerid);
- SendClientMessage(playerid, COLOR_GREEN, "Zapisałe tymczasowš lokację");
- return 1;
- }
- if(loc < 1 || loc > 5)
- return ERRORMSG(playerid, "Błędne id lokacji (1-5)") & 1;
- new int, Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- int = GetPlayerInterior(playerid);
- format(query, sizeof(query), "INSERT OR REPLACE INTO locations \
- (id, x, y, z, interior) VALUES (%d, %f, %f, %f, %d)",
- loc, x, y, z, int);
- dbquery(g_server_info[E_global_db], query);
- format(ftext, sizeof(ftext), "Zapisałe lokację o id %d", loc);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_tpl(playerid, cmdtext[])
- return dcmd_teleportloc(playerid, cmdtext);
- dcmd_teleportloc(playerid, cmdtext[])
- {
- new Float:locX, Float:locY, Float:locZ, locInt, loc;
- new DBResult:result;
- new field[15];
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "d", loc))
- {
- SetPlayerPos(playerid, locX, locY, locZ);
- SetPlayerInterior(playerid, locInt);
- SendClientMessage(playerid, COLOR_GREEN, "Teleportowałe się do tymczasowej lokacji");
- return 1;
- }
- if(loc < 1 || loc > 5)
- return ERRORMSG(playerid, "Błędne id lokacji (1-5)") & 1;
- new int, Float:x, Float:y, Float:z;
- format(query, sizeof(query), "SELECT x, y, z, int FROM locations WHERE id = %d", loc);
- result = db_query(g_server_info[E_global_db], query);
- db_get_field(result, 0, field, sizeof(field));
- x = floatstr(field);
- db_get_field(result, 1, field, sizeof(field));
- y = floatstr(field);
- db_get_field(result, 2, field, sizeof(field));
- z = floatstr(field);
- db_get_field(result, 3, field, sizeof(field));
- int = strval(field);
- SetPlayerPos(playerid, x, y, z);
- SetPlayerInterior(playerid, int);
- format(ftext, sizeof(ftext), "Teleportowałe się do lokacji o id %d", loc);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_setvip(playerid, cmdtext[])
- {
- new id, status;
- static const status_text[2][] = { "zabrał", "nadał" };
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "ud", id, status) || (status != 0 && status != 1))
- return ERRORMSG(playerid, "WPISZ /setvip [id gracza] 0/1") & 1;
- if(!IsPlayerConnected(id))
- return ERRORMSG(playerid, "Błędne id gracza") & 1;
- g_player_info[id][E_vip] = bool:status;
- format(ftext, sizeof(ftext), "%se uprawnienia VIPa graczowi %s (ID: %d)",
- status_text[status], PlayerName(id), id);
- SendClientMessage(playerid, COLOR_GREEN, ftext);
- format(ftext, sizeof(ftext), "%s %s Ci uprawnienia VIPa",
- PlayerName(playerid), status_text[status]);
- SendClientMessage(id, COLOR_GREEN, ftext);
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
- dcmd_setmaxping(playerid, cmdtext[])
- {
- new max_ping;
- if(IsPlayerAdmin(playerid) || g_player_info[playerid][E_admin_lvl] >= 2)
- {
- if(sscanf(cmdtext, "d", max_ping))
- return ERRORMSG(playerid, "WPISZ /setmaxping [ping]") & 1;
- format(query, sizeof(query), "UPDATE config SET value = '%d' WHERE \
- name = 'maxping';", max_ping);
- dbquery(g_server_info[E_global_db], query);
- format(ftext, sizeof(ftext), "Maksymalny ping został zmieniony przez \
- %sa %s na %d", AdminLevelName(g_player_info[playerid][E_admin_lvl]),
- PlayerName(playerid), max_ping);
- SendClientMessageToAll(COLOR_BLUE, ftext);
- g_server_info[E_max_ping] = max_ping;
- return 1;
- }
- ERRORMSG(playerid, "Brak uprawnień!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement