Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <sscanf>
- #include <zcmd>
- #include <Dini>
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #define CONTAS "Vips/%s.ini"
- new Vip[MAX_PLAYERS];
- new Nome[MAX_PLAYERS];
- #define Neons 0
- public OnGameModeInit()
- {
- SetGameModeText("[CVS] Sistema VIP");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- SalvarVip(i);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[128];
- GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
- format(string, -1, "[CVS] Sistema Vip: O Jogador Vip %s conectou no servidor", Nome[playerid]);
- SendClientMessageToAll(-1, string);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new string[128];
- GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
- format(string, -1, "[CVS] Sistema Vip: O Jogador Vip %s desconectou do servidor", Nome[playerid]);
- SendClientMessageToAll(-1, string);
- SalvarVip(playerid);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- SetPlayerColor(playerid, 0xFFBEFFE2);
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == Neons)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
- SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, -1,"Você adicionou em seu veiculo um neon 'Rosa'");
- }
- if(listitem == 1)
- {
- SetPVarInt(playerid, "neon4", CreateObject(18647,0,0,0,0,0,0));
- SetPVarInt(playerid, "neon5", CreateObject(18647,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, -1,"Você adicionou em seu veiculo um neon 'Verde'");
- }
- if(listitem == 2)
- {
- SetPVarInt(playerid, "neon6", CreateObject(18647,0,0,0,0,0,0));
- SetPVarInt(playerid, "neon7", CreateObject(18647,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, -1,"Você adicionou em seu veiculo um neon 'Amarelo'");
- }
- if(listitem == 3)
- {
- SetPVarInt(playerid, "neon8", CreateObject(18647,0,0,0,0,0,0));
- SetPVarInt(playerid, "neon9", CreateObject(18647,0,0,0,0,0,0));
- AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, -1,"Você adicionou em seu veiculo um neon 'Vermelho'");
- }
- }
- }
- return 1;
- }
- CMD:DarVip(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new id, level, string[128];
- if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, -1, "[CVS] Sistema de Vip: /DarVip [id] [level]");
- Vip[id] = level;
- format(string, 100, "Você deu %d level de VIP para o %s", level, Nome);
- SendClientMessage(playerid, -1, string);
- }
- return 1;
- }
- CMD:TirarVip(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- new id, Tirar, string[128];
- if(sscanf(params, "ud", id, Tirar)) return SendClientMessage(playerid, -1, "[CVS] Sistema de Vip: /TirarVip [id]");
- Vip[id] = Tirar;
- format(string, 100, "Você tirou o vip de %s", Tirar, Nome);
- SendClientMessage(playerid, -1, string);
- }
- return 1;
- }
- // Agora os comandos dos players vip.
- CMD:neons(playerid, params[])
- {
- if(Vip[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"Você não é um player vip");
- }
- if(Vip[playerid] == 1)
- ShowPlayerDialog(playerid, Neons, DIALOG_STYLE_MSGBOX,"[CVS] Sistema Vip - Neons","Rosa\nVerde\nAmarelo\nVermelho","Colocar","Sair");
- return 1;
- }
- CMD:kitvip(playerid, params[])
- {
- if(Vip[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"Você não é um player vip");
- }
- if(Vip[playerid] == 1)
- GivePlayerWeapon(playerid, 3, 1);
- GivePlayerWeapon(playerid, 24, 150);
- GivePlayerWeapon(playerid, 25, 60);
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 24, 60);
- return 1;
- }
- CMD:reparar(playerid, params[])
- {
- if(Vip[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"Você não é um player vip");
- }
- if(Vip[playerid] == 1)
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, -1,"Você reparou seu veiculo");
- return 1;
- }
- CMD:jetpack(playerid, params[])
- {
- if(Vip[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"Você não é um player vip");
- }
- if(Vip[playerid] == 1)
- SetPlayerSpecialAction(playerid, 2);
- SendClientMessage(playerid, -1,"Você pegou um jetpack");
- return 1;
- }
- CMD:comandosvip(playerid, params[])
- {
- if(Vip[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"Você não é um player vip");
- }
- if(Vip[playerid] == 1)
- SendClientMessage(playerid, -1,"/Neons /KitVip /Reparar /JetPack");
- return 1;
- }
- CMD:souvip(playerid, params[])
- {
- new string[128];
- if(Vip[playerid] == 0)
- {
- SendClientMessage(playerid, -1,"Você não é um player vip");
- }
- if(Vip[playerid] == 1)
- format(string, -1, "Sou um player vip, seja um também /Forum.", Nome[playerid]);
- SendClientMessageToAll(-1, string);
- return 1;
- }
- SalvarVip(playerid)
- {
- GetPlayerName(playerid, Nome, sizeof(Nome));
- new String[50];
- format(String, sizeof(String), CONTAS, Nome);
- dini_IntSet(String,"Vip", Vip[playerid]);
- return 1;
- }
- stock PlayerName(playerid)
- {
- new Nome[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
- return Nome;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement