Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ------------------ FilterScript de Policial 1.6 ----------------------------
- Criador: [XPG]MarlonCS
- ~Não retire os créditos~
- -----------------------------------------------------------------------------*/
- // ________________ Includes _________________
- #include <a_samp>
- #include <zcmd>
- #include <DOF2>
- #include <sscanf>
- // ________________ Defines ________________
- #define COR_CINZA 0xBFC0C2FF
- #define COR_BRANCO 0xFAFAFAFF
- #define COR_VERMELHO 0xFF0000AA
- #define COR_AZUL 0x00A5FFFF
- #define DialogBoxEx 1
- #define ARQUIVO "PolicialSys/%s.ini"
- // ________________ News ________________
- new
- quantidade[MAX_PLAYERS],
- procurando[MAX_PLAYERS],
- procurado[MAX_PLAYERS],
- policial[MAX_PLAYERS],
- nome[MAX_PLAYER_NAME],
- Prisao[MAX_PLAYERS],
- mortes[MAX_PLAYERS],
- level[MAX_PLAYERS],
- time[MAX_PLAYERS],
- giveplayerid,
- playermoney,
- arquivo[50],
- texto[256],
- timer[500],
- cmd[256],
- carro
- ;
- public OnFilterScriptInit()
- {
- print("\n--------------|||||--------------------------");
- print(" Sistema de Policia ---- made by [XPG]MarlonCS");
- print(" .........................Carregado com sucesso!");
- print("-----------------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- // ___________________ Carregar Informações do Player ___________________
- format(arquivo, sizeof(arquivo), ARQUIVO, pnome(playerid));
- policial[playerid] = DOF2_GetInt(arquivo, "Policial");
- procurado[playerid] = DOF2_GetInt(arquivo, "Procurado");
- level[playerid] = DOF2_GetInt(arquivo, "LevelProcura");
- Prisao[playerid] = DOF2_GetInt(arquivo, "Preso");
- quantidade[playerid] = DOF2_GetInt(arquivo, "Contagem");
- SetPlayerWantedLevel(playerid, level[playerid]);
- DOF2_SaveFile();
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- format(arquivo, sizeof(arquivo), ARQUIVO, pnome(playerid));
- level[playerid] = GetPlayerWantedLevel(playerid);
- DOF2_SetInt(arquivo, "LevelProcura", level[playerid]);
- DOF2_SetInt(arquivo, "Procurado", procurado[playerid]);
- DOF2_SetInt(arquivo, "Preso", Prisao[playerid]);
- DOF2_SetInt(arquivo,"Contagem",quantidade[playerid]);
- DOF2_SaveFile();
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- mortes[playerid]++;
- quantidade[killerid]++;
- new arquivok[32];
- new tmatador[32];
- format(arquivo, sizeof(arquivo), ARQUIVO,pnome(playerid));
- if(policial[playerid]==1) { // Se o player matar um policial
- if(policial[killerid]==0) {
- new condenado[MAX_PLAYER_NAME];
- GetPlayerName(killerid, condenado, MAX_PLAYER_NAME);
- procurado[killerid]=1;
- level[killerid]=GetPlayerWantedLevel(killerid);
- if(level[killerid]==0)SetPlayerWantedLevel(killerid, 1);
- if(level[killerid]==1)SetPlayerWantedLevel(killerid, 2);
- if(level[killerid]==2)SetPlayerWantedLevel(killerid, 3);
- if(level[killerid]==3)SetPlayerWantedLevel(killerid, 4);
- if(level[killerid]==4)SetPlayerWantedLevel(killerid, 5);
- if(level[killerid]==5)SetPlayerWantedLevel(killerid, 6);
- if(level[killerid]==6)SetPlayerWantedLevel(killerid, 6);
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- level[playerid] = GetPlayerWantedLevel(killerid);
- format(arquivo, sizeof(arquivo), ARQUIVO,condenado);
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SetInt(arquivo,"LevelProcura",level[killerid]);
- DOF2_SetInt(arquivo,"Contagem",quantidade[killerid]);
- DOF2_SaveFile();
- format(texto,sizeof(texto),"[SERVER] Player %s matou o policial %s.",condenado,pnome(playerid));
- SendClientMessageToAll(COR_VERMELHO, texto);
- }
- }
- if(policial[killerid]==1 && procurado[playerid]==1 && GetPlayerWantedLevel(playerid) > 0) { // Se o policial matar um procurado
- new pmnome[MAX_PLAYER_NAME];
- GetPlayerName(killerid, pmnome, MAX_PLAYER_NAME);
- level[playerid] = GetPlayerWantedLevel(killerid);
- if(level[playerid]==1)GivePlayerMoney(killerid, 1000);
- if(level[playerid]==2)GivePlayerMoney(killerid, 2000);
- if(level[playerid]==3)GivePlayerMoney(killerid, 3000);
- if(level[playerid]==4)GivePlayerMoney(killerid, 4000);
- if(level[playerid]==5)GivePlayerMoney(killerid, 5000);
- if(level[playerid]==6)GivePlayerMoney(killerid, 6000);
- GivePlayerMoney(playerid, -500);
- format(texto, sizeof(texto), "[SERVER] Policial %s matou o procurado %s [%i].",pmnome,pnome(playerid),playerid);
- SendClientMessageToAll(COR_AZUL,texto);
- procurado[playerid]=0;
- quantidade[playerid]=0;
- level[playerid] = SetPlayerWantedLevel(playerid, 0);
- DOF2_SetInt(arquivo,"Procurado",procurado[playerid]);
- DOF2_SetInt(arquivo,"LevelProcura",level[playerid]);
- DOF2_SetInt(arquivo,"Contagem",quantidade[playerid]);
- DOF2_SaveFile();
- }
- if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER) { // Se alguém cometer DB
- if(policial[killerid]==0) {
- procurado[killerid]=1;
- new acusado[MAX_PLAYER_NAME];
- new vitima[MAX_PLAYER_NAME];
- GetPlayerName(killerid, acusado, MAX_PLAYER_NAME);
- GetPlayerName(playerid, vitima, MAX_PLAYER_NAME);
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- GameTextForPlayer(playerid,"~r~Atropelado",5000,3);
- format(texto, sizeof(texto), "[SERVER] %s Fez Drive-By (DB) em %s.",acusado,vitima);
- format(arquivo, sizeof(arquivo), ARQUIVO,acusado);
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- level[killerid] = GetPlayerWantedLevel(killerid);
- //Aumentar level de procurado do player
- if(level[killerid]==0)SetPlayerWantedLevel(killerid, 1);
- if(level[killerid]==1)SetPlayerWantedLevel(killerid, 2);
- if(level[killerid]==2)SetPlayerWantedLevel(killerid, 3);
- if(level[killerid]==3)SetPlayerWantedLevel(killerid, 4);
- if(level[killerid]==4)SetPlayerWantedLevel(killerid, 5);
- if(level[killerid]==5)SetPlayerWantedLevel(killerid, 6);
- if(level[killerid]==6)SetPlayerWantedLevel(killerid, 6);
- for(new i; i < MAX_PLAYERS; i++)
- if(policial[i]==1){SendClientMessage(i, 0xCECE00AA, texto);}
- }
- }
- // Quanto mais matar, mais procurado fica
- GetPlayerName(killerid,tmatador,sizeof(tmatador));
- format(arquivok, sizeof(arquivok), ARQUIVO,tmatador);
- DOF2_SetInt(arquivok,"Contagem",quantidade[killerid]);
- if(quantidade[playerid] == 10) {
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- SetPlayerWantedLevel(killerid, 1);
- }
- }
- if(quantidade[killerid] == 20) {
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- SetPlayerWantedLevel(killerid, 2);
- }
- }
- if(quantidade[killerid] == 30) {
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- SetPlayerWantedLevel(killerid, 3);
- }
- }
- if(quantidade[killerid] == 40) {
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- SetPlayerWantedLevel(killerid, 4);
- }
- }
- if(quantidade[killerid] == 50) {
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- SetPlayerWantedLevel(killerid, 5);
- }
- }
- if(quantidade[killerid] == 60) {
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Seu nível de procurado aumentou.");
- SetPlayerWantedLevel(killerid, 6);
- }
- }
- if(quantidade[killerid] > 61) { // Nível crítico. Aqui o Player pode ser preso
- if(policial[killerid]==0) {
- new matador[MAX_PLAYER_NAME];
- GetPlayerName(killerid, matador, MAX_PLAYER_NAME);
- format(arquivo, sizeof(arquivo), ARQUIVO,matador);
- procurado[killerid]=1;
- DOF2_SetInt(arquivo,"Procurado",procurado[killerid]);
- DOF2_SaveFile();
- SendClientMessage(killerid,COR_VERMELHO,"[SERVER] Cuidado, você pode ser preso agora.");
- SetPlayerWantedLevel(killerid, 7);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(Prisao[playerid]==1) {
- SetPlayerPos(playerid, 197.6661, 173.8179, 1003.0233);
- SetPlayerInterior(playerid, 3);
- SetTimerEx("SetPlayerPrisao", 1800000, 0, "i", playerid);
- SendClientMessage(playerid, COR_VERMELHO, "[SERVER] Aguarde 3 minutos para se libertar.");
- }
- return 1;
- }
- stock pnome(playerid)
- {
- GetPlayerName(playerid, nome, sizeof(nome));
- return nome;
- }
- forward SetPlayerPrisao(playerid);
- public SetPlayerPrisao(playerid)
- {
- SetPlayerInterior(playerid,0);
- Prisao[playerid] = 0;
- GameTextForPlayer(playerid, "~g~Voce esta livre!", 1000,1);
- level[playerid]=0;
- SetPlayerWantedLevel(playerid, level[playerid]);
- procurado[playerid]=0;
- quantidade[playerid]=0;
- format(arquivo, sizeof(arquivo), ARQUIVO,pnome(playerid));
- DOF2_SetInt(arquivo,"Procurado",procurado[playerid]);
- DOF2_SetInt(arquivo,"LevelProcura",level[playerid]);
- DOF2_SetInt(arquivo,"Preso",Prisao[playerid]);
- DOF2_SetInt(arquivo,"Contagem",quantidade[playerid]);
- DOF2_SaveFile();
- SpawnPlayer(playerid);
- SendClientMessage(playerid,0x00FF00FF,"[SERVER] Pronto, você está livre.");
- return 1;
- }
- // ____________________________ ZCMDs ____________________________
- CMD:pmcmds(playerid, params[])
- {
- if(policial[playerid]==1) {
- new strdialog[2024];
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/pmc [texto]{FFFFFF} => Chat Policial.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/procurar [ID]{FFFFFF} => Procure um Player por ID.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/v{FFFFFF} => Crie um veículo policial.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/procurados{FFFFFF} => Ver lista de procurados.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/moto{FFFFFF} => Crie uma moto policial.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/dizer{FFFFFF} => Diga algo em destaque para os players.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/helicoptero{FFFFFF} => Crie um helicóptero policial.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/prender [ID]{FFFFFF} => Prenda um Player por 3 minutos.\n");
- format(strdialog, sizeof(strdialog),"%s%s",strdialog, "{00FF00}/desprender [ID]{FFFFFF} => Liberte um player que esteja preso.\n");
- return ShowPlayerDialog(playerid, DialogBoxEx, DIALOG_STYLE_MSGBOX, "===== {00FF00}Comandos de Policial{FFFFFF} =====", strdialog, "OK", "");
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:policiais(playerid, params[])
- {
- new arm[500]; arm[0] = '\0';
- new str[500]; str[0] = '\0';
- new Nome[24]; Nome[0] = '0';
- new count;
- for(new i=0;i<MAX_PLAYERS;i++) {
- if(policial[i] > 0 && IsPlayerConnected(i)) {
- count++;
- GetPlayerName(i, Nome, sizeof(Nome));
- format(str, sizeof(str),"{FFFFFF}Nome: {00FF00}%s {FFFFFF}[%i]\n", Nome, i);
- strcat(arm, str);
- }
- }
- if(count<=0)return ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {00FF00}Policiais{FFFFFF} ======", "{FF0000}Nenhum policial online", "OK", "");
- if(count>0)ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {00FF00}Policiais{FFFFFF} ======", arm, "OK", "");
- return 1;
- }
- CMD:procurados(playerid, params[])
- {
- static arm[500]; arm[0] = '\0';
- static str[500]; str[0] = '\0';
- static Nome[24]; Nome[0] = '0';
- new count;
- new preso[32];
- for(new i=0;i<MAX_PLAYERS;i++) {
- if(procurado[i] > 0 && IsPlayerConnected(i) && policial[i]==0 && GetPlayerWantedLevel(i) > 0) {
- count++;
- GetPlayerName(i, Nome, sizeof(Nome));
- if(Prisao[i]==1)preso="{00FF00}Sim";
- if(Prisao[i]==0)preso="{FF0000}Não";
- format(str, sizeof(str),"{FFFFFF}Nome: {FF0000}%s {FFFFFF}[%i] {FF0000}(Nível: %d) {FFFFFF}| Preso: %s{FFFFFF}\n", Nome, i, GetPlayerWantedLevel(i), preso);
- strcat(arm, str);
- }
- }
- if(count<=0)return ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Procurados{FFFFFF} ======", "{00FF00}Nenhum suspeito online", "OK", "");
- if(count>0)ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Procurados{FFFFFF} ======", arm, "OK", "");
- return 1;
- }
- CMD:pmc(playerid, params[])
- {
- if(policial[playerid]==1) {
- if(!cmd[3])return SendClientMessage(playerid, 0xFF0000FF, "[SERVER] USO: /chat [texto]");
- format(texto, sizeof(texto), "[Policiais] %s: {FFFFFF}%s", pnome(playerid), cmd[5]);
- for(new i=0;i<MAX_PLAYERS;i++)
- if(policial[i]==1)SendClientMessage(i,0x1E90FFFF,texto);
- return 1;
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:procurar(playerid, params[])
- {
- if(policial[playerid]==1) {
- if(sscanf(params, "u",giveplayerid)) { return SendClientMessage(playerid, -1, "[SERVER] Uso: /procurar [ID]"); }
- else
- {
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "[SERVER] Id invalido.");
- SendClientMessage(playerid, COR_AZUL, "[SERVER] Para desativar o GPS use /procurar d");
- format(texto,sizeof(texto),"[SERVER] Policial %s está a sua procura.", pnome(playerid));
- SendClientMessage(giveplayerid,COR_VERMELHO,texto);
- new Float:X,Float:Y,Float:Z;
- procurando[playerid]=1;
- GetPlayerPos(giveplayerid, X,Y,Z);
- SetPlayerCheckpoint(playerid, X,Y,Z, 6);
- timer[playerid] = SetTimerEx("Procurar",100,true,"ii",playerid,giveplayerid);
- }
- if (procurando[playerid]==1) {
- switch (cmd[10]) {
- case 'd': DisablePlayerCheckpoint(playerid), KillTimer(timer[playerid]), procurando[playerid]=0, SendClientMessage(playerid, COR_BRANCO, "[SERVER] GPS Desativado.");
- }
- }
- return 1;
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:dizer(playerid, params[])
- {
- if(policial[playerid]==1) {
- if(!cmd[5])return SendClientMessage(playerid, 0xFF0000FF, "[SERVER] USO: /dizer [texto]");
- format(texto, sizeof(texto), "[POLICIAL] %s: {FFFFFF}%s", pnome(playerid), cmd[7]);
- SendClientMessageToAll(0x00FF00AA, texto);
- return 1;
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:prender(playerid, params[])
- {
- new variavel[256];
- new nomep[32];
- new Float:x, Float:y, Float:z;
- if(policial[playerid]==1) {
- if(sscanf(params, "u",giveplayerid)) { return SendClientMessage(playerid, -1, "[SERVER] Uso: /prender [ID]"); }
- else
- {
- if(policial[giveplayerid]==1)return SendClientMessage(playerid, COR_CINZA, "[SERVER] Player é um policial!");
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "[SERVER] Id invalido.");
- if(Prisao[giveplayerid]==1) return SendClientMessage(playerid, COR_CINZA, "[SERVER] Player já está preso!");
- level[giveplayerid] = GetPlayerWantedLevel(giveplayerid);
- GetPlayerPos(giveplayerid, x, y, z);
- if(IsPlayerConnected(giveplayerid) && IsPlayerInRangeOfPoint(playerid, 10, x, y, z)) {
- if(level[giveplayerid] == 5) {
- Prisao[giveplayerid] = 1;
- GetPlayerName(giveplayerid,nomep,sizeof(nomep));
- SetPlayerPos(giveplayerid, 197.6661, 173.8179, 1003.0233);
- SetPlayerInterior(giveplayerid, 3);
- time[giveplayerid] = SetTimerEx("SetPlayerPrisao", 180000, 0, "i", giveplayerid);
- format(variavel,sizeof(variavel),"[SERVER] Você foi preso pelo policial %s",pnome(playerid));
- format(texto,sizeof(texto),"[SERVER] %s foi preso por 3 minutos pelo policial %s",nomep,pnome(playerid));
- SendClientMessage(giveplayerid, COR_VERMELHO, variavel);
- SendClientMessageToAll(COR_VERMELHO, texto);
- }
- if(level[giveplayerid] < 5){ return SendClientMessage(playerid, COR_CINZA, "[SERVER] O Player não tem level de procurado suficiente!"); }
- }
- }
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:desprender(playerid, params[])
- {
- new nomep[32];
- if(policial[playerid]==1) {
- if(sscanf(params, "u",giveplayerid)) { return SendClientMessage(playerid, -1, "[SERVER] Uso: /desprender [ID]"); }
- else
- {
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "[SERVER] Id invalido.");
- if(Prisao[giveplayerid]==0) return SendClientMessage(playerid, COR_CINZA, "[SERVER] Player não está preso!");
- GetPlayerName(giveplayerid,nomep,sizeof(nomep));
- SetPlayerInterior(giveplayerid,0);
- SpawnPlayer(giveplayerid);
- Prisao[giveplayerid] = 0;
- GameTextForPlayer(giveplayerid, "~g~Voce esta livre!", 1000,1);
- level[giveplayerid]=0;
- SetPlayerWantedLevel(giveplayerid, level[giveplayerid]);
- GetPlayerWantedLevel(giveplayerid);
- KillTimer(time[giveplayerid]);
- procurado[giveplayerid]=0;
- quantidade[giveplayerid]=0;
- format(arquivo, sizeof(arquivo), ARQUIVO,nomep);
- DOF2_SetInt(arquivo,"Procurado",procurado[giveplayerid]);
- DOF2_SetInt(arquivo,"LevelProcura",level[giveplayerid]);
- DOF2_SetInt(arquivo,"Preso",Prisao[giveplayerid]);
- DOF2_SetInt(arquivo,"Contagem",quantidade[giveplayerid]);
- DOF2_SaveFile();
- format(texto,sizeof(texto),"[SERVER] %s foi solto pelo policial %s",nomep,pnome(playerid));
- SendClientMessageToAll(COR_AZUL,texto);
- SendClientMessage(giveplayerid,0x00FF00FF,"[SERVER] Pronto, você está livre.");
- return 1;
- }
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:v(playerid, params[])
- {
- if(policial[playerid]==1) {
- if(IsPlayerInAnyVehicle(playerid)) {
- return SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você já está em um veículo");
- }
- playermoney = GetPlayerMoney(playerid);
- if(playermoney > 1000) {
- new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
- GetPlayerPos(playerid, var0, var1, var2);
- GetPlayerFacingAngle(playerid, var3);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você gastou R$ 1.000,00 pelo veículo.");
- carro = CreateVehicle(596, var0 + 1, var1 + 1, var2, var3, 103, 1, 60);
- SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você gastou R$ 1.000,00 pelo veículo.");
- PutPlayerInVehicle(playerid, carro, 0);
- }
- else {
- SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não tem dinheiro suficiente");
- }
- return 1;
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:moto(playerid, params[])
- {
- if(policial[playerid]==1) {
- if(IsPlayerInAnyVehicle(playerid)) {
- return SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você já está em um veículo");
- }
- playermoney = GetPlayerMoney(playerid);
- if(playermoney > 1000) {
- new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
- GetPlayerPos(playerid, var0, var1, var2);
- GetPlayerFacingAngle(playerid, var3);
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você gastou R$ 1.000,00 pelo veículo.");
- carro = CreateVehicle(523, var0 + 1, var1 + 1, var2, var3, 103, 1, 60);
- SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você gastou R$ 1.000,00 pelo veículo.");
- PutPlayerInVehicle(playerid, carro, 0);
- }
- else {
- SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não tem dinheiro suficiente");
- }
- return 1;
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- CMD:helicoptero(playerid, params[])
- {
- if(policial[playerid] == 1) {
- if(IsPlayerInAnyVehicle(playerid)) {
- return SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você já está em um veículo");
- }
- playermoney = GetPlayerMoney(playerid);
- if(playermoney > 4000) {
- new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
- GetPlayerPos(playerid, var0, var1, var2);
- GetPlayerFacingAngle(playerid, var3);
- GivePlayerMoney(playerid,-4000);
- SendClientMessage(playerid, 0x33AA33AA, "[SERVER] Você gastou R$ 4.000,00 pelo veículo.");
- carro = CreateVehicle(497, var0 + 1, var1 + 1, var2, var3, 103, 1, 60);
- PutPlayerInVehicle(playerid, carro, 0);
- }
- else {
- SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não tem dinheiro suficiente.");
- }
- return 1;
- }
- return SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é policial!");
- }
- // _______________________________ RCON _______________________________
- CMD:darpm(playerid, params[])
- {
- new nomep[32];
- if(IsPlayerAdmin(playerid)) {
- if(sscanf(params, "u",giveplayerid)) { return SendClientMessage(playerid, -1, "[SERVER] Uso: /darpm [ID]"); }
- else
- {
- GetPlayerName(giveplayerid,nomep,sizeof(nomep));
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "[SERVER] Id invalido.");
- if(policial[giveplayerid]==1){return SendClientMessage(playerid, COR_CINZA, "[SERVER] Player já é Policial!");}
- if(procurado[giveplayerid]==1){return SendClientMessage(playerid, COR_CINZA, "[SERVER] O player é um procurado.");}
- policial[giveplayerid]=1;
- format(arquivo, sizeof(arquivo), ARQUIVO, nomep);
- DOF2_SetInt(arquivo,"Policial",policial[giveplayerid]);
- DOF2_SaveFile();
- format(texto,sizeof(texto),"[SERVER] %s [%d] foi feito policial pelo Admin %s",nomep,giveplayerid,pnome(playerid));
- SendClientMessage(giveplayerid, COR_AZUL, "[SERVER] Para ver os comandos de PMs, use /pmcmds");
- SendClientMessageToAll(COR_AZUL, texto);
- }
- }
- else { SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é Admin!"); }
- return 1;
- }
- CMD:tirarpm(playerid, params[])
- {
- new nomep[32];
- if(IsPlayerAdmin(playerid)) {
- if(sscanf(params, "u",giveplayerid)) { return SendClientMessage(playerid, -1, "[SERVER] Uso: /tirarpm [ID]"); }
- else
- {
- GetPlayerName(giveplayerid,nomep,sizeof(nomep));
- if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "[SERVER] Id invalido.");
- if(policial[giveplayerid]!=1) SendClientMessage(playerid, COR_CINZA, "[SERVER] Player não é um policial!");
- policial[giveplayerid]=0;
- format(arquivo, sizeof(arquivo), ARQUIVO, nomep);
- DOF2_SetInt(arquivo,"Policial",policial[giveplayerid]);
- DOF2_SaveFile();
- format(texto,sizeof(texto),"[SERVER] %s [%d] foi retirado dos policiais pelo admin %s",nomep,giveplayerid,pnome(playerid));
- SendClientMessageToAll(COR_VERMELHO, texto);
- }
- }
- else { SendClientMessage(playerid, COR_CINZA, "[SERVER] Você não é Admin!"); }
- return 1;
- }
- // _______________________________________________________________ FIM DO CÓDIGO
- // Bugs? Ajuda?
- // [email protected] << MSN
- // marloncs_22 << Skype
Add Comment
Please, Sign In to add comment