[FilterScript] Sistema de Incкndio
#1

Sistema de Incкndio

Desenvolvido por Shadoww5
Descriзгo:

Notei que aqui no fуrum hб poucos topicos relacionados а isto. Dentre os mais procurados (dois), um estб com o link invбlido e o outro й do rjj.

Todavia, eu quis criar um sistema alternativo ao dele (que й muito bom, diga-se de passagem) e aprimorar meus conhecimentos em pawn.

Este filterscript envolve nгo sу a questгo do incкndio, mas tambйm os bombeiros, algo realmente interessante para os servidores RPG/RP. O incкndio ocorre randomicamente, de acordo com os locais definidos por quem baixar este FS.
  • Caso vocк esteja logado na RCON й possivel /ativar e /desativar o FS pelo proprio jogo sem precisar descarregб-lo;
  • Para apagar o fogo й preciso entrar em /servico. Quando vocк entra, sua skin fica salva e quando vocк sai do serviзo ele й setada novamente;
  • Para localizar a HQ basta digitar /hq e entгo um icone serб criado no mapa;
  • O FS jб vem com 3 carros (emplacados) e uma HQ (HeadQuarter - sede), onde й possivel pegar colete (70 %), eagle (no maximo 250 muniзхes) e exintor (no maximo 750), e 10 locais de incкndios pre-definidos;
  • Para ser um bombeiro basta digitar /bm. Para fazer o contrario: /bmsair. Ao apagar um incкndio o jogador ganha 500 dуlares;
  • Ao entrar em serviзo, vocк passa a receber chamados para apgar fogo e, caso haja um #define TEXT3D no FS (jб tem, a nгo ser que vocк o retire), um texto й criado sobre a sua cabeзa;
  • Os carros de bombeiro e a HQ sу sгo acessiveis para os proprios bombeiros;
  • Se o incкndio nгo for apagado por ninguйm, ele й destruido automaticamente. O tempo para isto ocorrer й definido pela #define APAGAR. Й de vital importвncia para o FS que este define seja maior que a #define TEMPO (que serve para definir o tempo entre um incкndio e outro) e que 9;
  • O salvamento/carregamento й feito automaticamente no arquivo Bombeiros.txt (na pasta Scriptfiles | nгo precisa criб-lo, pois ele й criado automaticamente, caso nгo exista) quando o jogador desconectar/conectar ou quando o FS for descarregado/carregado;
  • No local exato do incкndio hб um pouco de lag, pois hб 7 objetos no local e arredores;
  • Quando o FS й carregado, й normal que ocorra um leve erro no checkpoint e no local do fogo, o que pode causar uma confusгo, mas depois do primeiro fica tudo certo.
Qualquer duvida ou erro no FS (deve haver alguns, admito) peзo que me comuniquem.

Screenshot:

/imageshack/img854/4...2218560536.jpg
/imageshack/img17/180...2218583508.jpg
/imageshack/img845/6...2218591738.jpg
/imageshack/img200/8...2219022266.jpg
/imageshack/img821/1...2219025514.jpg
/imageshack/img824/6...2219160885.jpg
/imageshack/img14/212...2219203567.jpg
/imageshack/img845/5...2219272765.jpg

Download: Codigo:

PHP код:
/*! FILTERSCRIPT DE INCENDIO DESENVOLVIDO POR SHADOWW5 !
  ! FILTERSCRIPT DE INCENDIO DESENVOLVIDO POR SHADOWW5 !
           Contato: http://*******/iT6xEw
           Contato: http://*******/iT6xEw
    NAO RETIRE OS CREDITOS !! NAO RETIRE OS CREDITOS !!
    NAO RETIRE OS CREDITOS !! NAO RETIRE OS CREDITOS !!*/
#include <a_samp>
#include <Dini>
#define FILTERSCRIPT
#define HOLDING(%0) \
    
((newkeys & (%0)) == (%0))
#define RELEASED(%0) \
    
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
#define PRESSED(%0) \
    
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define ICON 42
#define ENTRAR 942
#define SAIR 943
#define AJUDA 944
#define BRANCO 0xFFFFFFFF
#define CINZA 0xD6D6D6FF
#define VERMELHO 0xFF0000FF
#define AMARELO 0xF7E200FF
#define LARANJA 0xE89200FF
#define TEXT3D //CASO QUEIRA QUE NA CABEЗA DO BOMBEIRO TENHA DIZENDO QUE ELE Й BOMBEIRO DEIXE ESTE #define, CASO NГO, RETIRE-O
#define TEMPO 35 //TROQUE PELO TEMPO ENTRE UM INCENDIO E OUTRO (EM SEGUNDOS !)
#define APAGAR 30 //TROQUE PELO TEMPO QUE OS BOMBEIROS TКM PARA APAGAR O INCENDIO (EM SEGUNDOS !)
// OBS: "APAGAR" DEVE SER MAIOR QUE 9 E MENOR QUE "TEMPO"
// OBS: "APAGAR" DEVE SER MAIOR QUE 9 E MENOR QUE "TEMPO"
new Float:Fogo[][3] = {
{
1916.9470, -1400.908213.5703}, //TROQUE PELAS COORDENADAS QUE O FOGO PODE ESTAR
{2330.6628, -1805.527013.5469},  //TROQUE PELAS COORDENADAS QUE O FOGO PODE ESTAR
{2382.5210, -1131.247930.2030},
{
2164.3052, -1004.478062.7962},
{
1282.3912, -817.939584.1406},
{
811.7228, -1098.165325.9063},
{
649.1138, -1705.134514.5158},
{
153.8757, -1941.52433.7734},
{
132.7246, -1516.675510.4878},
{
262.1424, -1171.095179.4105}
};
new 
Cores[] = {
0xE02A2AFF,
0x3CE02AFF,
0xED8E12FF,
0xED12BAFF,
0x4912EDFF,
0x12EDAFFF
};
new 
Timer;
new 
Tick;
new 
Text3D:Saida;
new 
bool:F;
new 
bool:Chegou[MAX_PLAYERS];
new 
bool:Servico[MAX_PLAYERS];
new 
bool:Bombeiro[MAX_PLAYERS];
new 
Apagando[MAX_PLAYERS];
new 
Float:LugarFogo[3];
new 
pickups[5];
new 
Carros[3];
new 
Fire[7];
#if defined TEXT3D
new Text3D:texto[MAX_PLAYERS];
#endif
forward Msgs();
forward Apagar();
forward Check(playerid);
forward Fogoo();
public 
OnPlayerConnect(playerid)
{
    
Apagando[playerid] = 0;
    
Servico[playerid] = false;
    
Chegou[playerid] = false;
    
Carregar(playerid);
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
Salvar(playerid);
    return 
1;
}
public 
OnFilterScriptInit()
{
    
SetTimer("Msgs",420000true);
    
SetTimer("Fogoo"1000true);
    
false;
    new 
fire random(sizeof(Fogo));
    
LugarFogo[0] = Fogo[fire][0];
    
LugarFogo[1] = Fogo[fire][1];
    
LugarFogo[2] = Fogo[fire][2];
    
Saida Create3DTextLabel("Saнda HQ Bombeiros"AMARELO2324.4641, -1148.80711050.71012501);
    
pickups[0] = CreatePickup(13181999999.9999999.9999999.9, -1);
    
pickups[1] = CreatePickup(131811732.9530, -1452.623413.5513, -1);
    
pickups[2] = CreatePickup(36612338.0422, -1139.89471054.3047, -1);
    
pickups[3] = CreatePickup(124212311.0833, -1139.81054.3047, -1);
    
pickups[4] = CreatePickup(34812311.0740, -1137.72251054.3047, -1);
    
Carros[0] = CreateVehicle(4071753.2189, -1457.086413.7812333.11023390); // CARRO DOS BOMBEIROS
    
Carros[1] = CreateVehicle(4071748.2573, -1456.247713.7720329.72773390); // CARRO DOS BOMBEIROS
    
Carros[2] = CreateVehicle(4071743.6870, -1455.556313.7655328.42893390); // CARRO DOS BOMBEIROS
    
SetVehicleNumberPlate(Carros[0], "{FF0000}[BM] {071775}VTR 1");
    
SetVehicleNumberPlate(Carros[1], "{FF0000}[BM] {071775}VTR 2");
    
SetVehicleNumberPlate(Carros[2], "{FF0000}[BM] {071775}VTR 3");
    for(new 
0MAX_PLAYERS++) { OnPlayerConnect(i); }
    if(!
fexist("Bombeiros.txt")) return dini_Create("Bombeiros.txt");
    print(
"---------------------------------------");
    print(
"Sistema de Incendio criado por Shadoww5");
    print(
"       CARREGADO COM SUCESSO !");
    print(
"     Contato: http://*******/iT6xEw");
    print(
"---------------------------------------");
    return 
1;
}
public 
OnFilterScriptExit()
{
    for(new 
0sizeof(Carros); ++) { DestroyVehicle(Carros[c]); DestroyVehicle(Carros[c]); }
    for(new 
0sizeof(Fire); ++) { DestroyObject(Fire[f]); DestroyObject(Fire[f]); }
    for(new 
0sizeof(pickups); ++) {    DestroyPickup(pickups[p]); }
    for(new 
0MAX_PLAYERS++)
    {
        if(
Servico[i] == true) return DisablePlayerCheckpoint(i);
        
OnPlayerDisconnect(i1);
    }
    
Delete3DTextLabel(Saida);
    print(
"---------------------------------------");
    print(
"Sistema de Incendio criado por Shadoww5");
    print(
"      DESCARREGADO COM SUCESSO !");
    print(
"    Contato: http://*******/iT6xEw");
    print(
"---------------------------------------");
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
cmd[256], idx;
    
cmd strtok(cmdtextidx);
    if(
strcmp(cmd"/bm"true) == 0)
    {
        if(
Bombeiro[playerid] == true) return SendClientMessage(playeridVERMELHO"Vocк jб й bombeiro.");
        
ShowPlayerDialog(playeridENTRARDIALOG_STYLE_MSGBOX"Confirmaзгo:""Vocк tem certeza que quer ser bombeiro ?""Sim""Nгo");
        return 
1;
    }
    if(
strcmp(cmd"/bmsair"true) == 0)
    {
        if(
Bombeiro[playerid] == false) return SendClientMessage(playeridVERMELHO"Vocк nгo й bombeiro.");
        
ShowPlayerDialog(playeridSAIRDIALOG_STYLE_MSGBOX"Confirmaзгo:""Vocк tem certeza que nгo quer mais ser bombeiro ?""Sim""Nгo");
        return 
1;
    }
    if(
strcmp(cmd"/hq"true) == 0)
    {
        
SendClientMessage(playeridLARANJA"Siga a marca de uma sirene vermelha no mapa e lб vocк encontrarб a HQ Bombeiros.");
        
SetPlayerMapIcon(playeridICON1731.51, -1449.3213.12200xFFFFFFFFMAPICON_GLOBAL);
        return 
1;
    }
    if(
strcmp(cmd"/servico"true) == || strcmp(cmd"/serviзo"true) == 0)
    {
        if(
Bombeiro[playerid] == false) return SendClientMessage(playeridVERMELHO"Vocк nгo й bombeiro.");
        if(
Servico[playerid] == false)
        {
            
Servico[playerid] = true;
            
SendClientMessage(playeridAMARELO"Vocк entrou em serviзo.");
            
SetPVarInt(playerid"Skin"GetPlayerSkin(playerid));
            new 
skin[3] = { 277278279 };
            
SetPlayerSkin(playeridskin[random(sizeof(skin))]);
            
#if defined TEXT3D
            
Delete3DTextLabel(texto[playerid]);
            
texto[playerid] = Create3DTextLabel("» Bombeiro: EM SERVIЗO «",0xFF2600FF,10.0,40.0,10.0,20.0,0);
               
Attach3DTextLabelToPlayer(texto[playerid], playerid0.00.00.4);
               
#endif
        
}
        else
        {
            
Servico[playerid] = false;
            
SendClientMessage(playeridAMARELO"Vocк saiu do serviзo.");
            
SetPlayerSkin(playeridGetPVarInt(playerid"Skin"));
            
DisablePlayerCheckpoint(playerid);
            
#if defined TEXT3D
            
Delete3DTextLabel(texto[playerid]);
            
#endif
        
}
        return 
1;
    }
    if(
strcmp(cmd"/chat"true) == || strcmp(cmd"/c"true) == 0)
    {
        if(
Bombeiro[playerid] == false) return SendClientMessage(playeridVERMELHO"Vocк nгo й bombeiro.");
        new 
string[256], n[24];
        new 
length strlen(cmdtext);
        while ((
idx length) && (cmdtext[idx] <= ' '))
        {
            
idx++;
        }
        new 
offset idx;
        new 
result[64];
        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
        {
            
result[idx offset] = cmdtext[idx];
            
idx++;
        }
        
result[idx offset] = EOS;
        if(!
strlen(result)) return SendClientMessage(playerid, -1"USO: /chat [TEXTO]");
        
GetPlayerName(playeridnsizeof(n));
        for(new 
0MAX_PLAYERS++)
        {
            if(
Bombeiro[i] == true)
            {
                
format(stringsizeof(string), "{FF0000}[CHAT BOMBEIRO]{FFFFFF} %s: %s"nresult);
                
SendClientMessage(i, -1string);
            }
        }
        return 
1;
    }
    if(
strcmp(cmd"/removergps"true) == 0)
    {
        
DisablePlayerCheckpoint(playerid);
        
SendClientMessage(playeridLARANJA"Todos os checkpoints foram removidos do seu mapa !");
        return 
1;
    }
    if(
strcmp(cmd"/bombeiros"true) == 0)
    {
        new 
nome[24], string[128], found 0;
        for(new 
0MAX_PLAYERS++)
        {
            if(
Bombeiro[i] == true)
            {
                
GetPlayerName(inomesizeof(nome));
                
SendClientMessage(playeridBRANCO"======{E89200}[ BOMBEIROS ONLINE ]{FFFFFF}======");
                if(
Servico[i] == true) { format(stringsizeof(string), "  » %s (%d){FFFF00} [EM SERVIЗO]"nomei); }
                else { 
format(stringsizeof(string), "  » %s (%d){1AA006} [JOGANDO]"nomei); }
                
SendClientMessage(playeridBRANCOstring);
                
found++;
            }
            if(
found == 0) return SendClientMessage(playeridLARANJA"Nenhum bombeiro ONLINE no momento.");
        }
        return 
1;
    }
    if(
strcmp(cmd"/desativar"true) == 0)
    {
        if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo estб logado na RCON.");
        for(new 
0sizeof(Fire); ++)
        {
            
DestroyObject(Fire[f]);
            
DestroyObject(Fire[f]);
        }
        
true;
        for(new 
0MAX_PLAYERS++)
        {
            
Servico[i] = false;
            
Apagando[i] = 0;
            
Chegou[i] = false;
            
DisablePlayerCheckpoint(i);
            
KillTimer(Timer);
        }
        
SendClientMessage(playeridAMARELO"O sistema de incendio foi desativado temporariamente ! Para reativб-lo digite /ativar.");
        return 
1;
    }
    if(
strcmp(cmd"/ativar"true) == 0)
    {
        if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridVERMELHO"Vocк nгo estб logado na RCON.");
        
false;
        
SendClientMessage(playeridAMARELO"O sistema de incendio foi ativado novamente. Para desativб-lo digite /desativar.");
        return 
1;
    }
    if(
strcmp(cmd"/fogo"true) == 0)
    {
        if(
Bombeiro[playerid] == false) return SendClientMessage(playeridVERMELHO"Vocк nгo й bombeiro.");
        if(
== false) return SendClientMessage(playeridLARANJA"Nгo hб nenhum foco de incendio em San Andreas no momento.");
        
Servico[playerid] = true;
        
SetPlayerCheckpoint(playeridLugarFogo[0], LugarFogo[1], LugarFogo[2], 8.0);
        
SendClientMessage(playeridAMARELO"Siga o checkpoint com um carro de bombeiros ou com um extintor agora !!");
        
Tick GetTickCount();
        return 
1;
    }
    if(
strcmp(cmd"/ajudabombeiro"true) == 0)
    {
        new 
string[1000];
        
strcat(string"\t- /bm: Serve para se tornar um bombeiro."sizeof(string));
        
strcat(string"\n\t- /bmsair: Serve para sair do emprego de bombeiro."sizeof(string));
        
strcat(string"\n\t- /serviзo: Serve para entrar em serviзo, caso vocк seja bombeiro."sizeof(string));
        
strcat(string"\n\t- /fogo: Serve para descobrir qual o local do incкndio."sizeof(string));
        
strcat(string"\n\t- /hq: Serve para localizar a HQ Bombeiros."sizeof(string));
        
strcat(string"\n\t- /removergps: Serve para desabilitar o checkpoint."sizeof(string));
        
strcat(string"\n\t- /bombeiros: Serve para ver quais sгo os bombeiros ONLINE."sizeof(string));
        
strcat(string"\n\t- /chat: Serve para se comunicar com os outros bombeiros ONLINE."sizeof(string));
        
strcat(string"\n\t- /ativar: Serve para ativar o sistema de incкndio, quando desativado. ESTE COMANDO SУ PODER SER USADO POR ADMINS !"sizeof(string));
        
strcat(string"\n\t- /desativar: Faz o contrario do comando anterior. ESTE COMANDO SУ PODER SER USADO POR ADMINS !"sizeof(string));
        
strcat(string"\n\nOBS№: Os comandos de administrador sу podem ser usados caso o jogador esteja logado na RCON."sizeof(string));
        
strcat(string"\nOBSІ: Caso o checkpoint seja desativado nгo serб possivel apagar o fogo. Para ativб-lo novamente, digite /fogo."sizeof(string));
        
strcat(string"\nOBSі: Ao apagar um incкndio, o jogador й remunerado em 500 $."sizeof(string));
        
ShowPlayerDialog(playeridAJUDADIALOG_STYLE_MSGBOX"Sistema de Incкndio criado por Shadoww5 !"string"OK""");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == ENTRAR)
    {
        if(
response)
        {
            for(new 
0MAX_PLAYERSi++) { if(Bombeiro[i] == true) return SendClientMessage(playeridLARANJA"Hб um novo bombeiro ! Digite /bombeiros para saber quem й."); }
            
SendClientMessage(playeridAMARELO"Vocк acaba de tornar-se um bombeiro. Digite /ajudabombeiro para conhecer os comandos.");
            
Bombeiro[playerid] = true;
        }
    }
    if(
dialogid == SAIR)
    {
        if(
response)
        {
            
SendClientMessage(playeridAMARELO"Vocк agora nгo й mais bombeiro.");
            
Bombeiro[playerid] = false;
            
Servico[playerid] = false;
            
Chegou[playerid] = false;
        }
    }
    return 
1;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
    if(
Servico[playerid] == true && Chegou[playerid] == false)
    {
        
SendClientMessage(playeridLARANJA"Vocк acaba de chegar no foco de incendio ! Aponte o extintor ou o jato d'agua para o fogo por algum tempo para apagб-lo.");
        
Chegou[playerid] = true;
    }
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
HOLDING(KEY_FIRE) && Servico[playerid] == true)
    {
        
SetTimerEx("Check"750false"i"playerid);
        
Apagando[playerid] = 1;
    }
    if(
RELEASED(KEY_FIRE))
    {
        
Apagando[playerid] = 0;
    }
    if(
PRESSED(KEY_SECONDARY_ATTACK))
    {
        if(
IsPlayerInRangeOfPoint(playerid1.21732.9530, -1452.623413.5513))
        {
            if(
Bombeiro[playerid] == false) return SendClientMessage(playeridVERMELHO"Vocк nгo pode entrar na HQ Bombeiros.");
            
SetPlayerPos(playerid2324.5447, -1147.25441050.7101);
            
SetPlayerInterior(playerid12);
            
SetPlayerFacingAngle(playerid359.8319);
            
SetCameraBehindPlayer(playerid);
        }
        if(
IsPlayerInRangeOfPoint(playerid1.22324.4641,-1148.8071,1050.7101))
        {
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid1732.8002, -1449.759813.5469);
            
SetPlayerFacingAngle(playerid357.7995);
            
SetCameraBehindPlayer(playerid);
        }
        if(
IsPlayerInRangeOfPoint(playerid1.22338.0422,-1139.8947,1054.3047))
        {
            new 
arma[2];
            
GetPlayerWeaponData(playerid9arma[0], arma[1]);
            if(
arma[0] == 42 && arma[1] >= 750) return SendClientMessage(playeridVERMELHO"No momento vocк nгo pode pegar mais extintores.");
            
GivePlayerWeapon(playerid42150);
        }
        if(
IsPlayerInRangeOfPoint(playerid1.22311.0740, -1137.72251054.3047))
        {
            new 
arma[2];
            
GetPlayerWeaponData(playerid2arma[0], arma[1]);
            if(
arma[0] == 24 && arma[1] >= 250) return SendClientMessage(playeridVERMELHO"No momento vocк nгo pode pegar mais muniзхes.");
            
GivePlayerWeapon(playerid2450);
        }
        if(
IsPlayerInRangeOfPoint(playerid1.22311.0833, -1139.81054.3047)) return SetPlayerArmour(playerid80);
    }
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == 2)
    {
        if(
GetPlayerVehicleID(playerid) >= Carros[0] && GetPlayerVehicleID(playerid) <= Carros[2])
        {
            if(
Bombeiro[playerid] == false)
            {
                
RemovePlayerFromVehicle(playerid);
                
SendClientMessage(playeridVERMELHO"Vocк nгo й bombeiro e, por isso, nгo pode pegar esta viatura.");
            }
        }
    }
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    if(
Bombeiro[playerid] == true)
    {
        
SetPlayerPos(playerid2324.3792, -1136.65161051.3047);
        
SetPlayerInterior(playerid12);
        
SetPlayerFacingAngle(playerid178.7233);
        
SetCameraBehindPlayer(playerid);
    }
    return 
1;
}
public 
Fogoo()
{
    new 
fire random(sizeof(Fogo));
    new 
Float:XFloat:YFloat:Z;
    
GetObjectPos(Fire[0], XYZ);
    if(
LugarFogo[0] != X) { LugarFogo[0] = X; }
    else if(
LugarFogo[1] != Y) { LugarFogo[1] = Y; }
    else if(
LugarFogo[2] != Z) { LugarFogo[2] = Z; }
    if(
GetTickCount() - Tick TEMPO*1000)
    {
        if(
== false)
        {
            for(new 
0sizeof(Fire); ++) { DestroyObject(Fire[f]); DestroyObject(Fire[f]); }
            
true;
            
Timer SetTimer("Apagar"APAGAR*1000false);
            
Fire[0] = CreateObject(18691Fogo[fire][0], Fogo[fire][1], Fogo[fire][2]-2.50.00.00.0);
            
Fire[1] = CreateObject(18691Fogo[fire][0]+1Fogo[fire][1], Fogo[fire][2]-2.50.00.00.0);
            
Fire[2] = CreateObject(18691Fogo[fire][0], Fogo[fire][1]+1Fogo[fire][2]-2.50.00.00.0);
            
Fire[3] = CreateObject(18691Fogo[fire][0]+1Fogo[fire][1]+1Fogo[fire][2]-2.50.00.00.0);
            
Fire[4] = CreateObject(18691Fogo[fire][0]-1Fogo[fire][1], Fogo[fire][2]-2.50.00.00.0);
            
Fire[5] = CreateObject(18691Fogo[fire][0], Fogo[fire][1]-1Fogo[fire][2]-2.50.00.00.0);
            
Fire[6] = CreateObject(18691Fogo[fire][0]-1Fogo[fire][1]-1Fogo[fire][2]-2.50.00.00.0);
            for(new 
0MAX_PLAYERSi++)
            {
                if(
Bombeiro[i] == true && Servico[i] == true)
                {
                    new 
str[128];
                    
format(strsizeof(str), "Hб um novo foco de incкndio ! Siga o checkpoint com um carro de bombeiros ou extintor agora !!"Fogo[fire][0], Fogo[fire][1], Fogo[fire][2]);
                    
SendClientMessage(iAMARELOstr);
                    
SetPlayerCheckpoint(iFogo[fire][0], Fogo[fire][1], Fogo[fire][2], 8.0);
                    
LugarFogo[0] = Fogo[fire][0];
                    
LugarFogo[1] = Fogo[fire][1];
                    
LugarFogo[2] = Fogo[fire][2];
                }
            }
        }
    }
    for(new 
0MAX_PLAYERS++) { if(IsPlayerInRangeOfPoint(i401731.51, -1449.3213.12)) return RemovePlayerMapIcon(iICON); }
    return 
1;
}
public 
Apagar()
{
    if(
== true)
    {
        for(new 
0MAX_PLAYERS++)
        {
            if(
Bombeiro[i] == true && Servico[i] == true)
            {
                
SendClientMessage(iVERMELHO"O incendio nao foi apagado por nenhum bombeiro e o fogo se extinguiu.");
                
DisablePlayerCheckpoint(i);
                
Chegou[i] = false;
            }
            
false;
            for(new 
0sizeof(Fire); ++)
            {
                
DestroyObject(Fire[f]);
                
DestroyObject(Fire[f]);
            }
            
Tick GetTickCount();
        }
    }
    return 
1;
}
public 
Check(playerid)
{
    if(
== true)
    {
        if(
GetPlayerState(playerid) == 1)
        {
            if(
GetPlayerWeapon(playerid) == 42)
            {
                if(
IsPlayerInRangeOfPoint(playerid7.0LugarFogo[0], LugarFogo[1], LugarFogo[2]))
                {
                    if(
Apagando[playerid] > 0)
                    {
                        
Apagando[playerid]++;
                        
SetTimerEx("Check"750false"i"playerid);
                        if(
Apagando[playerid] == 13)
                        {
                            for(new 
0sizeof(Fire); ++) { DestroyObject(Fire[f]); DestroyObject(Fire[f]); }
                            
false;
                            
GivePlayerMoney(playerid500);
                            for(new 
0MAX_PLAYERS++)
                            {
                                
Chegou[i] = false;
                                
Apagando[i] = 0;
                                
SendClientMessage(iAMARELO"O incкndio foi apagado !");
                                
Tick GetTickCount();
                                
DisablePlayerCheckpoint(i);
                                
KillTimer(Timer);
                            }
                        }
                    }
                }
            }
        }
        if(
GetPlayerState(playerid) == 2)
        {
            if(
GetVehicleModel(GetPlayerVehicleID(playerid)) == 407)
            {
                if(
IsPlayerInRangeOfPoint(playerid12.0LugarFogo[0], LugarFogo[1], LugarFogo[2]))
                {
                    if(
Apagando[playerid] > 0)
                    {
                        
Apagando[playerid]++;
                        
SetTimerEx("Check"750false"i"playerid);
                        if(
Apagando[playerid] == 10)
                        {
                            for(new 
0sizeof(Fire); ++) { DestroyObject(Fire[f]); DestroyObject(Fire[f]); }
                            
false;
                            
GivePlayerMoney(playerid500);
                            for(new 
0MAX_PLAYERS++)
                            {
                                
Chegou[i] = false;
                                
Apagando[i] = 0;
                                
SendClientMessage(iAMARELO"O incкndio foi apagado !");
                                
Tick GetTickCount();
                                
DisablePlayerCheckpoint(i);
                                
KillTimer(Timer);
                            }
                        }
                    }
                }
            }
        }
    }
    return 
1;
}
public 
Msgs()
{
    new 
cor random(sizeof(Cores));
    
SendClientMessageToAll(Cores[cor], "Quer ajuda na profissгo de bombeiro ? /ajudabombeiro.");
     
SendClientMessageToAll(AMARELO,"Este servidor usa o FilterScript de Incкndio criado por Shadoww5.");
    return 
1;
}
stock Salvar(playerid)
{
    new 
save[24],nome[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,nome,sizeof(nome));
    
format(save,sizeof(save),"%s"nome);
     
dini_BoolSet("Bombeiros.txt"saveBombeiro[playerid]);
    return 
1;
}
stock Carregar(playerid)
{
    new 
save[24],nome[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,nome,sizeof(nome));
    
format(save,sizeof(save),"%s",nome);
    if(
dini_Isset("Bombeiros.txt"save))
    {
        
Bombeiro[playerid] = bool:dini_Bool("Bombeiros.txt"save);
    }
    else { 
Bombeiro[playerid] = false; }
    return 
1;
}
/*! FILTERSCRIPT DE INCENDIO DESENVOLVIDO POR SHADOWW5 !
  ! FILTERSCRIPT DE INCENDIO DESENVOLVIDO POR SHADOWW5 !
           Contato: http://*******/iT6xEw
           Contato: http://*******/iT6xEw
    NAO RETIRE OS CREDITOS !! NAO RETIRE OS CREDITOS !!
    NAO RETIRE OS CREDITOS !! NAO RETIRE OS CREDITOS !!*/ 
Reply
#2

aprovado testei com ele
Nota:10
Reply
#3

Bom. Mais Usa strcat em dialog assim :
pawn Код:
new JFS[20];
strcat(JFS," EEEEEEE");
strcat(JFS," EMOOO0");
ShowPlayerDialog...
Bom.
Reply
#4

Eu fiz isso, Jonathan.

Vocк abriu o codigo ?
Reply
#5

Fui eu sim ... Integralmente feito por mim.
Reply
#6

xD.

pawn Код:
strcat(string, "\t- /bm: Serve para se tornar um bombeiro.", sizeof(string));
Para
pawn Код:
strcat(string,"\t- /bm: Serve para se tornar um bombeiro.");
й mais da no Mesmo xD

Parabйns pelo Code. gostei do sistema de bombeiro *-* bom pra RP
Reply
#7

Valeu ae ...

Mas dб tudo na mesma coisa, conforme vocк disse.
Reply
#8

Comentem ae ...

Sу desta forma poderei descobrir os bugs, melhorar o codigo e, consequentemente, otimizar o FilterScript.
Reply
#9

Quote:
Originally Posted by The Knight
Посмотреть сообщение
Foi vocк mesmo que fez? Jб vi uns parecidos na arйa original do fуrum.
Mas bom trabalho, parabйns (:
Eu tambйm, jб vi um feito acho que pelo o rjj.


@tуpico

Bom. Parabйns.
Reply
#10

Quote:
Originally Posted by Ricop522
Посмотреть сообщение
Eu tambйm, jб vi um feito acho que pelo o rjj.


@tуpico

Bom. Parabйns.
Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
Notei que aqui no fуrum hб poucos topicos relacionados а isto. Dentre os mais procurados (dois), um estб com o link invбlido e o outro й do rjj.

Todavia, eu quis criar um sistema alternativo ao dele (que й muito bom, diga-se de passagem) e aprimorar meus conhecimentos em pawn.
.....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)