Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Autor skryptu nieznany. Naprawiony przez Lord'a, zmodyfikowany przez D4M!4N0$'a.
- #include <a_samp>
- #include <dudb>
- #include <strtok>
- #pragma tabsize 0
- #define PL "VIP.txt"
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define ZIELONY 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define CZERWONY 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define kolor 0xFFFFFFFF
- #define COLOR_Limona 0xA7FF00FF
- #define COLOR_Pomarancz 0xE09C42FF
- #define COLOR_Niebieski 0x00E0DFFF
- #define COLOR_Rozowy 0xE05BDFFF
- #define ZOLTY 0xFFF146FF
- #define Czerwony 0xFF0000FF
- #define Jasny_blue 0x9BFFFFFF
- #define Jasny_roz 0xC78494FF
- #define Brazowy 0x985356EF
- #define BLEKITNY 0x009787A5
- #define Sraka 0xAA7C2ADD
- #define Morela 0xE4AE74FF
- #define Jasny_zielony 0x7FB459A4
- #define Blekit 0x23D6F5FF
- #define Trawiasty 0x95A96EB2
- #define COLOR_ORANGERED 0xE9370DFC
- #define COLOR_GOLD 0xDEAD4370
- #define COLOR_MEDIUMAQUA 0x83BFBFFF
- #define COLOR_BLUE 0x0000FFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_PURPLE 0x9900FFAA
- #define COLOR_ADMIN 0x993300AA
- #define COLOR_ORANGE 0xFF9933AA
- #define COLOR_CYAN 0x99FFFFAA
- #define COLOR_TAN 0xFFFFCCAA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_KHAKI 0x999900AA
- #define COLOR_LIME 0x99FF00AA
- #define COLOR_BLACK 0x000000AA
- #define POMARANCZOWY 0x00A3C0AA
- #define COLOR_LIGHTBLUE 0x00BFFFAA
- #define COLOR_GREENISHGOLD 0xCCFFDD56
- #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
- #define COLOR_LIGHTCYAN 0xAAFFCC33
- #define COLOR_LEMON 0xDDDD2357
- #define COLOR_LIGHTGREEN 0x7CFC00AA
- #define COLOR_WHITEYELLOW 0xFFE87DAA
- #define COLOR_BLUEAQUA 0x7E60FFAA
- #define COLOR_GREENYELLOWWHITE 0xCBFF45AA
- #define COLOR_DARKBLUE 0x15005EAA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIGHTRED 0xFF0000AA
- #define POL_CZERWONY 0xFF761AFF
- #define POL_ZOLTY 0xF5DC0BFF
- #define POL_ZIELONY 0x73C315FF
- #define POL_NIEBIESKI 0x209CF2FF
- #define CGREY 0xAFAFAFAA
- #define CGREEN 0x33AA33AA
- #define CRED 0xAA3333AA
- #define CYELLOW 0xFFFF00AA
- #define COLOR_BROWN 0xFFFFFFAA
- #define CBLUE 0x0000BBAA
- #define CLIGHTBLUE 0x33CCFFAA
- #define CORANGE 0xFF9900AA
- #define CG1 0xB4B5B7FF
- #define CG2 0xBFC0C2FF
- #define CG3 0xCBCCCEFF
- #define CG4 0xD8D8D8FF
- #define CG5 0xE3E3E3FF
- #define COLOR_VIOLET 0xF0F0F0FF
- #define COLOR_KREM 0x9ACD32AA
- #define CYELLOW2 0xF5DEB3AA
- #define CORANGE2 0xFFA500AA
- #define BIALY 0xE0FFFFAA
- new VIP[MAX_PLAYERS];
- new zxcvbvvcxz;
- new s[256];
- new warns[MAX_PLAYERS];
- new zpwarns = 2;
- new kickwarns = 3;
- new jailid[MAX_PLAYERS];
- new Float:xjail[MAX_PLAYERS], Float:yjail[MAX_PLAYERS], Float:zjail[MAX_PLAYERS];
- new playerColors[100] = {
- 0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,
- 0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,
- 0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,
- 0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,
- 0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,
- 0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,
- 0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,
- 0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,
- 0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,
- 0x3FE65CFF
- };
- public OnPlayerConnect(playerid){
- warns[playerid] = 0;
- VIP[playerid]=0;
- return 1;
- }
- public OnFilterScriptInit(){
- if(!dini_Exists(PL))dini_Create(PL);
- zxcvbvvcxz = dini_Int(PL,"haslo1");
- return true;
- }
- public OnPlayerDisconnect(playerid){
- VIP[playerid] = 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new tmp2[300];
- new idx,giveplayerid;
- new giveplayer[256];
- new sendername[256];
- new telename[MAX_PLAYER_NAME];
- new teleid;
- new tempstr[256];
- new Float:pX, Float:pY, Float:pZ;
- new cmd[256];
- new tmp[256];
- new string[256];
- cmd = strtok(cmdtext,idx);
- //============================================================
- if(!strcmp(cmd, "/daj-vipa", true) && IsPlayerAdmin(playerid) == 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)){
- SendClientMessage(playerid, BIALY, "Wpisz: /Daj-Vipa [id gracza]");
- return 1;
- }
- new gracz = strval(tmp);
- VIP[gracz]=1;
- SendClientMessage(playerid,ZOLTY,"VS: Zalogowałes Gracza Jako VIP ");
- SendClientMessage(gracz,POMARANCZOWY,"Admin Zalogował Cie Jako VIPa Serwera Wpisz /Vcmd By Ujzeć Komendy");
- return 1;
- }
- if(!strcmp(cmd, "/wez-vipa", true)&& IsPlayerAdmin(playerid) == 1){
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)){
- SendClientMessage(playerid, ZOLTY, "wpisz: /Wez-Vipa [id gracza]");
- return 1;
- }
- new gracz = strval(tmp);
- VIP[gracz] = 0;
- VIP[playerid]= 0;
- SendClientMessage(playerid,ZOLTY,"VS:Odebrales Graczowi Admina(ucznia)");
- SendClientMessage(gracz,POMARANCZOWY,"Admin Zabrał Ci VIPa na Serwerze!");
- return 1;
- }
- //============================================================
- if(!strcmp(cmd, "/vhaslo", true) && IsPlayerAdmin(playerid) == 1){
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, BIALY,"wpisz: /vhaslo [haslo]");
- zxcvbvvcxz = udb_hash(tmp);
- dini_IntSet(PL,"haslo1",udb_hash(tmp));
- format(string,256,"Haslo VIPa To -->> %s <<--",tmp);
- SendClientMessage(playerid,ZIELONY,string);
- return true;
- }
- if(!strcmp(cmd, "/vlogin", true)){
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))return SendClientMessage(playerid, BIALY,"wpisz: /vlogin [haslo]");
- if(udb_hash(tmp)==zxcvbvvcxz){
- VIP[playerid]=1;
- SendClientMessage(playerid, ZIELONY,"Zalogowany !");
- }else SendClientMessage(playerid,CZERWONY,"błedne haslo");
- return true;
- }
- if(strcmp(cmdtext, "/vipy", true) == 0){
- new PName[24];
- new zaproszeni;
- SendClientMessage(playerid, BLEKITNY, "VIPy Serwera:");
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && VIP[i])
- {
- GetPlayerName(i,PName,24);
- format(string,sizeof(string),"%s (ID: %d)", PName, i);
- SendClientMessage(playerid, BIALY, string);
- zaproszeni++;
- }
- }
- if(zaproszeni == 0){
- SendClientMessage(playerid, CZERWONY, "Aktualnie na Serverze Nie Ma VIPów!");
- }
- return 1;
- }
- if (strcmp(cmdtext, "/vip", true)==0){
- if (VIP[playerid]==1){
- SendClientMessage(playerid,BIALY,"=============================================");
- SendClientMessage(playerid,ZOLTY,"Komendy VIPów: /Vcmd /Vcmd2 /Vcmd3 ");
- SendClientMessage(playerid,ZOLTY,"Komendy dla Admina: /vadmin ");
- SendClientMessage(playerid,ZOLTY,"/Vlogin [Hasło] - Logujesz się na VIPa");
- SendClientMessage(playerid,ZOLTY,"Chat VIPów /v [tekst]");
- SendClientMessage(playerid,BIALY,"=============================================");
- }
- return 1;
- }
- if (strcmp(cmdtext, "/vadmin", true)==0 && IsPlayerAdmin(playerid)){
- SendClientMessage(playerid,BIALY,"=============================================");
- SendClientMessage(playerid,CZERWONY,"O to komendy które są Ci potrzebne jako adminowi");
- SendClientMessage(playerid,CZERWONY,"/Daj-Vipa [id gracza] - Dajesz VIPa graczowi");
- SendClientMessage(playerid,CZERWONY,"/Wez-Vipa [id gracza] - Odbierasz VIPa graczowi");
- SendClientMessage(playerid,CZERWONY,"/V-haslo [Haslo] - Zmieniasz hasło logowania na VIPa");
- dini_IntSet(PL,"haslo1",udb_hash(tmp));
- format(string,256,"Obecne hasło vipa to: -->> %s <<--",tmp);
- SendClientMessage(playerid,CZERWONY,tmp);
- SendClientMessage(playerid,BIALY,"=============================================");
- return 1;
- }
- if (strcmp(cmdtext, "/vcmd", true)==0){
- if (VIP[playerid]==1){
- SendClientMessage(playerid,ZIELONY,"Lista komend VIPa : Strona 1");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Givecash [id gracza] [suma] - Dajesz graczowi kase");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Settime [godzina] - Zmieniasz godzine na serwerze");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Tp [id gracza1] [do id gracza2] - Teleportujesz gracza1 do gracza2");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Tp-To [id gracza] - Teleportujesz się do gracza");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Heal [id gracza] - Uzdrawiasz gracza");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Heal-All - Uzdrawiasz wszystkich graczy");
- SendClientMessage(playerid,ZOLTY,"Aby zobaczyć następne komendy wpisz /Vcmd2");
- }
- return 1;
- }
- if (strcmp(cmdtext, "/vcmd2", true)==0){
- if (VIP[playerid]==1){
- SendClientMessage(playerid,ZIELONY,"Lista komend VIPa : Strona 2");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Ann [czas] [tekst] - Piszesz na środku ekranu");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Acolor [id gracza] [kolor(1-16)] - Zmieniasz graczowi kolor nicku");
- SendClientMessage(playerid,POMARANCZOWY,"/V [tekst] - Piszesz na chacie jako Vip");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Repair [id gracza] - Naprawiasz graczowi pojazd");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Repair-All - Naprawiasz pojazdy wszystkim graczom");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Armor [id gracza] - Dajesz graczowi pancerz");
- SendClientMessage(playerid,ZOLTY,"Aby zobaczyć następne komendy wpisz /Vcmd3");
- }
- return 1;
- }
- if (strcmp(cmdtext, "/vcmd3", true)==0){
- if (VIP[playerid]==1){
- SendClientMessage(playerid,ZIELONY,"Lista komend VIPa : Strona 3");
- SendClientMessage(playerid,POMARANCZOWY,"/Vwarn+ [ID Gracza] - Dajesz warna danemu graczowi");
- SendClientMessage(playerid,POMARANCZOWY,"/Vwarn- [ID Gracza] - Odbierasz warna danemu graczowi");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Armor-All - Dajesz pancerz każdemu");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Invisible - Stajesz się niewidzialny");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Visible - Stajesz się widzialny");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Jail [ID Gracza] - Zamykasz danego gracza");
- SendClientMessage(playerid,ZOLTY,"Aby zobaczyć następne komendy wpisz /Vcmd4");
- }
- return 1;
- }
- if (strcmp(cmdtext, "/vcmd4", true)==0){
- if (VIP[playerid]==1){
- SendClientMessage(playerid,ZIELONY,"Lista komend VIPa : Strona 4");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Unjail [ID Gracza] - Uwalniasz danego gracza");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Disarm-All - Zabierasz broń wszystkim graczom");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Jetpack - Dostajesz Jetpacka");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Freeze [ID Gracza] - Mrozisz danego gracza");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Unfreeze [ID Gracza] - Odmrażasz danego gracza");
- SendClientMessage(playerid,POMARANCZOWY,"/V-Freeze-All - Mrozisz wszystkich graczy");
- }
- return 1;
- }
- if(strcmp(cmd, "/v-freeze", true) == 0 && IsPlayerAdmin(playerid)) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "VIP: użyj /freeze [id gracza]");
- return 1;
- }
- giveplayerid = strval(tmp);
- if (IsPlayerConnected(giveplayerid)) {
- freezeid[giveplayerid] = 1;
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- TogglePlayerControllable(giveplayerid, 0);
- format(string, sizeof(string), "VIP %s (id:%d) zamrozil %s (id: %d).",PlayerName(playerid), playerid,giveplayer,giveplayerid);
- printf(string);
- format(string, sizeof(string), "VIP: %s (id: %d) został zamrozny", giveplayer,giveplayerid);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Zostałeś zamrozony przez VIPa %s (id: %d).", PlayerName(playerid),playerid);
- SendClientMessage(giveplayerid, COLOR_GREEN, string);
- }
- else {
- format(string, sizeof(string), "VIP: %d nie jest aktywnym graczem.", giveplayerid);
- SendClientMessage(playerid, COLOR_ADMIN, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/v-unfreeze", true) == 0 && IsPlayerAdmin(playerid)) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, " VIP: użyj /Unfreeze [ID gracza]");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(strval(tmp))) {
- SendClientMessage(playerid, COLOR_ADMIN, "Złe ID gracza");
- return 1;
- }
- if(!freezeid[giveplayerid]) {
- SendClientMessage(playerid, COLOR_ADMIN, "VIP: Ten gracz nie był zamrożony");
- return 1;
- }
- freezeid[giveplayerid] = 0;
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- TogglePlayerControllable(giveplayerid, 1);
- format(string, sizeof(string), "VIP %s (id:%d) odmrozil %s (id: %d)",PlayerName(playerid), playerid,giveplayer,giveplayerid);
- printf(string);
- format(string, sizeof(string), "VIP: %s (id: %d) został odmrozony.", giveplayer,giveplayerid);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Zostałeś odmrożony przez VIPa %s (id: %d).", PlayerName(playerid),playerid);
- SendClientMessage(giveplayerid, COLOR_GREEN, string);
- return 1;
- }
- if(strcmp(cmd, "/v-freeze-all", true) == 0 && IsPlayerAdmin(playerid))
- {
- gFreeze=1;
- for(new i = 0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(gFreezed[i] != 1)
- {
- TogglePlayerControllable(i, 0);
- gFreezed[i] = 1;
- }
- }
- }
- format(string, sizeof(string), "VIP %s (id:%d) zamroził wszystkich graczy",PlayerName(playerid),playerid);
- printf(string);
- format(tempstr, sizeof(tempstr), "VIP %s zamroził wszystkich graczy",GetPlayerNick(playerid));
- SendClientMessageToAll(COLOR_GREEN,tempstr);
- return 1;
- }
- if(strcmp(cmd, "/v-jetpack", true)==0) {
- if (VIP[playerid]){
- SetPlayerSpecialAction(playerid,2);
- SendClientMessage(playerid,COLOR_GREEN,"AS: Dostałeś JetPacka!");
- }
- return 1;
- }
- if(strcmp(cmdtext, "/v-disarm-all", true) == 0){
- if (VIP[playerid]){
- for(new i = 0; i < MAX_PLAYERS; i++) {
- ResetPlayerWeapons(i);
- }
- format(string, sizeof(string), "Admin %s (id:%d) rozbroil wszystkich graczy",PlayerName(playerid),playerid);
- printf(string);
- format(string, sizeof(string), "Admin %s rozbroil wszystkich graczy", PlayerName(playerid));
- SendClientMessageToAll(COLOR_GREEN, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/v-unjail", true) == 0) {
- if (VIP[playerid]){
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, " VIP: Wpisz /Unjail [ID gracza]");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(strval(tmp))) {
- SendClientMessage(playerid, COLOR_ADMIN, "VIP: Złe ID gracza");
- return 1;
- }
- if(!jailid[giveplayerid]) {
- SendClientMessage(playerid, COLOR_ADMIN, "VIP: Ten gracz nie był uwięziony");
- return 1;
- }
- jailid[giveplayerid] = 0;
- SetPlayerInterior(giveplayerid, 0);
- SetPlayerPos(giveplayerid, xjail[giveplayerid], yjail[giveplayerid] , zjail[giveplayerid]);
- format(string, sizeof(string), "%s (id: %d) zostal uwolniony przez VIPa %s (id:%d)", PlayerName(giveplayerid),giveplayerid,PlayerName(playerid),playerid);
- print(string);
- format(string, sizeof(string), "VIP: Uwolniles gracza %s", PlayerName(giveplayerid));
- SendClientMessage(playerid,COLOR_GREEN, string);
- format(string, sizeof(string), "VIP %s uwolnił cię z więzienia",PlayerName(playerid));
- SendClientMessage(giveplayerid, COLOR_GREEN,string);
- }
- return 1;
- }
- if(strcmp(cmd, "/v-jail", true) == 0) {
- if (VIP[playerid]){
- tmp = strtok(cmdtext, idx);
- giveplayerid = strval(tmp);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "VIP: Wpisz /jail [ID gracza]");
- return 1;
- }
- if (IsPlayerConnected(giveplayerid)) {
- jailid[giveplayerid] = 1;
- GetPlayerPos(giveplayerid, xjail[giveplayerid], yjail[giveplayerid] , zjail[giveplayerid]);
- SetPlayerInterior(giveplayerid,3);
- SetPlayerPos(giveplayerid,193.6751,175.0777,1003.023);
- format(string, sizeof(string), "%s (id: %d) zostal uwieziony przez VIPa %s (id:%d)", giveplayer,giveplayerid,PlayerName(playerid),playerid);
- print(string);
- format(string, sizeof(string), "VIP: Uwieziles gracza %s", PlayerName(giveplayerid));
- SendClientMessage(playerid,COLOR_GREEN, string);
- format(string, sizeof(string), "Zostales uwieziony przez VIPa %s", PlayerName(playerid));
- SendClientMessage(giveplayerid,COLOR_GREEN, string);
- } else {
- format(string, sizeof(string), "VIP: Złe ID gracza");
- SendClientMessage(playerid, COLOR_ADMIN, string);
- }
- }
- return 1;
- }
- if(strcmp(cmdtext, "/v-visible", true) == 0) {
- if (VIP[playerid]){
- {
- SetPlayerColor(playerid, playerColors[playerid]);
- SendClientMessage(playerid, playerColors[playerid],"AS: Stałeś sie widzialny");
- format(string, sizeof(string), "Admin %s (id:%d) stal sie widzialny",PlayerName(playerid), playerid);
- printf(string);
- }
- }
- return 1;
- }
- if(strcmp(cmdtext, "/v-invisible", true)==0) {
- if (VIP[playerid]){
- SetPlayerColor(playerid, 0xFFFFFF00);
- SendClientMessage(playerid, COLOR_GREEN,"VIP: stałeś się niewidzialny");
- format(string, sizeof(string), "VIP %s (id:%d) zrobil sie niewidzialnym",PlayerName(playerid),playerid);
- printf(string);
- }
- return 1;
- }
- if (strcmp("/warny", cmdtext, true, 10) == 0)
- {
- format(s, sizeof(s), "* Twoja ilość warnów to %d ! Zakaz pisania otrzymasz po 2, a kicka po 3!", warns[playerid]);
- SendClientMessage(playerid, COLOR_ORANGE, s);
- return 1;
- }
- if (strcmp("/vwarn+", cmd, true, 10) == 0)
- {
- if (VIP[playerid])
- {
- new warniq[256];
- warniq = strtok(cmdtext, idx);
- new idgracza = strval(warniq);
- if (!strlen(warniq))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Wpisz /warn+ [ID Gracza]!");
- return 1;
- }
- if (!IsPlayerConnected(idgracza))
- {
- SendClientMessage(playerid, COLOR_RED, "Gracza o tym ID nie ma na serwerze !");
- return 1;
- }
- warns[idgracza]++;
- SendClientMessage(playerid, COLOR_GREEN, "* Warn został przyznany ...");
- SendClientMessage(idgracza, COLOR_RED, "Vip Serwera dał Ci warna ! Aby sprawdzic swoje warny wpisz '/warny'");
- if (warns[playerid] == kickwarns)
- {
- format(s, sizeof(s), "* Zostałeś wyrzucony z serwera ponieważ Twoja ilość warnów to %d !", warns[idgracza]);
- SendClientMessage(idgracza, COLOR_GREY, s);
- Kick(idgracza);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "* Musisz być VIPem serwera aby użyć tej komendy !");
- }
- return 1;
- }
- if (strcmp("/vwarn-", cmd, true, 10) == 0)
- {
- if (VIP[playerid])
- {
- new warniq[256];
- warniq = strtok(cmdtext, idx);
- new idgracza = strval(warniq);
- if (!strlen(warniq))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Wpisz /warn- [ID Gracza]!");
- return 1;
- }
- if (!IsPlayerConnected(idgracza))
- {
- SendClientMessage(playerid, COLOR_RED, "* Gracza o tym ID nie ma na serwerze !");
- return 1;
- }
- warns[idgracza]--;
- SendClientMessage(playerid, COLOR_RED, "VIP odebrał Ci.");
- SendClientMessage(idgracza, COLOR_RED, "VIP zabrał Ci warna ! Aby sprawdzic swoje warny wpisz '/warny'");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "* Musisz być adminem serwera aby użyć tej komendy !");
- }
- return 1;
- }
- if (strcmp(cmd, "/v-givecash", true)==0 && VIP[playerid]) {
- new moneyplayer;
- new moneyplus;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v-givecash [ID gracza] [suma]");
- } else {
- moneyplayer = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, CZERWONY, "AS: Zła waluta");
- } else {
- moneyplus = strval(tmp);
- new kasa_gracza = GetPlayerMoney(moneyplayer);
- if(moneyplus<=30000 && kasa_gracza <= 50000){
- new moneyplayername[MAX_PLAYER_NAME];
- GetPlayerName(moneyplayer,moneyplayername,sizeof(moneyplayername));
- format(string, sizeof(string), "VIP %s (id:%d) dal %d$ graczowi %s (id: %d)",PlayerName(playerid),playerid, moneyplus, moneyplayername,giveplayerid);
- printf(string);
- format(string, sizeof(string), "VS: Dałeś %d$ graczowi %s",moneyplus, moneyplayername);
- SendClientMessage(playerid, ZIELONY, string);
- format(string, sizeof(string), "VIP %s dał ci %d$",PlayerName(playerid),moneyplus);
- SendClientMessage(moneyplayer, ZIELONY, string);
- GivePlayerMoney(moneyplayer, moneyplus);
- }else{
- SendClientMessage(playerid, CZERWONY, "Możesz dać po 30000 Max!");
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/v-settime", true)==0 && VIP[playerid]) {
- new newtime;
- tmp = strtok(cmdtext, idx);
- newtime = strval(tmp);
- if(!newtime) {
- SendClientMessage(playerid, BIALY, "VS: /v-settime [godzina]");
- }
- else if (newtime >24 || newtime <0) {
- SendClientMessage(playerid, ZIELONY, "VS: Zła godzina.");
- }
- else {
- format(string, sizeof(string), "VIP %s (id:%d) zmienil czas na %d:00",PlayerName(playerid), playerid,newtime);
- printf(string);
- format(tmp, sizeof(tmp), "Czas został zmieniony na %d:00 przez VIPa %s", newtime, PlayerName(playerid));
- SendClientMessageToAll(ZIELONY,tmp);
- SetWorldTime(newtime);
- }
- return true;
- }
- if(strcmp(cmd, "/v-tp", true) == 0 && VIP[playerid]) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v-tp [ID 1 gracza] [do ID 2 gracza]");
- return 1;
- }
- giveplayerid = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v-tp [ID 1 gracza] [do ID 2 gracza]");
- return 1;
- }
- teleid = strval(tmp);
- if (IsPlayerConnected(giveplayerid) && IsPlayerConnected(teleid)) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(teleid, telename, sizeof(telename));
- GetPlayerPos(teleid, pX,pY,pZ);
- new Interior;
- Interior = GetPlayerInterior(teleid);
- SetPlayerInterior(giveplayerid, Interior);
- SetPlayerPos(giveplayerid, pX,pY,pZ);
- format(string, sizeof(string), "VIP %s (id:%d) teleportowal %s (id: %d) do %s (id: %d)",PlayerName(playerid),playerid,giveplayer,giveplayerid,telename,teleid);
- printf(string);
- format(string, sizeof(string), "Teleportowałeś %s do %s", giveplayer,telename);
- SendClientMessage(playerid, ZIELONY, string);
- format(string, sizeof(string), "Zostałes teleportowany do %s",telename);
- SendClientMessage(giveplayerid, ZIELONY, string);
- format(string, sizeof(string), "Teleportowano do ciebie gracza: %s",giveplayer);
- SendClientMessage(teleid, ZIELONY, string);
- }
- if (!IsPlayerConnected(giveplayerid)) {
- format(string, sizeof(string), "VS: %d nie jest aktywnym graczem.", giveplayerid);
- SendClientMessage(playerid, CZERWONY, string);
- }
- if (!IsPlayerConnected(teleid)) {
- format(string, sizeof(string), "VS: %d nie jest aktywnym graczem.", teleid);
- SendClientMessage(playerid, CZERWONY, string);
- }
- return 1;
- }
- else if(strcmp(cmd, "/v-tp-to", true) == 0 && VIP[playerid]) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v-tp-to [id gracza]");
- } else {
- if(!IsPlayerConnected(strval(tmp))) {
- SendClientMessage(playerid, CZERWONY, "Złe ID gracza");
- } else {
- new Float:X;
- new Float:Y;
- new Float:Z;
- new Float:Angle;
- new Interior = GetPlayerInterior(strval(tmp));
- if(IsPlayerInAnyVehicle(playerid)) {
- new VehicleID;
- VehicleID = GetPlayerVehicleID(playerid);
- SetPlayerInterior(playerid, Interior);
- GetPlayerPos(strval(tmp),X,Y,Z);
- GetPlayerFacingAngle(strval(tmp),Angle);
- SetVehiclePos(VehicleID, X + 0.01, Y + 0.01, Z);
- SetPlayerFacingAngle(playerid,Angle);
- } else {
- GetPlayerPos(strval(tmp),X,Y,Z);
- SetPlayerInterior(playerid, Interior);
- GetPlayerFacingAngle(strval(tmp),Angle);
- SetPlayerFacingAngle(playerid,Angle);
- SetPlayerPos(playerid, X + 0.01, Y + 0.01, Z);
- }
- format(tempstr, sizeof(tempstr), "VIP %s teleportowal sie do ciebie",PlayerName(playerid));
- SendClientMessage(strval(tmp),ZIELONY, tempstr);
- format(tempstr, sizeof(tempstr), "VS: teleportowałeś się do %s Interior:%d",PlayerName(strval(tmp)), Interior);
- SendClientMessage(playerid,ZIELONY, tempstr);
- format(string, sizeof(string), "VIP %s (id:%d) teleportowal sie do gracza %s (id:%d) Interior:%d",PlayerName(playerid),playerid,GetPlayerNick(strval(tmp)),strval(tmp), Interior);
- printf(string);
- }
- }
- return 1;
- }
- if(strcmp(cmdtext,"/v-heal-all",true)==0 ) {
- if (!VIP[playerid]) {
- SendClientMessage(playerid,CZERWONY,"Nie jestes adminem");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++) {
- if (IsPlayerConnected(i)) {
- SetPlayerHealth(i,100.0);
- }
- }
- format(string, sizeof(string), "VIP %s (id:%d) uzdrowil wszystkich graczy",PlayerName(playerid),playerid);
- printf(string);
- format(string, sizeof(string), "VIP %s uzdrowil wszystkich graczy",PlayerName(playerid));
- SendClientMessageToAll(CZERWONY,string);
- return 1;
- }
- if(strcmp(cmd, "/v-heal", true) == 0 && VIP[playerid]) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v-heal [id gracza]");
- return 1;
- }
- giveplayerid = strval(tmp);
- if (IsPlayerConnected(giveplayerid)) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- SetPlayerHealth(giveplayerid, 100.0);
- format(string, sizeof(string), "VIP %s (id:%d) uzdrowil gracza %s (id: %d)",PlayerName(playerid),playerid,giveplayer,giveplayerid);
- printf(string);
- format(string, sizeof(string), "VS: Uzdrowiłeś garcza %s.", giveplayer,giveplayerid);
- SendClientMessage(playerid, ZIELONY, string);
- format(string, sizeof(string), "Zostałeś uzdrowiony przez VIPa %s (id: %d).", PlayerName(playerid),playerid);
- SendClientMessage(giveplayerid, ZIELONY, string);
- }
- else {
- format(string, sizeof(string), "AS: %d nie jest aktywnym graczem.", giveplayerid);
- SendClientMessage(playerid, CZERWONY, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/v-ann", true) == 0 && VIP[playerid])
- {
- new msg[256], seconds;
- seconds = strval(strtok(cmdtext,idx));
- if(seconds == 0)
- {
- SendClientMessage(playerid, BIALY,"VS: /v-ann [czas] [text]");
- return 1;
- }
- msg = strrest(cmdtext,idx);
- format(tmp,sizeof(tmp),"~r~(VIP)-~w~%s",msg);
- seconds = seconds * 1000;
- GameTextForAll(tmp,seconds,0);
- return 1;
- }
- if (strcmp(cmd, "/v-acolor", true)==0 && VIP[playerid]) {
- new colorplayer;
- new colorplayername[MAX_PLAYER_NAME];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid,BIALY, "VS: /v-acolor [ID gracza] [ID koloru]");
- } else {
- colorplayer = strval(tmp);
- }
- GetPlayerName(colorplayer,colorplayername,sizeof(colorplayername));
- tmp2 = strtok(cmdtext, idx);
- new color;
- color = strval(tmp2);
- if(color == 1){
- SetPlayerColor(colorplayer, COLOR_GREY);
- } else if(color == 2){
- SetPlayerColor(colorplayer, COLOR_LIGHTGREEN);
- } else if(color == 3){
- SetPlayerColor(colorplayer, COLOR_RED);
- } else if(color == 4){
- SetPlayerColor(colorplayer, COLOR_YELLOW);
- } else if(color == 5){
- SetPlayerColor(colorplayer, COLOR_WHITE);
- } else if(color == 6){
- SetPlayerColor(colorplayer, COLOR_BLUE);
- } else if(color == 7){
- SetPlayerColor(colorplayer, COLOR_ORANGE);
- } else if(color == 8){
- SetPlayerColor(colorplayer, COLOR_PINK);
- } else if(color == 9){
- SetPlayerColor(colorplayer, 0xFFFFFF00);
- } else if(color == 10){
- SetPlayerColor(colorplayer, COLOR_VIOLET);
- } else if(color == 11){
- SetPlayerColor(colorplayer, COLOR_BLACK);
- } else if(color == 12){
- SetPlayerColor(colorplayer, COLOR_BROWN);
- } else if(color == 13){
- SetPlayerColor(colorplayer, COLOR_LIGHTBLUE);
- } else if(color == 14){
- SetPlayerColor(colorplayer, COLOR_GREEN);
- } else if(color == 15){
- SetPlayerColor(colorplayer, COLOR_KREM);
- } else if(color == 16){
- SetPlayerColor(colorplayer, COLOR_ADMIN);
- } else {
- SendClientMessage(playerid, COLOR_ADMIN, "Zły ID koloru: ID (od 1 do 16)");
- }
- format(string, sizeof(string), "VS: Zmieniłeś kolor graczowi %s na: %d",PlayerName(strval(tmp)), color);
- SendClientMessage(playerid,ZIELONY,string);
- format(string, sizeof(string), "VIP %s zmienil ci kolor na: %d",PlayerName(playerid), color);
- SendClientMessage(strval(tmp),ZIELONY,string);
- format(string, sizeof(string), "VIP %s (id:%d) zmienil kolor (id:%d) graczowi %s (id:%d)",PlayerName(playerid), playerid, color, GetPlayerNick(strval(tmp)),strval(tmp));
- printf(string);
- return 1;
- }
- if (strcmp(cmd, "/v", true)==0 && VIP[playerid]) {
- strmid(tmp,cmdtext,6,strlen(cmdtext));
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "AS: /v [text]");
- return 1;
- }
- format(string, sizeof(string), "* VIP: %s", tmp);
- SendClientMessageToAll(BLEKITNY, string);
- return 1;
- }
- if (strcmp(cmd, "/v", true)==0 && VIP[playerid] == 1 || strcmp(cmd, "/v", true)==0 && IsPlayerAdmin(playerid) == 1) {
- strmid(tmp,cmdtext,4,strlen(cmdtext));
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v [text]");
- return 1;
- }
- format(string, sizeof(string), "(VIP) %s: %s",PlayerName(playerid), tmp);
- SendClientMessageToVIP(POMARANCZOWY, string);
- return 1;
- }
- if(strcmp(cmdtext,"/v-repair-all",true)==0) {
- if (!VIP[playerid]) {
- SendClientMessage(playerid,0xAA3333AA,"Nie jestes VIP");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++) {
- if (IsPlayerConnected(i)) {
- SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
- }
- }
- format(string, sizeof(string), "VIP %s (id:%d) naprawił pojazdy wszystkim graczom",PlayerName(playerid),playerid);
- printf(string);
- format(string, sizeof(string), "VIP %s naprawił pojazdy wszystkim graczom",PlayerName(playerid));
- SendClientMessageToAll(ZIELONY,string);
- return 1;
- }
- if(strcmp(cmd, "/v-repair", true) == 0 && VIP[playerid]) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, BIALY, "VS: /v-repair [id gracza]");
- return 1;
- }
- giveplayerid = strval(tmp);
- if (IsPlayerConnected(giveplayerid)) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- SetVehicleHealth(GetPlayerVehicleID(giveplayerid), 1000.0);
- format(string, sizeof(string), "VIP %s (id:%d) naprawił pojazd graczowi %s (id: %d)",PlayerName(playerid),playerid,giveplayer,giveplayerid);
- printf(string);
- format(string, sizeof(string), "VS: Naprawiłeś pojazd graczowi %s.", giveplayer,giveplayerid);
- SendClientMessage(playerid, ZIELONY, string);
- format(string, sizeof(string), "VIP %s (id: %d) naprawił ci pojazd.", PlayerName(playerid),playerid);
- SendClientMessage(giveplayerid, ZIELONY, string);
- }
- else {
- format(string, sizeof(string), "VS: %d nie jest aktywnym graczem.", giveplayerid);
- SendClientMessage(playerid, CZERWONY, string);
- }
- return 1;
- }
- if(strcmp(cmdtext, "/v-armor", true)==0)
- {
- if (!VIP[playerid]) return SendClientMessage(playerid, CZERWONY,"Nie jestes VIPem!");
- SetPlayerArmour(playerid, 100.0);
- format(string, sizeof(string), "VIP %s (id:%d) dostal pancerz",PlayerName(playerid),playerid);
- printf(string);
- SendClientMessage(playerid, ZIELONY,"VS: Dostałeś pancerz!");
- return 1;
- }
- if(strcmp(cmdtext,"/v-armor-all",true)==0) {
- if (!VIP[playerid]) {
- SendClientMessage(playerid,CZERWONY,"Nie jestes VIPem!");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++) {
- if (IsPlayerConnected(i)) {
- SetPlayerArmour(i,100.0);
- }
- }
- format(string, sizeof(string), "VIP %s (id:%d) dal pancerz wszystkim graczom",PlayerName(playerid),playerid);
- printf(string);
- format(string, sizeof(string), "VIP %s dal pancerz wszystkim graczom",PlayerName(playerid));
- SendClientMessageToAll(ZIELONY,string);
- return 1;
- }
- return 0;
- }
- PlayerName(playerid){
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- return Name;
- }
- GetPlayerNick(playerid){
- new Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- return Name;
- }
- strrest(const string[], index)
- {
- new length = strlen(string),offset = index,result[256];
- while ((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r'))
- {
- result[index - offset] = string[index];index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- SendClientMessageToVIP(color, const zmienna[]) {
- for(new a=0; a<MAX_PLAYERS; a++) {
- if(IsPlayerConnected(a)) {
- if(VIP[a] || IsPlayerAdmin(a)) {
- SendClientMessage(a, color, zmienna);
- }
- }
- }
- }
- public OnPlayerText(playerid, text[])
- {
- if (warns[playerid] == zpwarns)
- {
- format(s, sizeof(s), "Zostałeś zbanowany na chat'cie ponieważ Twoja ilość warnów to %d / %d / %d !", warns[playerid], zpwarns, kickwarns);
- SendClientMessage(playerid, COLOR_RED, s);
- return 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement