Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf2>
- #include <pawn.cmd>
- #include <dof2>
- #define GOLD 0xEEC900FF
- #define SILVER 0x9C9C9CFF
- #define BRONZE 0x8B5A2BFF
- #define COR_VIP 0x008B00FF
- #define RED 0xFF030FFF
- #define ORANGE 0xF97804FF
- #define GREY 0xCECECEFF
- #define DIALOG_VIPS 4995
- #define DIALOG_VENC_VIP 4996
- #define DIALOG_COMMANDS_VIP 4997
- #define DIALOG_EFECTS 4998
- #define DIALOG_TOYS 4999
- #define DIALOG_ENABLE_KEY 5000
- #define DIALOG_NEW_KEY 5001
- #define DIALOG_NEW_KEY_LEVEL 5005
- #define DIALOG_NEW_KEY_DAYS 5002
- #define DIALOG_KEY_CONFIRM 5003
- #define DIALOG_REMOVE_KEY 5004
- enum pInfo
- {
- Vip,
- DaysVip,
- TimeVip,
- vKey[25],
- vDays,
- vLevel,
- vName,
- bool:GotKit,
- bool:GotColete
- };
- new PlayerInfo[MAX_PLAYERS][pInfo], Timer, CarsCreated[100], AllCars = 0;
- public OnFilterScriptInit()
- {
- print("------ System C-VIP v2.0 loaded successfully. ------");
- print("------------ Created by: Cleyson Stein. ------------");
- Timer = SetTimer("CheckVip", 60000, true);
- return 1;
- }
- public OnFilterScriptExit()
- {
- KillTimer(Timer);
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- GetPlayerName(playerid, PlayerInfo[playerid][vName], 24);
- new var[40];
- format(var, sizeof(var), "cVIP/Vips/%s.ini", PlayerInfo[playerid][vName]);
- if(DOF2_FileExists(var))
- {
- PlayerInfo[playerid][Vip] = DOF2_GetInt(var, "Level");
- PlayerInfo[playerid][DaysVip] = DOF2_GetInt(var, "Days");
- PlayerInfo[playerid][TimeVip] = DOF2_GetInt(var, "TimeVip");
- } else {
- PlayerInfo[playerid][Vip] = 0;
- PlayerInfo[playerid][DaysVip] = 0;
- PlayerInfo[playerid][TimeVip] = 0;
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(PlayerInfo[playerid][Vip] > 0)
- {
- new var[40];
- format(var, sizeof(var), "cVIP/Vips/%s.ini", PlayerInfo[playerid][vName]);
- if(!DOF2_FileExists(var)) DOF2_CreateFile(var);
- DOF2_SetInt(var, "Level", PlayerInfo[playerid][Vip]);
- DOF2_SetInt(var, "Days", PlayerInfo[playerid][DaysVip]);
- DOF2_SetInt(var, "TimeVip", PlayerInfo[playerid][TimeVip]);
- DOF2_SaveFile();
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(PlayerInfo[playerid][GotKit] == true) LiberarKit(playerid);
- if(PlayerInfo[playerid][GotColete] == true) LiberarColete(playerid);
- return 1;
- }
- SetVip(playerid, Level, Days)
- {
- new stringV[70];
- if(PlayerInfo[playerid][Vip] > 0)
- {
- format(stringV, sizeof stringV, "C-VIP: Your VIP has been renewed. + %d days. Level: %d.", Days, Level);
- PlayerInfo[playerid][TimeVip] += Days;
- PlayerInfo[playerid][DaysVip] += Days;
- PlayerInfo[playerid][Vip] = Level;
- } else {
- format(stringV, sizeof stringV, "C-VIP: Your VIP has been activated. %d days. Level: %d. /CommandsVip", Days, Level);
- PlayerInfo[playerid][TimeVip] = Days;
- PlayerInfo[playerid][DaysVip] = Days;
- PlayerInfo[playerid][Vip] = Level;
- }
- SendClientMessage(playerid, COR_VIP, stringV);
- return 1;
- }
- RemoveVip(playerid)
- {
- PlayerInfo[playerid][TimeVip] = 0;
- PlayerInfo[playerid][Vip] = 0;
- PlayerInfo[playerid][DaysVip] = 0;
- SendClientMessage(playerid, COR_VIP, "C-VIP: Your VIP days have come to an end. To renew acquire a new VIP key.");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case DIALOG_NEW_KEY:
- {
- if(!response) return 1;
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_NEW_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nPlease enter a valid new key\n{FFFF00}Letters and numbers are accepted:\n\n", "Create", "Cancel");
- format(PlayerInfo[playerid][vKey], 50, inputtext);
- new Dialog[128];
- format(Dialog, sizeof Dialog, "{FFFFFF}Your new VIP code: {DE3A3A}%s\n\n{FFFFFF}Now let us know how many VIP days:", PlayerInfo[playerid][vKey]);
- ShowPlayerDialog(playerid, DIALOG_NEW_KEY_DAYS, DIALOG_STYLE_INPUT, "KEYS VIP", Dialog, "Create", "Cancel");
- }
- case DIALOG_NEW_KEY_DAYS:
- {
- if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "ERROR: Enter a number of valid days.");
- if(strval(inputtext) <= 0) return SendClientMessage(playerid, RED, "ERROR: Can not create a Key with 0 days vips.");
- PlayerInfo[playerid][vDays] = strval(inputtext);
- new Dialog[170];
- format(Dialog, sizeof Dialog, "{FFFFFF}Your new VIP code: {DE3A3A}%s\n{FFFFFF}Venc: {DE3A3A}%d days\n\n{FFFFFF}Now let us know the level of the VIP key: {DE3A3A}1 a 3", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDays]);
- ShowPlayerDialog(playerid, DIALOG_NEW_KEY_LEVEL, DIALOG_STYLE_INPUT, "KEYS VIP", Dialog, "Create", "Cancel");
- }
- case DIALOG_NEW_KEY_LEVEL:
- {
- if(!IsNumeric(inputtext)) return SendClientMessage(playerid, RED, "ERROR: Enter a valid amount of level 1 a 3.");
- if(strval(inputtext) < 1 || strval(inputtext) > 3) return SendClientMessage(playerid, RED, "ERROR: Enter a valid amount of level 1 a 3.");
- PlayerInfo[playerid][vLevel] = strval(inputtext);
- new Dialog[190];
- format(Dialog, sizeof Dialog, "{FFFFFF}Your new key information:\n\nCode: {DE3A3A}%s\n{FFFFFF}Venc: {DE3A3A}%d days\n{FFFFFF}Level: {DE3A3A}%d\n\n{FFFFFF}Want to create ?", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDays], PlayerInfo[playerid][vLevel]);
- ShowPlayerDialog(playerid, DIALOG_KEY_CONFIRM, DIALOG_STYLE_MSGBOX, "KEYS VIP", Dialog, "Yes", "No");
- }
- case DIALOG_KEY_CONFIRM:
- {
- if(!response) return 1;
- new var[40];
- format(var, sizeof(var), "cVIP/Keys/%s.ini", PlayerInfo[playerid][vKey]);
- if(DOF2_FileExists(var)) return SendClientMessage(playerid, RED, "ERROR: Existing key.");
- DOF2_CreateFile(var);
- DOF2_SetString(var, "Key", PlayerInfo[playerid][vKey]);
- DOF2_SetInt(var, "Days", PlayerInfo[playerid][vDays]);
- DOF2_SetInt(var, "Level", PlayerInfo[playerid][vLevel]);
- DOF2_SaveFile();
- new MsgKeyVip[70];
- SendClientMessage(playerid, ORANGE, "KEY: New Key VIP created.");
- format(MsgKeyVip, sizeof MsgKeyVip, "KEY: [%s] - DAYS: [%d] - LEVEL: [%d]", PlayerInfo[playerid][vKey], PlayerInfo[playerid][vDays], PlayerInfo[playerid][vLevel]);
- SendClientMessage(playerid, ORANGE, MsgKeyVip);
- }
- case DIALOG_REMOVE_KEY:
- {
- new var[40];
- format(var, sizeof(var), "cVIP/Keys/%s.ini", inputtext);
- if(!DOF2_FileExists(var)) return SendClientMessage(playerid, RED, "ERROR: Key not existent.");
- DOF2_RemoveFile(var);
- DOF2_SaveFile();
- new MsgKeyVip[60];
- format(MsgKeyVip, sizeof MsgKeyVip, "ADMIN: Key %s has been successfully removed.", inputtext);
- SendClientMessage(playerid, ORANGE, MsgKeyVip);
- }
- case DIALOG_ENABLE_KEY:
- {
- new var[40];
- format(var, sizeof(var), "cVIP/Keys/%s.ini", inputtext);
- if(!DOF2_FileExists(var)) return SendClientMessage(playerid, RED, "ERROR: Key not existent.");
- new ValueDays = DOF2_GetInt(var, "Days");
- new Level = DOF2_GetInt(var, "Level");
- SetVip(playerid, Level, ValueDays);
- DOF2_RemoveFile(var);
- DOF2_SaveFile();
- }
- case DIALOG_TOYS:
- {
- if(!response) return 1;
- SendClientMessage(playerid, COR_VIP, "C-VIP: Use /ttoy to remove the toy.");
- GameTextForPlayer(playerid, "~g~/ttoy", 2000, 3);
- switch(listitem)
- {
- case 0: SetPlayerAttachedObject(playerid, 0, 19330, 2, 0.166000, -0.038999, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- case 1: SetPlayerAttachedObject(playerid, 0, 19161, 2, 0.078999, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- case 2: SetPlayerAttachedObject(playerid, 0, 18639, 2, 0.131000, 0.019000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- case 3: SetPlayerAttachedObject(playerid, 0, 18638, 2, 0.148999, 0.031000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- case 4: SetPlayerAttachedObject(playerid, 0, 18939, 2, 0.164000, 0.001999, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- case 5: SetPlayerAttachedObject(playerid, 0, 19488, 2, 0.121999, 0.000000, -0.005999, -83.199966, 98.200027, -2.500000, 1.000000, 1.000000, 1.000000);
- case 6: SetPlayerAttachedObject(playerid, 0, 19352, 2, 0.106999, 0.016000, -0.010999, 4.500000, 82.099990, -3.100001, 1.000000, 1.000000, 1.000000);
- case 7: SetPlayerAttachedObject(playerid, 0, 19090, 2, -0.315999, 0.019999, 0.030000, 0.000000, 0.000000, 0.000000, 1.455999, 0.526000, 0.541000);
- case 8: SetPlayerAttachedObject(playerid, 0, 19424, 2, 0.070999, -0.026000, -0.002000, -85.299987, 1.600005, -99.500000, 0.944001, 0.915000, 0.809999);
- case 9: SetPlayerAttachedObject(playerid, 0, 19078, 1, -1.000000,-0.517000,0.000000,0.000000,0.299999,10.499994,8.673998,9.400999,7.410993);
- case 10: SetPlayerAttachedObject(playerid,0, 19078, 4, -0.067000,0.053999,0.018000,-168.400039,-169.800003,-2.800000,1.000000,1.000000,1.000000);
- case 11: SetPlayerAttachedObject(playerid,0, 19085, 2, 0.090999,0.035000,-0.015000,106.599983,83.199996,0.800003,1.000000,1.000000,1.000000);
- case 12: SetPlayerAttachedObject(playerid,1, 19086, 15, 0.051000,0.000000,-0.424999,0.000000,0.000000,-102.100006,1.000000,1.000000,1.000000);
- case 13: SetPlayerAttachedObject(playerid,0, 19137, 2, 0.101000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
- case 14: SetPlayerAttachedObject(playerid,0, 19137, 15, 0.040999,0.000000,-0.130000,-86.300003,106.100013,-96.100051,7.741999,4.874000,5.584998);
- case 15: SetPlayerAttachedObject(playerid,0, 19315, 1, -0.247999,0.509999,-0.015999,4.300004,86.900024,85.500015,3.010000,4.463000,3.824000);
- case 16: SetPlayerAttachedObject(playerid,0, 19314, 2, 0.157000,0.000000,0.000000,-0.199999,-7.600006,-88.599998,1.000000,1.000000,1.000000);
- case 17: SetPlayerAttachedObject(playerid,0, 19314, 2, 0.157000,0.000000,0.000000,1.400000,-7.600006,-28.599973,0.711000,0.919999,0.361999);
- case 18: SetPlayerAttachedObject(playerid,0, 19320, 2, 0.000000,0.000000,0.000000,4.299999,72.999992,3.199999,3.594999,3.787999,4.951001);
- case 19: SetPlayerAttachedObject(playerid,0, 18963, 2, 0.261000,0.084999,0.004999,4.999999,85.400039,84.699974,2.097000,2.627000,3.033999);
- case 20: SetPlayerAttachedObject(playerid,0, 1607, 2, 0.267000,0.000000,0.000000,-0.199999,81.199996,-3.499999,1.135000,1.000000,1.126999);
- case 21: SetPlayerAttachedObject(playerid,0, 1608, 1, 0.000000,0.000000,0.000000,0.499999,89.200042,0.199999,1.000000,1.000000,1.000000);
- case 22: SetPlayerAttachedObject(playerid,0, 1609, 1, -0.358000,0.000000,0.170000,0.000000,93.099998,0.000000,1.427000,1.509000,1.641000);
- case 23: SetPlayerAttachedObject(playerid,0, 16442, 15, 0.000000,0.000000,0.259000,0.000000,0.000000,-104.400001,1.000000,1.000000,1.000000);
- case 24: SetPlayerAttachedObject(playerid,1, 373, 1, 0.33, -0.029, -0.15, 65, 25, 35);
- case 25: SetPlayerAttachedObject(playerid,1, 1240, 1, 0.15, 0.17, 0.06, 0.0, 90.0, 0.0);
- case 26: SetPlayerAttachedObject(playerid,1, 1252, 1, 0.1, -0.2, 0.0, 0.0, 90.0, 0.0);
- case 27: SetPlayerAttachedObject(playerid,1, 356, 1, -0.2, -0.15, 0.0, 0.0, 24.0, 0.0);
- case 28: SetPlayerAttachedObject(playerid,1 ,359, 15 ,-0.02 ,0.08 ,-0.3 ,0 ,50 ,-10);
- case 29: SetPlayerAttachedObject(playerid,0, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
- case 30: SetPlayerAttachedObject(playerid,0 ,1852 ,2 ,0.1 ,0 ,-0.01 ,0 ,15 ,0);
- case 31: SetPlayerAttachedObject(playerid,1, 1654, 1, 0.1,0.20,0.0,180.0,100.0,0.0);
- }
- }
- case DIALOG_EFECTS:
- {
- if(!response) return 1;
- SendClientMessage(playerid, COR_VIP, "C-VIP: Use /teffect to remove the effects.");
- GameTextForPlayer(playerid, "~g~/teffect", 2000, 3);
- switch(listitem)
- {
- case 0: SetPlayerAttachedObject(playerid,1,18688,1,-0.895839,0.631365,-1.828601,21.642332,7.385670,13.958697,1.232679,1.000000,1.090367); // fire - Bruno
- case 1: SetPlayerAttachedObject(playerid,1,18742,1,0.036487,-1.759890,1.772809,225.616638,1.132580,0.677276,1.000000,1.000000,1.000000); // water_speed - explosaoaquatica
- case 2: SetPlayerAttachedObject(playerid,1,18864,1,2.178843,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // FakeSnow1 - neve
- case 3: SetPlayerAttachedObject(playerid,1,867,1,-0.213616,-0.444311,0.070721,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // p_rubble04col - pedras
- case 4: SetPlayerAttachedObject(playerid,1,1254,1,0.448984,0.065604,0.006619,4.313228,89.284942,0.000000,1.000000,1.000000,1.000000); // killfrenzy - caveira
- case 5: SetPlayerAttachedObject(playerid,1,1242,1,0.090351,0.088730,-0.000036,0.000000,89.157951,0.000000,1.619548,1.000000,1.348966); // bodyarmour - colete
- case 6: SetPlayerAttachedObject(playerid,1,18735,1,0.000000,-0.479024,-1.590823,0.000000,0.000000,0.000000,13.498819,1.000000,0.678294); // vent2 - fumaçao
- case 7: SetPlayerAttachedObject(playerid,1,19065,15,-0.025,-0.04,0.23,0,0,270,2,2,2); // Toca de Natal
- case 8:
- {
- SetPlayerAttachedObject(playerid,1,18688,1,-0.895839,0.631365,-1.828601,21.642332,7.385670,13.958697,1.232679,1.000000,1.090367); // fire - Bruno
- SetPlayerAttachedObject(playerid,2,1254,1,0.448984,0.065604,0.006619,4.313228,89.284942,0.000000,1.000000,1.000000,1.000000); // killfrenzy - caveira
- }
- case 9:
- {
- SetPlayerAttachedObject(playerid,1,1242,1,0.090351,0.088730,-0.000036,0.000000,89.157951,0.000000,1.619548,1.000000,1.348966); // bodyarmour - colete
- SetPlayerAttachedObject(playerid,2,18735,1,0.000000,-0.479024,-1.590823,0.000000,0.000000,0.000000,13.498819,1.000000,0.678294); // vent2 - fumaçao
- }
- case 10:
- {
- SetPlayerAttachedObject(playerid,1,867,1,-0.213616,-0.444311,0.070721,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // p_rubble04col - pedras
- SetPlayerAttachedObject(playerid,2,18742,1,0.036487,-1.759890,1.772809,225.616638,1.132580,0.677276,1.000000,1.000000,1.000000); // water_speed - explosaoaquatica
- }
- case 11:
- {
- SetPlayerAttachedObject(playerid,1,19065,15,-0.025,-0.04,0.23,0,0,270,2,2,2); // Toca de Natal
- SetPlayerAttachedObject(playerid,2,18864,1,2.178843,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); // FakeSnow1 - neve
- }
- }
- }
- }
- return 1;
- }
- forward CheckVip();
- public CheckVip()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][Vip] == 1)
- {
- if(PlayerInfo[i][TimeVip] > 0)
- {
- PlayerInfo[i][TimeVip] = gettime() - ExpireVIP(i);
- } else {
- RemoveVip(i);
- }
- }
- }
- return 1;
- }
- ExpireVIP(playerid)
- {
- new Dias = PlayerInfo[playerid][DaysVip] * 86400; // 86400 == 24horas
- return Dias;
- }
- IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
- LiberarKit(playerid)
- {
- SendClientMessage(playerid, COR_VIP, "C-VIP: You can get your KIT-VIP again!");
- PlayerInfo[playerid][GotKit] = false;
- }
- LiberarColete(playerid)
- {
- SendClientMessage(playerid, COR_VIP, "C-VIP: You can already get your VIP ARMOUR again!");
- PlayerInfo[playerid][GotColete] = false;
- }
- VerificarNivelVip(playerid, lvl)
- {
- if(PlayerInfo[playerid][Vip] < lvl)
- {
- new MsgErro[50];
- format(MsgErro, sizeof(MsgErro), "ERROR: Command unavailable. Vip %d+", lvl);
- SendClientMessage(playerid, RED, MsgErro);
- return 0;
- }
- return 1;
- }
- PosicaoFrentePlayer(playerid, &Float:x, &Float:y, Float:distance)
- {
- new Float:a;
- GetPlayerPos( playerid, x, y, a);
- GetPlayerFacingAngle( playerid, a);
- if(GetPlayerVehicleID( playerid ))
- {
- GetVehicleZAngle(GetPlayerVehicleID( playerid ), a);
- }
- x += (distance * floatsin(-a, degrees));
- y += (distance * floatcos(-a, degrees));
- }
- ShowToys(playerid)
- {
- new string[1700];
- strcat(string, "{FFFF00}-{FFFFFF} Firefighter's Hat {0088FF}Slot 1 \n"); // 0
- strcat(string, "{FFFF00}-{FFFFFF} Police Hat {0088FF}Slot 1 \n"); // 1
- strcat(string, "{FFFF00}-{FFFFFF} Michael Jackson Hat {0088FF}Slot 1 \n"); // 2
- strcat(string, "{FFFF00}-{FFFFFF} Worker Hat {0088FF}Slot 1 \n"); // 3
- strcat(string, "{FFFF00}-{FFFFFF} Funkeiro Hat{0088FF}Slot 1 \n"); // 4
- strcat(string, "{FFFF00}-{FFFFFF} Old Hat {0088FF}Slot 1 \n"); // 5
- strcat(string, "{FFFF00}-{FFFFFF} Harry Potter Hat {0088FF}Slot 1 \n"); // 6
- strcat(string, "{FFFF00}-{FFFFFF} Kidnapping bag {0088FF}Slot 1 \n");// 7
- strcat(string, "{FFFF00}-{FFFFFF} Headphones {0088FF}Slot 1 \n");// 8
- strcat(string, "{FFFF00}-{FFFFFF} Big parrot {0088FF}Slot 1 \n");// 9
- strcat(string, "{FFFF00}-{FFFFFF} Small parrot {0088FF}Slot 2 \n");// 10
- strcat(string, "{FFFF00}-{FFFFFF} Pirate's eye cap {0088FF}Slot 2 \n");// 11
- strcat(string, "{FFFF00}-{FFFFFF} Dildo {0088FF}Slot 2\n");// 12
- strcat(string, "{FFFF00}-{FFFFFF} Cockerel head {0088FF}Slot 1 \n");// 13
- strcat(string, "{FFFF00}-{FFFFFF} Giant cock head Slot 1 \n");// 14
- strcat(string, "{FFFF00}-{FFFFFF} Cervo {0088FF}Slot 1 \n");// 15
- strcat(string, "{FFFF00}-{FFFFFF} Horn of ox 1 {0088FF}Slot 1 \n");// 16
- strcat(string, "{FFFF00}-{FFFFFF} Horn of ox 2 {0088FF}Slot 1 \n");// 17
- strcat(string, "{FFFF00}-{FFFFFF} Pumpkin {0088FF}Slot 1 \n");// 18
- strcat(string, "{FFFF00}-{FFFFFF} Head to CJ {0088FF}Slot 1 \n"); // 19
- strcat(string, "{FFFF00}-{FFFFFF} Dolphin {0088FF}Slot 1 \n"); // 20
- strcat(string, "{FFFF00}-{FFFFFF} Shark {0088FF}Slot 1 \n"); // 21
- strcat(string, "{FFFF00}-{FFFFFF} Turtle {0088FF}Slot 1 \n"); // 22
- strcat(string, "{FFFF00}-{FFFFFF} Cow {0088FF}Slot 1 \n"); // 23
- strcat(string, "{FFFF00}-{FFFFFF} Armour {0088FF}Slot 2 \n");// 24
- strcat(string, "{FFFF00}-{FFFFFF} Heart in the chest {0088FF}Slot 2 \n");// 25
- strcat(string, "{FFFF00}-{FFFFFF} C4 {0088FF}Slot 2 \n");// 26
- strcat(string, "{FFFF00}-{FFFFFF} M4 {0088FF}Slot 2 \n");// 27
- strcat(string, "{FFFF00}-{FFFFFF} Bazzuka {0088FF}Slot 2 \n");// 28
- strcat(string, "{FFFF00}-{FFFFFF} Santa's toque {0088FF}Slot 1 \n");// 29
- strcat(string, "{FFFF00}-{FFFFFF} Given in the head {0088FF}Slot 1 \n");// 30
- strcat(string, "{FFFF00}-{FFFFFF} C4 {0088FF}Slot 2 \n");// 31
- ShowPlayerDialog(playerid, DIALOG_TOYS, DIALOG_STYLE_LIST, "C-VIP: Select to add to your skin:", string, "APLIC", "EXIT");
- return 1;
- }
- ShowEfects(playerid)
- {
- new string[800];
- strcat(string, "{FFFF00}-{FFFFFF} Fire on Skin {0088FF}Slot 1\n"); // 0
- strcat(string, "{FFFF00}-{FFFFFF} Aquatic Explosion {0088FF}Slot 1\n"); // 1
- strcat(string, "{FFFF00}-{FFFFFF} Snow {0088FF}Slot 1\n"); // 2
- strcat(string, "{FFFF00}-{FFFFFF} Stones {0088FF}Slot 1\n"); // 3
- strcat(string, "{FFFF00}-{FFFFFF} Skull {0088FF}Slot 1\n"); // 4
- strcat(string, "{FFFF00}-{FFFFFF} Armour {0088FF}Slot 1\n"); // 5
- strcat(string, "{FFFF00}-{FFFFFF} Smoke {0088FF}Slot 1\n"); // 6
- strcat(string, "{FFFF00}-{FFFFFF} Christmas cap {0088FF}Slot 1\n");// 7
- strcat(string, "{FFFF00}-{FFFFFF} Skull and Fire {0088FF}Slot 1 e 2\n");// 8
- strcat(string, "{FFFF00}-{FFFFFF} Armour and Smoke {0088FF}Slot 1 e 2\n");// 9
- strcat(string, "{FFFF00}-{FFFFFF} Stones and Aquatic Explosion {0088FF}Slot 1 e 2\n");// 10
- strcat(string, "{FFFF00}-{FFFFFF} Christmas and Snow Cap {0088FF}Slot 1 e 2\n");// 11
- ShowPlayerDialog(playerid, DIALOG_EFECTS, DIALOG_STYLE_LIST, "C-VIP: Select to add to your skin:", string, "APLIC", "EXIT");
- return 1;
- }
- forward SendVipMessageToAll(playerid, const string[]);
- public SendVipMessageToAll(playerid, const string[])
- {
- switch(PlayerInfo[playerid][Vip])
- {
- case 1: SendClientMessageToAll(BRONZE, string);
- case 2: SendClientMessageToAll(SILVER, string);
- case 3: SendClientMessageToAll(GOLD, string);
- }
- return 1;
- }
- forward ChatVIP(const string[]);
- public ChatVIP(const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][Vip] > 0)
- {
- switch(PlayerInfo[i][Vip])
- {
- case 1: SendClientMessage(i, BRONZE, string);
- case 2: SendClientMessage(i, SILVER, string);
- case 3: SendClientMessage(i, GOLD, string);
- }
- }
- }
- return 1;
- }
- // ==================== Commands VIP level 1
- CMD:commandsvip(playerid)
- {
- new String[800];
- strcat(String, "{FFFFFF}.: COMMANDS VIP {8B5A2B}BRONZE{FFFFFF} :.\n\n");
- strcat(String, "{8B5A2B} /v {FFFFFF}- Speak in VIP mode\n");
- strcat(String, "{8B5A2B} /cv {FFFFFF}- Speak in VIP chat\n");
- strcat(String, "{8B5A2B} /vip {FFFFFF}- Show your VIP\n");
- strcat(String, "{8B5A2B} /exp {FFFFFF}- See VIP expiration\n\n\n");
- strcat(String, "{FFFFFF}.: COMMANDS VIP {9C9C9C}SILVER{FFFFFF} :.\n\n");
- strcat(String, "{9C9C9C} /vkit {FFFFFF}- Paste KIT-VIP\n");
- strcat(String, "{9C9C9C} /varmour {FFFFFF}- Create one armour\n");
- strcat(String, "{9C9C9C} /vjetpack {FFFFFF}- Create one jetpack\n");
- strcat(String, "{9C9C9C} /vrepar {FFFFFF}- Repair a vehicle\n\n\n");
- strcat(String, "{FFFFFF}.: COMMANDS VIP {EEC900}GOLD{FFFFFF} :.\n\n");
- strcat(String, "{EEC900} /vcar {FFFFFF}- Create one car VIP\n");
- strcat(String, "{EEC900} /vbike {FFFFFF}- Create one bike VIP\n");
- strcat(String, "{EEC900} /effects {FFFFFF}- Opens an effects menu VIP\n");
- strcat(String, "{EEC900} /toys {FFFFFF}- Opens an toys menu VIP\n");
- ShowPlayerDialog(playerid, DIALOG_COMMANDS_VIP, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - Commands VIP", String, "Exit", #);
- return 1;
- }
- CMD:exp(playerid)
- {
- if(!VerificarNivelVip(playerid, 1)) return 1;
- new String[256], Str[128];
- format(Str, sizeof(Str), "{ffffff}NICK: {008B00}%s{FFFFFF} [{008B00}%d{FFFFFF}] - ", PlayerInfo[playerid][vName], playerid);
- strcat(String, Str);
- format(Str, sizeof(Str), "{ffffff}EXPIRATION EM: {008B00}%d {FFFFFF}DAYS\n\n", PlayerInfo[playerid][DaysVip]);
- strcat(String, Str);
- ShowPlayerDialog(playerid, DIALOG_VENC_VIP, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIP expiration", String, "Exit", #);
- return 1;
- }
- CMD:cv(playerid, params[])
- {
- if(!VerificarNivelVip(playerid, 1)) return 1;
- new texto[100], String[128];
- if(sscanf(params, "s", texto)) return SendClientMessage(playerid, GREY, "Use: /cv [texto]");
- if(strval(texto) > 100) return SendClientMessage(playerid, RED, "ERROR: Text too large, please decrease!");
- format(String, sizeof(String), "%s {FFFF00}.:CHAT-VIP:.{FFFFFF} %s", PlayerInfo[playerid][vName], texto);
- ChatVIP(String);
- return 1;
- }
- CMD:vip(playerid)
- {
- if(!VerificarNivelVip(playerid, 1)) return 1;
- new String[60];
- format(String, sizeof(String), "-VIP » %s: I'm VIP, so suck me!", PlayerInfo[playerid][vName]);
- SendVipMessageToAll(playerid, String);
- return 1;
- }
- CMD:v(playerid, params[])
- {
- if(!VerificarNivelVip(playerid, 1)) return 1;
- new texto[100], String[128];
- if(sscanf(params, "s", texto)) return SendClientMessage(playerid, GREY, "Use: /v [Text]");
- format(String, sizeof(String), "-VIP » %s: %s", PlayerInfo[playerid][vName], texto);
- SendVipMessageToAll(playerid, String);
- return 1;
- }
- // ======================================================
- // ==================== Commands VIP level 2
- CMD:vjetpack(playerid)
- {
- if(!VerificarNivelVip(playerid, 2)) return 1;
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command on a vehicle!");
- SendClientMessage(playerid, COR_VIP, "C-VIP: Jetpack created successfully!");
- SetPlayerSpecialAction(playerid, 2);
- return 1;
- }
- CMD:varmour(playerid)
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- if(PlayerInfo[playerid][GotColete] == true) return SendClientMessage(playerid, RED, "ERROR: You've recently picked up your ARMOUR-VIP!");
- SendClientMessage(playerid, COR_VIP, "C-VIP: ARMOUR created successfully!");
- SetPlayerArmour(playerid, 100.0);
- PlayerInfo[playerid][GotColete] = true;
- return 1;
- }
- CMD:vkit(playerid)
- {
- if(!VerificarNivelVip(playerid, 2)) return 1;
- if(PlayerInfo[playerid][GotKit] == true) return SendClientMessage(playerid, RED, "ERROR: You've recently picked up your KIT-VIP!");
- SendClientMessage(playerid, COR_VIP, "C-VIP: You successfully got your VIP-KIT!");
- GivePlayerWeapon(playerid, 4, 99999);
- GivePlayerWeapon(playerid, 24, 99999);
- GivePlayerWeapon(playerid, 26, 99999);
- GivePlayerWeapon(playerid, 31, 99999);
- GivePlayerWeapon(playerid, 32, 99999);
- GivePlayerWeapon(playerid, 34, 99999);
- PlayerInfo[playerid][GotKit] = true;
- return 1;
- }
- CMD:vrepar(playerid)
- {
- if(!VerificarNivelVip(playerid, 2)) return 1;
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command outside of a vehicle!");
- SendClientMessage(playerid, COR_VIP, "C-VIP: Vehicle repaired with sucesso!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- return 1;
- }
- // ======================================================
- // ==================== Commands VIP Level 3
- CMD:vcar(playerid, params[])
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- new Cor1, Cor2, idcarro;
- if(sscanf(params, "ii", Cor1, Cor2)) return SendClientMessage(playerid, GREY, "Use: /vcar [Cor1] [Cor2]");
- new Float:X, Float:Y, Float:Z, Float:X1, Float:Y1, Float:A;
- PosicaoFrentePlayer(playerid, X, Y, 3);
- GetPlayerPos(playerid, X1, Y1, Z);
- GetPlayerFacingAngle(playerid, A);
- idcarro = AddStaticVehicle(411, X, Y, Z, A+90, Cor1, Cor2);
- CarsCreated[AllCars] = idcarro;
- AllCars ++;
- SendClientMessage(playerid, COR_VIP, "C-VIP: VIP car created successfully!");
- return 1;
- }
- CMD:vbike(playerid, params[])
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- new Cor1, Cor2, idcarro;
- if(sscanf(params, "ii", Cor1, Cor2)) return SendClientMessage(playerid, GREY, "Use: /vbike [Cor1] [Cor2]");
- new Float:X, Float:Y, Float:Z, Float:X1, Float:Y1, Float:A;
- PosicaoFrentePlayer(playerid, X, Y, 3);
- GetPlayerPos(playerid, X1, Y1, Z);
- GetPlayerFacingAngle(playerid, A);
- idcarro = AddStaticVehicle(522, X, Y, Z, A+90, Cor1, Cor2);
- CarsCreated[AllCars] = idcarro;
- AllCars ++;
- SendClientMessage(playerid, COR_VIP, "C-VIP: VIP motorcycle created successfully!");
- return 1;
- }
- CMD:toys(playerid)
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command on a vehicle!");
- SendClientMessage(playerid, COR_VIP, "C-VIP: List of toys.");
- ShowToys(playerid);
- return 1;
- }
- CMD:ttoy(playerid)
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- for(new i=0; i< MAX_PLAYER_ATTACHED_OBJECTS; i++)
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
- }
- SendClientMessage(playerid, COR_VIP, "C-VIP: Toys successfully removed!");
- return 1;
- }
- CMD:effects(playerid)
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, RED, "ERROR: You can not use this command on a vehicle!");
- SendClientMessage(playerid, COR_VIP, "C-VIP: List of Effects.");
- ShowEfects(playerid);
- return 1;
- }
- CMD:teffect(playerid)
- {
- if(!VerificarNivelVip(playerid, 3)) return 1;
- RemovePlayerAttachedObject(playerid, 1); // Remove slot 1
- RemovePlayerAttachedObject(playerid, 2); // Remove slot 2
- SendClientMessage(playerid, COR_VIP, "C-VIP: Effects removed successfully!");
- return 1;
- }
- // ======================================================
- // ==================== Commands PLAYER
- CMD:activevip(playerid)
- {
- SendClientMessage(playerid, COR_VIP, "C-VIP: Add a valid Key to activate VIP.");
- ShowPlayerDialog(playerid, DIALOG_ENABLE_KEY, DIALOG_STYLE_INPUT, "VIP", "\nInform us your key to activate your VIP benefit:\n\n", "Active", "Cancel");
- return 1;
- }
- CMD:vips(playerid)
- {
- new ContVIP = 0, String[1000], Str[128];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][Vip] > 0)
- {
- format(Str, sizeof(Str), ".:: VIP ON ::. {008B00}%s {FFFFFF} [{008B00}%i{FFFFFF}]\n", PlayerInfo[i][vName], i);
- strcat(String, Str);
- ContVIP++;
- }
- }
- if(ContVIP == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIPs Online", "{FF0000}No VIPs online right now!", "Ok", #);
- } else {
- ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{EEC900}C-VIP: - VIPs Online", String, "Ok", #);
- }
- return 1;
- }
- // ======================================================
- // ==================== Commands ADMIN RCON
- CMD:createkey(playerid)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
- ShowPlayerDialog(playerid, DIALOG_NEW_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nPlease enter a valid new key\n{FFFF00}Only letters are accepted:\n\n", "Create", "Cancel");
- return 1;
- }
- CMD:removekey(playerid)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
- ShowPlayerDialog(playerid, DIALOG_REMOVE_KEY, DIALOG_STYLE_INPUT, "KEYS VIP", "\nEnter the Key you want to remove:\n\n", "Remove", "Cancel");
- return 1;
- }
- CMD:setvip(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
- new Nivel, Dias, ID;
- if(sscanf(params, "udd", ID, Nivel, Dias)) return SendClientMessage(playerid, GREY, "ADMIN: Use /setvip [ID] [Level] [Days]");
- if(Nivel < 1 || Nivel > 3) return SendClientMessage(playerid, RED, "ERROR: Invalid Level! Available 1 a 3.");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, RED, "ERROR: Unconnected player.");
- SendClientMessage(playerid, ORANGE, "ADMIN: Command performed successfully !");
- SetVip(ID, Nivel, Dias);
- return 1;
- }
- CMD:removevip(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
- new Motivo[100], Msg[128], ID;
- if(sscanf(params, "us", ID, Motivo)) return SendClientMessage(playerid, GREY, "ADMIN: Use /removevip [ID] [Reason]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, RED, "ERROR: Unconnected player.");
- format(Msg, sizeof Msg, "C-VIP: Admin %s has withdrawn his VIP. Reason: %s.", PlayerInfo[playerid][vName], Motivo);
- SendClientMessage(ID, COR_VIP, Msg);
- RemoveVip(ID);
- SendClientMessage(playerid, ORANGE, "ADMIN: Command performed successfully !");
- return 1;
- }
- CMD:respawn(playerid)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED,"ERROR: Unavailable command. Admin RCON");
- new String[70];
- format(String, sizeof(String), "ADMIN: Admin %s respawn on all created VIP vehicles!", PlayerInfo[playerid][vName]);
- SendClientMessageToAll(ORANGE, String);
- SendClientMessage(playerid, ORANGE, "ADMIN: All created VIP vehicles were destroyed!");
- for(new i = 0; i < sizeof(CarsCreated); i++) DestroyVehicle(CarsCreated[i]);
- return 1;
- }
- // ======================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement