Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* -=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-==-=-=-=-=-=-=-=-=-=-
- POR FAVOR NÃO REMOVA OS CRÉDITOS
- PERFIL: http://forum.sa-mp.com/member.php?u=286494
- MY WORK'S
- http://forum.sa-mp.com/showthread.php?t=626051
- Meu skype:
- krazy.samp
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=*/
- #include <a_samp>
- #include <ZCMD>
- #include <sscanf2>
- #include <DOF2>
- main()
- {
- return 0;
- }
- // DEFINES
- #define vcmds 10
- // ENUM'S E VARIAVEIS
- enum GVIP
- {
- gLevel,
- gDias,
- }
- new GiromBVip[MAX_PLAYERS][GVIP];
- new bool:Vida[MAX_PLAYERS];
- new bool:Colete[MAX_PLAYERS];
- // FORWARD'S
- forward GiromBaVerificada(playerid);
- public OnFilterScriptInit()
- {
- SetTimer("GiromBaVerificada", 60000, true);
- print("\n------------------------|-----------------------------");
- print("|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|§ISTEMA G-VIP|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|");
- print("|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|CRIADO POR GiromB|¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|");
- print("|¨¨¨¨¨¨¨¨¨¨¨¨¨¨|Não Remova os Créditos |¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨|");
- print("--------------------------|------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- Vida[playerid] = false;
- Colete[playerid] = false;
- GiromBVip[playerid][gLevel] = 0;
- return 0;
- }
- public OnPlayerConnect(playerid)
- {
- new GiromBArquivos[100], NomeVip[24];
- GetPlayerName(playerid, NomeVip, sizeof(NomeVip));
- format(GiromBArquivos, sizeof(GiromBArquivos), "GVips/%s.ini", NomeVip);
- if(PlayerVip(playerid)){
- GiromBVip[playerid][gDias] = DOF2_GetInt(GiromBArquivos, "Dias");
- if(gettime() >= GiromBVip[playerid][gDias]){
- SendClientMessage(playerid, -1, "[INFO] O seu tempo de vip expirou, você não é mais um jogador vip.");
- GiromBVip[playerid][gLevel] = 0;
- DOF2_RemoveFile(GiromBArquivos);
- } else {
- GiromBVip[playerid][gLevel] = DOF2_GetInt(GiromBArquivos, "Level");
- SendClientMessage(playerid, -1, "[INFO] Você é um jogador VIP");
- }
- }
- Vida[playerid] = false;
- Colete[playerid] = false;
- return 0;
- }
- public OnPlayerSpawn(playerid)
- {
- Vida[playerid] = false;
- Colete[playerid] = false;
- return 1 ;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Vida[playerid] = false;
- Colete[playerid] = false;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(GiromBVip[playerid][gLevel] >= 1)
- {
- new Vchat[180], NomeVip[MAX_PLAYER_NAME];
- GetPlayerName(playerid, NomeVip, sizeof(NomeVip));
- format(Vchat, sizeof(Vchat), "%s {00FF00}[VIP] {FFFFFF}[%i]: %s",NomeVip,playerid, text);
- SendClientMessageToAll(GetPlayerColor(playerid), Vchat);
- return 0;
- }
- return 1;
- }
- CMD:setvip(playerid, params[])
- {
- new TargetID, GiromBArquivos[100], NomeVip[24], TotalDias;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, " [ERROR] Voce não tem permissão para isso.");
- if(sscanf(params, "ii", TargetID, TotalDias)) return SendClientMessage(playerid, -1, "[ERROR] uso correto: /darvip [ID] [DIAS]");
- GetPlayerName(TargetID, NomeVip, sizeof(NomeVip));
- format(GiromBArquivos, sizeof(GiromBArquivos), "GVips/%s.ini", NomeVip);
- if(DOF2_FileExists(GiromBArquivos))
- return SendClientMessage(playerid, -1, "[ERROR] Este jogador já é vip.");
- SetPlayerColor(TargetID, GetPlayerColor(TargetID));
- DOF2_CreateFile(GiromBArquivos);
- DOF2_SetInt(GiromBArquivos, "Dias", gettime() + (60*60*24*TotalDias));
- DOF2_SetInt(GiromBArquivos, "Level", 1);
- DOF2_SaveFile();
- GiromBVip[TargetID][gLevel] = 1;
- return 1;
- }
- CMD:tirarvip(playerid, params[])
- {
- new TargetID, GiromBArquivos[100], pNome[21], xstr[128];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1, " [ERROR] Voce não tem permissão para isso.");
- if(sscanf(params, "i", TargetID))
- return SendClientMessage(playerid, -1, "USE: /removervip [ID]");
- if(!IsPlayerConnected(TargetID))
- return SendClientMessage(playerid, -1, "{FF0000}[ERRO]: Este jogador não esta conectado.");
- GetPlayerName(TargetID, pNome, sizeof(pNome));
- format(GiromBArquivos, sizeof(GiromBArquivos), "GVips/%s.ini", pNome);
- if(!DOF2_FileExists(GiromBArquivos))
- return SendClientMessage(playerid, -1, "[ERRO] Este jogador não é vip.");
- GiromBVip[TargetID][gLevel] = 0;
- DOF2_RemoveFile(GiromBArquivos);
- GetPlayerName(playerid, pNome, sizeof(pNome));
- format(xstr, sizeof(xstr), "[INFO] Você removeu o vip do jogador %s.", pNome);
- SendClientMessage(playerid, -1, xstr);
- GetPlayerName(TargetID, pNome, sizeof(pNome));
- format(xstr, sizeof(xstr), "[INFO] O admin %s removeu seu vip.", pNome);
- SendClientMessage(TargetID, -1, xstr);
- return 1;
- }
- CMD:vips(playerid)
- {
- new String[500],
- gVipNome[24];
- ShowPlayerDialog(playerid, 373, DIALOG_STYLE_MSGBOX, "VIPS CONECTADOS", " ", "FECHAR","");
- for(new i,a = GetMaxPlayers();i < a;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerVip(i))
- {
- GetPlayerName(i, gVipNome, 24);
- format(String, sizeof(String), "%s%s (%i)\n", String, gVipNome,i );
- ShowPlayerDialog(playerid, 373, DIALOG_STYLE_MSGBOX, "VIPS CONECTADOS", String, "FECHAR", "");
- }
- }
- }
- return 1;
- }
- CMD:cvip(playerid, params[])
- {
- if(!PlayerVip(playerid)) return SendClientMessage(playerid,-1, " [ERROR] Voce não tem permissão para isso.");
- new 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] Voce não tem permissão para isso.");
- 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] Voce não tem permissão para isso.");
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, -1, "[INFO] Para usar este item você deve estar em um veiculo.");
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- SendClientMessage(playerid, -1, "[INFO] Foi adicionado nitro ao seu veiculo.");
- return 1;
- }
- CMD:jetpack(playerid)
- {
- if(!PlayerVip(playerid)) return SendClientMessage(playerid,-1, " [ERROR] Voce não tem permissão para isso.");
- SetPlayerSpecialAction(playerid, 2);
- SendClientMessage(playerid, -1, "[INFO] Você pegou seu Jetpack.");
- return 1;
- }
- CMD:spawn(playerid)
- {
- SpawnPlayer(playerid);
- return 1;
- }
- CMD:vida(playerid)
- {
- if(Vida[playerid] == true) return SendClientMessage(playerid, -1, "[ERRO]: Você só pode comprar VIDA uma vez a cada SPAWN.");
- SetPlayerHealth(playerid, 100.0);
- Vida[playerid] = true;
- return true;
- }
- CMD:colete(playerid)
- {
- if(Colete[playerid] == true) return SendClientMessage(playerid, -1, "[ERRO]: Você só pode comprar C0LETE uma vez a cada SPAWN.");
- SetPlayerArmour(playerid, 100.0);
- Colete[playerid] = true;
- return true;
- }
- CMD:ajudavip(playerid)
- {
- ShowPlayerDialog(playerid, vcmds, DIALOG_STYLE_MSGBOX," Vip Cmds° ","use /cvip para falar no chat vip\n /vida e /colete \n /Spawn -> Spawnar \n /jetpack \n /nitro \n /kitvip --> armas vip \n /Vips -> Ver Vips ON\n\n","ok","");
- return 1;
- }
- public GiromBaVerificada(playerid){
- if(GiromBVip[playerid][gLevel] >= 1){
- new NomeVip[24], GiromBArquivos[100];
- GetPlayerName(playerid, NomeVip, sizeof(NomeVip));
- format(GiromBArquivos, sizeof(GiromBArquivos), "GVips/%s.ini", NomeVip);
- GiromBVip[playerid][gDias] = DOF2_GetInt(GiromBArquivos, "Dias");
- if(gettime() >= GiromBVip[playerid][gDias]){
- SendClientMessage(playerid, -1, "[INFO] O seu tempo de vip expirou, você não é mais um jogador vip.");
- DOF2_RemoveFile(GiromBArquivos);
- GiromBVip[playerid][gLevel] = 0;
- }
- }
- return 0;
- }
- stock PlayerVip(playerid)
- {
- new getVip[40],NomeVip[21];
- GetPlayerName(playerid, NomeVip, 21);
- format(getVip, 40, "GVips/%s.ini", NomeVip);
- if(DOF2_FileExists(getVip)) return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement