Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* -=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-==-=-=-=-=-=-=-=-=-=-
- PLEASE DO NOT REMOVE CREDITS
- PERFIL: http://forum.sa-mp.com/member.php?u=286494
- MY WORK'S
- http://forum.sa-mp.com/showthread.php?t=626051
- MY skype:
- krazy.samp
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=*/
- #include <a_samp>
- #include <ZCMD>
- #include <sscanf2>
- #include <DOF2>
- main()
- {
- return 0;
- }
- // DEFINES
- #define vcmds 10
- // ENUM'S AND VARIAVEIS
- enum GVIP
- {
- gLevel,
- gDays,
- }
- static GiromBVip[MAX_PLAYERS][GVIP];
- static bool:Life[MAX_PLAYERS];
- static bool:Armour[MAX_PLAYERS];
- // FORWARD'S
- forward GiromBaCheck(playerid);
- public OnFilterScriptInit()
- {
- SetTimer("GiromBaCheck", 60000, true);
- print("\n------------------------|-----------------------------");
- print("|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|§YSTEM G-VIP|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|");
- print("|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|CREATED BY GiromB|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|");
- print("|¨¨¨¨¨¨¨¨¨¨¨¨¨¨| DO NOT REMOVE CREDITS |¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|");
- print("--------------------------|------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- Life[playerid] = false;
- Armour[playerid] = false;
- GiromBVip[playerid][gLevel] = 0;
- return 0;
- }
- public OnPlayerConnect(playerid)
- {
- static GiromBFiles[100], NameVip[24];
- GetPlayerName(playerid, NameVip, sizeof(NameVip));
- format(GiromBFiles, sizeof(GiromBFiles), "GVips/%s.ini", NameVip);
- if(PlayerVip(playerid)){
- GiromBVip[playerid][gDays] = DOF2_GetInt(GiromBFiles, "Days");
- if(gettime() >= GiromBVip[playerid][gDays]){
- SendClientMessage(playerid, -1, "[INFO] Your VIP time is over");
- GiromBVip[playerid][gLevel] = 0;
- DOF2_RemoveFile(GiromBFiles);
- } else {
- GiromBVip[playerid][gLevel] = DOF2_GetInt(GiromBFiles, "Level");
- SendClientMessage(playerid, -1, "[INFO] you are is player VIP");
- }
- }
- Life[playerid] = false;
- Armour[playerid] = false;
- return 0;
- }
- public OnPlayerSpawn(playerid)
- {
- Life[playerid] = false;
- Armour[playerid] = false;
- return 1 ;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Life[playerid] = false;
- Armour[playerid] = false;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(GiromBVip[playerid][gLevel] >= 1)
- {
- static Vchat[180], NameVip[MAX_PLAYER_NAME];
- GetPlayerName(playerid, NameVip, sizeof(NameVip));
- format(Vchat, sizeof(Vchat), "%s {00FF00}[VIP] {FFFFFF}[%i]: %s",NameVip,playerid, text);
- SendClientMessageToAll(GetPlayerColor(playerid), Vchat);
- return 0;
- }
- return 1;
- }
- CMD:setvip(playerid, params[])
- {
- static TargetID, GiromBFiles[100], NameVip[24], TotalDays;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, " [ERROR] You are not allowed to do this.");
- if(sscanf(params, "ii", TargetID, TotalDays)) return SendClientMessage(playerid, -1, "[ERROR] CORRECT: /setvip [ID] [DAYS]");
- GetPlayerName(TargetID, NameVip, sizeof(NameVip));
- format(GiromBFiles, sizeof(GiromBFiles), "GVips/%s.ini", NameVip);
- if(!IsPlayerConnected(TargetID))
- return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: This player is offline.");
- if(DOF2_FileExists(GiromBFiles))
- return SendClientMessage(playerid, -1, "[ERROR] This player is already vip.");
- SetPlayerColor(TargetID, GetPlayerColor(TargetID));
- DOF2_CreateFile(GiromBFiles);
- DOF2_SetInt(GiromBFiles, "Days", gettime() + (60*60*24*TotalDays));
- DOF2_SetInt(GiromBFiles, "Level", 1);
- DOF2_SaveFile();
- GiromBVip[TargetID][gLevel] = 1;
- return 1;
- }
- CMD:delete(playerid, params[])
- {
- static TargetID, GiromBFiles[100], pName[21], xstr[128];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, " [ERROR] You are not allowed to do this.");
- if(sscanf(params, "i", TargetID))
- return SendClientMessage(playerid, -1, "USE: /delete [ID]");
- if(!IsPlayerConnected(TargetID))
- return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: This player is offline.");
- GetPlayerName(TargetID, pName, sizeof(pName));
- format(GiromBFiles, sizeof(GiromBFiles), "GVips/%s.ini", pName);
- if(!DOF2_FileExists(GiromBFiles))
- return SendClientMessage(playerid, -1, "[ERRO] This player is not vip.");
- GiromBVip[TargetID][gLevel] = 0;
- DOF2_RemoveFile(GiromBFiles);
- GetPlayerName(playerid, pName, sizeof(pName));
- format(xstr, sizeof(xstr), "[!] You removed the player vip %s.", pName);
- SendClientMessage(playerid, -1, xstr);
- GetPlayerName(TargetID, pName, sizeof(pName));
- format(xstr, sizeof(xstr), "[!] admin %s has removed your VIP", pName);
- SendClientMessage(TargetID, -1, xstr);
- return 1;
- }
- CMD:vips(playerid)
- {
- new String[500],
- gVipName[24];
- ShowPlayerDialog(playerid, 373, DIALOG_STYLE_MSGBOX, "VIPS CONECTED", " ", "CLOSE","");
- for(new i,a = GetMaxPlayers();i < a;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerVip(i))
- {
- GetPlayerName(i, gVipName, 24);
- format(String, sizeof(String), "%s%s (%i)\n", String, gVipName,i );
- ShowPlayerDialog(playerid, 373, DIALOG_STYLE_MSGBOX, "VIPS CONECTED", String, "CLOSE", "");
- }
- }
- }
- return 1;
- }
- CMD:cvip(playerid, params[])
- {
- if(!PlayerVip(playerid)) return SendClientMessage(playerid,-1, " [ERROR] You are not allowed to do this..");
- static Nome[24], SendVipMessage[160];
- GetPlayerName(playerid, Nome, 24);
- format(SendVipMessage, 160, "[{FF66FF}VIP{FFFFFF}] |%s|: %s", Nome, params);
- for(new i = 0; i < MAX_PLAYERS; i++){
- if(IsPlayerConnected(i)){
- if(PlayerVip(i)){
- SendClientMessage(i, -1, SendVipMessage);
- }
- }
- }
- return 1;
- }
- CMD:kitvip(playerid)
- {
- if(!PlayerVip(playerid)) return SendClientMessage(playerid,-1, "[ERROR] You are not allowed to do this.");
- GivePlayerWeapon(playerid, 24, 620);
- GivePlayerWeapon(playerid, 25, 950);
- GivePlayerWeapon(playerid, 29, 1200);
- GivePlayerWeapon(playerid, 30, 1500);
- GivePlayerWeapon(playerid, 16, 10);
- GivePlayerWeapon(playerid, 35, 5);
- return 1;
- }
- CMD:nitro(playerid)
- {
- if(!PlayerVip(playerid)) return SendClientMessage(playerid,-1, " [ERROR] You are not allowed to do this.");
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, -1, "[ERROR] To use this item you must be in a vehicle.");
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- return 1;
- }
- CMD:jetpack(playerid)
- {
- if(!PlayerVip(playerid)) return SendClientMessage(playerid,-1, " [ERROR] You are not allowed to do this.");
- SetPlayerSpecialAction(playerid, 2);
- SendClientMessage(playerid, -1, "[!] You got your Jetpack.");
- return 1;
- }
- CMD:spawn(playerid)
- {
- SpawnPlayer(playerid);
- return 1;
- }
- CMD:vida(playerid)
- {
- if(Life[playerid] == true) return SendClientMessage(playerid, -1, "[ERROR]: You can only buy LIFE once every SPAWN");
- SetPlayerHealth(playerid, 100.0);
- Life[playerid] = true;
- return true;
- }
- CMD:armour(playerid)
- {
- if(Armour[playerid] == true) return SendClientMessage(playerid, -1, "[ERROR]:You can only buy ARMOUR once every SPAWN.");
- SetPlayerArmour(playerid, 100.0);
- Armour[playerid] = true;
- return true;
- }
- CMD:help(playerid)
- {
- ShowPlayerDialog(playerid, vcmds, DIALOG_STYLE_MSGBOX," Vip ° "," /cvip = chat vip\n /life and /armour \n /Spawn -> Spawn \n /jetpack \n /nitro \n /kitvip --> weapons vip \n /Vips -> Vips ON\n\n","ok","");
- return 1;
- }
- public GiromBaCheck(playerid){
- if(GiromBVip[playerid][gLevel] >= 1){
- static NameVip[24], GiromBFiles[100];
- GetPlayerName(playerid, NameVip, sizeof(NameVip));
- format(GiromBFiles, sizeof(GiromBFiles), "GVips/%s.ini", NameVip);
- GiromBVip[playerid][gDays] = DOF2_GetInt(GiromBFiles, "Days");
- if(gettime() >= GiromBVip[playerid][gDays]){
- SendClientMessage(playerid, -1, "[!] Your VIP time is over");
- DOF2_RemoveFile(GiromBFiles);
- GiromBVip[playerid][gLevel] = 0;
- }
- }
- return 0;
- }
- stock PlayerVip(playerid)
- {
- static getVip[40],NameVip[21];
- GetPlayerName(playerid, NameVip, 21);
- format(getVip, 40, "GVips/%s.ini", NameVip);
- if(DOF2_FileExists(getVip)) return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement