Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <Dini>
- //------------------------------------------------------------------------------
- enum vInfo
- {
- Vip,
- Float:vX,
- Float:vY,
- Float:vZ
- }
- //------------------------------------------------------------------------------
- new VipInfo[MAX_PLAYERS][vInfo];
- new God[MAX_PLAYERS];
- new VGod[MAX_PLAYERS];
- new Text:Textdraw[11];
- //------------------------------------------------------------------------------
- CMD:setvip(playerid, params[])
- {
- new ID, Nivel, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[144], file[50];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- if(sscanf(params, "ui", ID, Nivel)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/SetVip [Jucător ID] [Nivel]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
- if(Nivel > 3 || Nivel < 1) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nivel invalid. [1-3]");
- if(Nivel == VipInfo[ID][Vip]) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul acela are deja acel nivel de {FF0000}VIP.");
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(ID, pname, sizeof(pname));
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Administrator-ul {FF0000}%s {FFFFFF}te-a făcut VIP: {FF0000}%i.", name, Nivel);
- SendClientMessage(ID, -1, string);
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}L-ai făcut pe {FF0000}%s {FFFFFF}VIP: {FF0000}%i.", pname, Nivel);
- SendClientMessage(playerid, -1, string);
- format(file, sizeof(file), "Vip/%s.ini", pname);
- if(!fexist(file))
- {
- dini_Create(file);
- dini_Set(file, "Nume", pname);
- dini_Set(file, "Facut de", name);
- dini_IntSet(file, "Nivel", Nivel);
- }
- else
- {
- dini_Set(file, "Nume", pname);
- dini_Set(file, "Facut de", name);
- dini_IntSet(file, "Nivel", Nivel);
- }
- VipInfo[ID][Vip] = Nivel;
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:scoatevip(playerid, params[])
- {
- new ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], string[144], file[50];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/ScoateVip [Jucător ID]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
- if(VipInfo[ID][Vip] == 0) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul acela nu are {FF0000}VIP.");
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(ID, pname, sizeof(pname));
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}I-ai scos VIP-ul lui {FF0000}%s.", pname);
- SendClientMessage(playerid, -1, string);
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Administrator-ul {FF0000}%s {FFFFFF}ti-a scos {FF0000}VIP-ul.", name);
- SendClientMessage(ID, -1, string);
- VipInfo[ID][Vip] = 0;
- format(file, sizeof(file), "Vip/%s.ini", pname);
- if(fexist(file))
- {
- dini_Remove(file);
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vcmds(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 1)
- {
- new Dialog[1500];
- strcat(Dialog, "{FF0000}Nivel {15FF00}1;\n\n", sizeof(Dialog));
- strcat(Dialog, "{FFCC33}(/V)chat {FFFFFF}- Vorbesti cu ceilalti Vipi in chat.\n");
- strcat(Dialog, "{FFCC33}/VKill {FFFFFF}- Te sinucizi.\n");
- strcat(Dialog, "{FFCC33}/VSpawnMe {FFFFFF}- Te respawmezi într-un loc aleatoriu.\n");
- strcat(Dialog, "{FFCC33}/VNos {FFFFFF}- Primesti {15FF00]'NOS' {FFFFFF}la masina ta.\n");
- strcat(Dialog, "{FFCC33}/VCC {FFFFFF}- Schimbi culorile masinii tale.\n");
- strcat(Dialog, "{FFCC33}/VSave {FFFFFF}- Salvează pozitia.\n");
- strcat(Dialog, "{FFCC33}/VLoad {FFFFFF}- Te teleportezi la pozitia salvată.\n");
- strcat(Dialog, "{FFCC33}/VCMC {FFFFFF}- Stergi chat-ul tău.\n");
- strcat(Dialog, "{FFCC33}/VSkin {FFFFFF}- Schimbi skin-ul în cel dorit de tine.\n");
- strcat(Dialog, "{FFCC33}/VMasina {FFFFFF}- Spawmezi masina dorită cu culorile dorite.\n\n");
- strcat(Dialog, "{FF0000}Nivel {15FF00}2;\n\n", sizeof(Dialog));
- strcat(Dialog, "{FFCC33}/VName {FFFFFF}- Îti schimbi numele în altul dorit de tine.\n");
- strcat(Dialog, "{FFCC33}/VHeal {FFFFFF}- Primesti viată.\n");
- strcat(Dialog, "{FFCC33}/VArmour {FFFFFF}- Primesti armură.\n");
- strcat(Dialog, "{FFCC33}/VGoto {FFFFFF}- Te teleportezi la un jucător.\n");
- strcat(Dialog, "{FFCC33}/VWW {FFFFFF}- Primesti un set de arme.\n");
- strcat(Dialog, "{FFCC33}/VColor {FFFFFF}- Schimbi culoarea numelui tău.\n");
- strcat(Dialog, "{FFCC33}/VJetpack {FFFFFF}- Primesti un Jetpack.\n\n");
- strcat(Dialog, "{FF0000}Nivel {15FF00}3;\n\n", sizeof(Dialog));
- strcat(Dialog, "{FFCC33}/VGod {FFFFFF}- Activezi/Dezactivezi modul {FF0000}'God'.\n");
- strcat(Dialog, "{FFCC33}/VGodCar {FFFFFF}- Activezi/Dezactivezi modul {FF0000}'God' {FFFFFF}la masină.\n");
- strcat(Dialog, "{FFCC33}/VipPack {FFFFFF}- Primesti pachetul {15FF00}VIP.\n");
- ShowPlayerDialog(playerid, 3000, DIALOG_STYLE_MSGBOX, "Comenzi VIP", Dialog, "Iesi", "");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vchat(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 1)
- {
- new name[MAX_PLAYER_NAME], string[75];
- GetPlayerName(playerid, name, sizeof(name));
- if(isnull(params)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}(/v)chat [Text]");
- format(string, sizeof(string), "{FF0000}[VIP]: {FFCC33}%s: {FF0000}%s", name, params);
- TrimiteMesajLaVipi(-1, string);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:v(playerid, params[]) return cmd_vchat(playerid, params);
- //------------------------------------------------------------------------------
- CMD:vspawn(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 1)
- {
- SpawnPlayer(playerid);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Te-ai respawmat într-un loc aleatoriu.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vkill(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 1)
- {
- SetPlayerHealth(playerid, 0.0);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Te-ai sinucis.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vnos(playerid, params[])
- {
- new veh;
- veh = GetPlayerVehicleID(playerid);
- if(VipInfo[playerid][Vip] >= 1)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Trebuie să fii într-un vehicul.");
- AddVehicleComponent(veh, 1010);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai adăugat {15FF00}'NOS' {FFFFFF}la masina ta.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vcc(playerid, params[])
- {
- new veh, Culoare1, Culoare2, string[100];
- veh = GetPlayerVehicleID(playerid);
- if(VipInfo[playerid][Vip] >= 1)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Trebuie să fii într-un vehicul.");
- if(sscanf(params, "dd", Culoare1, Culoare2)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VCC [Culoare 1] [Culoare 2]");
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Ti-ai schimbat culorile masinii tale in: {FF0000}%d, %d.", Culoare1, Culoare2);
- SendClientMessage(playerid, -1, string);
- ChangeVehicleColor(veh, Culoare1, Culoare2);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vsave(playerid, params[])
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- if(VipInfo[playerid][Vip] >= 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Pozitie salvată.");
- VipInfo[playerid][vX] = X;
- VipInfo[playerid][vY] = Y;
- VipInfo[playerid][vZ] = Z;
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vload(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Pozitie loaded.");
- SetPlayerPos(playerid, VipInfo[playerid][vX], VipInfo[playerid][vY], VipInfo[playerid][vZ]);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vcmc(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 1)
- {
- for(new i = 0; i < 50; i++) SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Chat-ul tău a fost sters.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vskin(playerid, params[])
- {
- new Skin, string[100];
- if(VipInfo[playerid][Vip] >= 1)
- {
- if(sscanf(params, "i", Skin)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VSkin [Skin ID]");
- if(Skin > 299) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Skin invalid. [0 - 299]");
- if(GetPlayerSkin(playerid) == Skin) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Ai deja acest skin.");
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Skin-ul tău a fost schimbat în: {FF0000}%i{FFFFFF}.", Skin);
- SendClientMessage(playerid, -1, string);
- SetPlayerSkin(playerid, Skin);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vmasina(playerid, params[])
- {
- new Model, Float:X, Float:Y, Float:Z, Float:A, Culoare1, Culoare2, string[144];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(VipInfo[playerid][Vip] >= 1)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Esti deja într-o masină.");
- if(sscanf(params, "idd", Model, Culoare1, Culoare2)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VMasina [Model ID] [Culoare 1] [Culoare 2]");
- if(Model > 611 || Model < 411) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Model invalid. [411 - 611]");
- AddStaticVehicle(Model, X, Y, Z, A, Culoare1, Culoare2);
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Ai spawmat o masină: {FF0000}%i {FFFFFF}cu culorile {FF0000}%d, %d.", Model, Culoare1, Culoare2);
- SendClientMessage(playerid, -1, string);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vname(playerid, params[])
- {
- new name[24], oldfile[50], newfile[50], pname[MAX_PLAYER_NAME], string[100];
- GetPlayerName(playerid, pname, sizeof(pname));
- if(VipInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VName [Nume Nou]");
- format(oldfile, sizeof(oldfile), "Vip/%s.ini", pname);
- format(newfile, sizeof(newfile), "Vip/%s.ini", name);
- if(fexist(oldfile))
- {
- dini_Remove(oldfile);
- }
- if(fexist(newfile)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Numele este deja luat.");
- dini_Create(newfile);
- dini_Set(newfile, "Nume", name);
- dini_IntSet(newfile, "Vip", VipInfo[playerid][Vip]);
- SetPlayerName(playerid, name);
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Ti-ai schimbat numele în: {FF0000}%s{FFFFFF}.", name);
- SendClientMessage(playerid, -1, string);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vheal(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 2)
- {
- SetPlayerHealth(playerid, 100);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ai primit viată.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:varmour(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 2)
- {
- SetPlayerArmour(playerid, 100);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ai primit armură.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vgoto(playerid, params[])
- {
- new Float:X, Float:Y, Float:Z, Float:A, string[144], ID, name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
- if(VipInfo[playerid][Vip] >= 2)
- {
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/VGoto [Jucător ID]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
- if(ID == playerid) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu te poti teleporta la tine însusi.");
- GetPlayerPos(ID, X, Y, Z);
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(ID, pname, sizeof(pname));
- GetPlayerFacingAngle(ID, A);
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, A);
- SetPlayerInterior(playerid, GetPlayerInterior(ID));
- SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Te-ai teleportat la: {FF0000}%s.", pname);
- SendClientMessage(playerid, -1, string);
- format(string, sizeof(string), "{FF0000}[VIP]: {FFFFFF}Vip-ul: {FF0000}%s {FFFFFF}s-a teleportat la tine.", name);
- SendClientMessage(ID, -1, string);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vww(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 2)
- {
- Arme(playerid);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vcolor(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 2)
- {
- ShowPlayerDialog(playerid, 3001, DIALOG_STYLE_LIST, "Culoare", "{FF0000}Rosu\n{0066CC}Albastru\n{FFFF00}Galben\n{15FF00}Verde\n{FFFFFF}Alb", "Selecteaza", "Iesi");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vjetpack(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 2)
- {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai spawmat un Jetpack.");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vgod(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 3)
- {
- if(God[playerid] == 0)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai activat modul {FF0000}God.");
- God[playerid] = 1;
- SetPlayerHealth(playerid, 100000);
- }
- else if(God[playerid] == 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God.");
- God[playerid] = 0;
- SetPlayerHealth(playerid, 100);
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vgodcar(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 3)
- {
- if(VGod[playerid] == 0)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai activat modul {FF0000}God {FFFFFF}la masină.");
- VGod[playerid] = 1;
- SetVehicleHealth(playerid, 100000);
- }
- else if(VGod[playerid] == 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God {FFFFFF}la masină.");
- VGod[playerid] = 0;
- SetVehicleHealth(playerid, 100);
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vippack(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 3)
- {
- Arme(playerid);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:vipmenu(playerid, params[])
- {
- if(VipInfo[playerid][Vip] >= 3)
- {
- ArataMeniu(playerid);
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu esti autorizat să folosesti această comandă.");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- stock LoadVIP(playerid)
- {
- new name[MAX_PLAYER_NAME], file[50];
- GetPlayerName(playerid, name, sizeof(name));
- format(file, sizeof(file), "Vip/%s.ini", name);
- if(fexist(file))
- {
- VipInfo[playerid][Vip] = dini_Int(file, "Nivel");
- }
- printf("VIP STATUS: %s LOADED.", name);
- return 1;
- }
- //------------------------------------------------------------------------------
- stock Arme(playerid)
- {
- GivePlayerWeapon(playerid, 24, 9999);
- GivePlayerWeapon(playerid, 28, 9999);
- GivePlayerWeapon(playerid, 30, 9999);
- GivePlayerWeapon(playerid, 34, 9999);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Ai primit pachetul cu arme.");
- }
- //------------------------------------------------------------------------------
- stock SeteazaVIP(playerid, nivel)
- {
- VipInfo[playerid][Vip] = nivel;
- return 1;
- }
- //------------------------------------------------------------------------------
- stock TrimiteMesajLaVipi(culoare, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(VipInfo[i][Vip] >= 1)
- {
- SendClientMessage(culoare, culoare, string);
- }
- }
- }
- }
- //------------------------------------------------------------------------------
- stock GetPlayerVip(playerid)
- {
- new vrank[100];
- switch(VipInfo[playerid][Vip])
- {
- case 3: vrank = "Gold VIP";
- case 2: vrank = "Silver VIP";
- case 1: vrank = "VIP";
- default: vrank = "Nimic";
- }
- return vrank;
- }
- //------------------------------------------------------------------------------
- stock EsteJucatorulVip(playerid)
- {
- if(VipInfo[playerid][Vip] >= 1) return true;
- else return false;
- }
- //------------------------------------------------------------------------------
- stock ArataMeniu(playerid)
- {
- TextDrawShowForPlayer(playerid, Textdraw[0]);
- TextDrawShowForPlayer(playerid, Textdraw[1]);
- TextDrawShowForPlayer(playerid, Textdraw[2]);
- TextDrawShowForPlayer(playerid, Textdraw[3]);
- TextDrawShowForPlayer(playerid, Textdraw[4]);
- TextDrawShowForPlayer(playerid, Textdraw[5]);
- TextDrawShowForPlayer(playerid, Textdraw[6]);
- TextDrawShowForPlayer(playerid, Textdraw[7]);
- TextDrawShowForPlayer(playerid, Textdraw[8]);
- TextDrawShowForPlayer(playerid, Textdraw[9]);
- SelectTextDraw(playerid, 0xFFFFFFFF);
- }
- //------------------------------------------------------------------------------
- stock InchideMeniu(playerid)
- {
- TextDrawHideForPlayer(playerid, Textdraw[0]);
- TextDrawHideForPlayer(playerid, Textdraw[1]);
- TextDrawHideForPlayer(playerid, Textdraw[2]);
- TextDrawHideForPlayer(playerid, Textdraw[3]);
- TextDrawHideForPlayer(playerid, Textdraw[4]);
- TextDrawHideForPlayer(playerid, Textdraw[5]);
- TextDrawHideForPlayer(playerid, Textdraw[6]);
- TextDrawHideForPlayer(playerid, Textdraw[7]);
- TextDrawHideForPlayer(playerid, Textdraw[8]);
- TextDrawHideForPlayer(playerid, Textdraw[9]);
- CancelSelectTextDraw(playerid);
- }
- //------------------------------------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- LoadVIP(playerid);
- VGod[playerid] = 0;
- God[playerid] = 0;
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 3001)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerColor(playerid, 0xFF0000FF);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {FF0000}setata.");
- }
- if(listitem == 1)
- {
- SetPlayerColor(playerid, 0x0066CCFF);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {0066CC}setata.");
- }
- if(listitem == 2)
- {
- SetPlayerColor(playerid, 0xFFFF00FF);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {FFFF00}setata.");
- }
- if(listitem == 3)
- {
- SetPlayerColor(playerid, 0x15FF00FF);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare {15FF00}setata.");
- }
- if(listitem == 4)
- {
- SetPlayerColor(playerid, 0xFFFFFFFF);
- SendClientMessage(playerid, -1, "{FF0000}[VIP]: {FFFFFF}Culoare setata.");
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- if(clickedid == Textdraw[3])
- {
- SetPlayerHealth(playerid, 100);
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ai primit viată.");
- }
- else if(clickedid == Textdraw[4])
- {
- SetPlayerArmour(playerid, 100);
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ai primit armură.");
- }
- else if(clickedid == Textdraw[5])
- {
- Arme(playerid);
- }
- else if(clickedid == Textdraw[6])
- {
- if(God[playerid] == 0)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai activat modul {FF0000}God.");
- God[playerid] = 1;
- SetPlayerHealth(playerid, 100000);
- }
- else if(God[playerid] == 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God.");
- God[playerid] = 0;
- SetPlayerHealth(playerid, 100);
- }
- }
- else if(clickedid == Textdraw[7])
- {
- if(VGod[playerid] == 0)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai activat modul {FF0000}God {FFFFFF}la masină.");
- VGod[playerid] = 1;
- SetVehicleHealth(playerid, 100000);
- }
- else if(VGod[playerid] == 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai dezactivat modul {FF0000}God {FFFFFF}la masină.");
- VGod[playerid] = 0;
- SetVehicleHealth(playerid, 100);
- }
- }
- else if(clickedid == Textdraw[8])
- {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- SendClientMessage(playerid, -1, "{FF0000}[VIP MENU]: {FFFFFF}Ti-ai spawmat un Jetpack.");
- }
- else if(clickedid == Textdraw[9])
- {
- InchideMeniu(playerid);
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- public OnPlayerText(playerid, text[])
- {
- new name[MAX_PLAYER_NAME], string[100];
- GetPlayerName(playerid, name, sizeof(name));
- if(VipInfo[playerid][Vip] >= 1)
- {
- format(string, sizeof(string), "{FF0000}[VIP]: {15FF00}%s: {FFFFFF}%s", name, text);
- SendClientMessageToAll(-1, string);
- return 1;
- }
- return 0;
- }
- //------------------------------------------------------------------------------
- public OnFilterScriptInit()
- {
- Textdraw[0] = TextDrawCreate(649.999938, 150.086700, "usebox");
- TextDrawLetterSize(Textdraw[0], 0.000000, 33.117408);
- TextDrawTextSize(Textdraw[0], 381.999969, 0.000000);
- TextDrawAlignment(Textdraw[0], 1);
- TextDrawColor(Textdraw[0], 0);
- TextDrawUseBox(Textdraw[0], true);
- TextDrawBoxColor(Textdraw[0], 255);
- TextDrawSetShadow(Textdraw[0], 0);
- TextDrawSetOutline(Textdraw[0], 0);
- TextDrawFont(Textdraw[0], 0);
- Textdraw[1] = TextDrawCreate(429.600067, 150.826629, "Meniu VIP");
- TextDrawLetterSize(Textdraw[1], 0.660399, 2.861866);
- TextDrawAlignment(Textdraw[1], 1);
- TextDrawColor(Textdraw[1], 16777215);
- TextDrawSetShadow(Textdraw[1], 0);
- TextDrawSetOutline(Textdraw[1], 1);
- TextDrawBackgroundColor(Textdraw[1], 51);
- TextDrawFont(Textdraw[1], 2);
- TextDrawSetProportional(Textdraw[1], 1);
- Textdraw[2] = TextDrawCreate(546.400085, 178.453323, "by HY.");
- TextDrawLetterSize(Textdraw[2], 0.449999, 1.600000);
- TextDrawAlignment(Textdraw[2], 1);
- TextDrawColor(Textdraw[2], -1);
- TextDrawSetShadow(Textdraw[2], 0);
- TextDrawSetOutline(Textdraw[2], 1);
- TextDrawBackgroundColor(Textdraw[2], 51);
- TextDrawFont(Textdraw[2], 2);
- TextDrawSetProportional(Textdraw[2], 1);
- Textdraw[3] = TextDrawCreate(394.400085, 221.759994, "- Viata");
- TextDrawLetterSize(Textdraw[3], 0.562799, 2.182400);
- TextDrawAlignment(Textdraw[3], 1);
- TextDrawColor(Textdraw[3], -1);
- TextDrawSetShadow(Textdraw[3], 0);
- TextDrawSetOutline(Textdraw[3], 1);
- TextDrawBackgroundColor(Textdraw[3], 51);
- TextDrawFont(Textdraw[3], 2);
- TextDrawSetProportional(Textdraw[3], 1);
- TextDrawSetSelectable(Textdraw[3], true);
- Textdraw[4] = TextDrawCreate(391.200012, 250.880035, "- Armura");
- TextDrawLetterSize(Textdraw[4], 0.504399, 1.906133);
- TextDrawAlignment(Textdraw[4], 1);
- TextDrawColor(Textdraw[4], -1);
- TextDrawSetShadow(Textdraw[4], 0);
- TextDrawSetOutline(Textdraw[4], 1);
- TextDrawBackgroundColor(Textdraw[4], 51);
- TextDrawFont(Textdraw[4], 2);
- TextDrawSetProportional(Textdraw[4], 1);
- TextDrawSetSelectable(Textdraw[4], true);
- Textdraw[5] = TextDrawCreate(390.400146, 280.746734, "- Arme");
- TextDrawLetterSize(Textdraw[5], 0.535600, 1.891200);
- TextDrawAlignment(Textdraw[5], 1);
- TextDrawColor(Textdraw[5], -1);
- TextDrawSetShadow(Textdraw[5], 0);
- TextDrawSetOutline(Textdraw[5], 1);
- TextDrawBackgroundColor(Textdraw[5], 51);
- TextDrawFont(Textdraw[5], 2);
- TextDrawSetProportional(Textdraw[5], 1);
- TextDrawSetSelectable(Textdraw[5], true);
- Textdraw[6] = TextDrawCreate(390.399993, 311.359985, "- God Mode");
- TextDrawLetterSize(Textdraw[6], 0.502000, 1.995733);
- TextDrawAlignment(Textdraw[6], 1);
- TextDrawColor(Textdraw[6], -1);
- TextDrawSetShadow(Textdraw[6], 0);
- TextDrawSetOutline(Textdraw[6], 1);
- TextDrawBackgroundColor(Textdraw[6], 51);
- TextDrawFont(Textdraw[6], 2);
- TextDrawSetProportional(Textdraw[6], 1);
- TextDrawSetSelectable(Textdraw[6], true);
- Textdraw[7] = TextDrawCreate(392.799896, 342.719940, "- God Mode la masina");
- TextDrawLetterSize(Textdraw[7], 0.479599, 1.913600);
- TextDrawAlignment(Textdraw[7], 1);
- TextDrawColor(Textdraw[7], -1);
- TextDrawSetShadow(Textdraw[7], 0);
- TextDrawSetOutline(Textdraw[7], 1);
- TextDrawBackgroundColor(Textdraw[7], 51);
- TextDrawFont(Textdraw[7], 2);
- TextDrawSetProportional(Textdraw[7], 1);
- TextDrawSetSelectable(Textdraw[7], true);
- Textdraw[8] = TextDrawCreate(393.600036, 376.319946, "- Jetpack");
- TextDrawLetterSize(Textdraw[8], 0.509200, 2.003199);
- TextDrawAlignment(Textdraw[8], 1);
- TextDrawColor(Textdraw[8], -1);
- TextDrawSetShadow(Textdraw[8], 0);
- TextDrawSetOutline(Textdraw[8], 1);
- TextDrawBackgroundColor(Textdraw[8], 51);
- TextDrawFont(Textdraw[8], 2);
- TextDrawSetProportional(Textdraw[8], 1);
- TextDrawSetSelectable(Textdraw[8], true);
- Textdraw[9] = TextDrawCreate(520.000366, 425.599945, "Inchide");
- TextDrawLetterSize(Textdraw[9], 0.552400, 2.189866);
- TextDrawAlignment(Textdraw[9], 1);
- TextDrawColor(Textdraw[9], -5963521);
- TextDrawSetShadow(Textdraw[9], 0);
- TextDrawSetOutline(Textdraw[9], 1);
- TextDrawBackgroundColor(Textdraw[9], 51);
- TextDrawFont(Textdraw[9], 2);
- TextDrawSetProportional(Textdraw[9], 1);
- TextDrawSetSelectable(Textdraw[9], true);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement