PHP Code:
#include <a_samp>
#include <core>
#include <float>
new glob0[9];
new Float:glob24[9];
new Float:glob48[9];
new Float:glob6C[9];
new glob90;
new glob94[9];
new globB8[500];
new glob888[500];
new glob1058[500];
public OnFilterScriptInit()
{
print("\n//===================================//");
print(" Incкndio by [FeK]Ken - FeK Squad Member");
print("//===================================//\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext)
{
if(!strcmp("/incendiar", cmdtext, true, 10))
{
if(glob90 == 1)
{
return SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Alguйm jб tocou fogo em algum lugar !");
}
new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0;
GetPlayerPos(playerid, var0, var1, var2);
glob24[0] = -1.9826 + var0;
glob48[0] = -1.5053 + var1;
glob6C[0] = var2 - 2;
glob24[1] = -1.9817 + var0;
glob48[1] = -0.1018 + var1;
glob6C[1] = var2 - 2;
glob24[2] = -3.2436 + var0;
glob48[2] = -1.5876 + var1;
glob6C[2] = var2 - 2;
glob24[3] = -1.9826 + var0;
glob48[3] = -1.5053 + var1;
glob6C[3] = var2 - 2;
glob24[4] = -1.7869 + var0;
glob48[4] = -2.4807 + var1;
glob6C[4] = var2 - 2;
glob24[5] = -1.1714 + var0;
glob48[5] = -0.6008 + var1;
glob6C[5] = var2 - 2;
glob24[6] = -2.4603 + var0;
glob48[6] = 0.0454 + var1;
glob6C[6] = var2 - 2;
glob24[7] = -2.7717 + var0;
glob48[7] = -0.6095 + var1;
glob6C[7] = var2 - 2;
glob24[8] = -2.4603 + var0;
glob48[8] = 0.0454 + var1;
glob6C[8] = var2 - 2;
glob90 = 1;
SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] O Local б sua frente pegarб Fogo em 5 segundos !");
SetTimerEx("Incendio", 5000, false, "i", playerid);
return 1;
}
if(!strcmp("/molotov", cmdtext, true, 8))
{
if(glob90 == 1)
{
return SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Alguйm jб tocou fogo em algum lugar !");
}
SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Vocк recebeu um Molotov para Comeзar um Incкndio !");
SendClientMessage(playerid, 0x33FF00FF, "[INFO] Posicione-se e Segure ao Mбximo a Tecla de Atirar para Lanзar o Molotov !");
GivePlayerWeapon(playerid, 18, 1);
return 1;
}
if(!strcmp("/caminhao", cmdtext, true, 9))
{
if(1 != glob90)
{
return SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Nгo Estб Acontecendo nenhum Incкndio !");
}
new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
GetPlayerPos(playerid, var0, var1, var2);
GetPlayerFacingAngle(playerid, var3);
new var4 = CreateVehicle(407, var0, var1, var2, var3, 3, 1, 60000);
PutPlayerInVehicle(playerid, var4, 0);
SetPlayerCheckpoint(playerid, glob24[1] - 8.3718, glob48[1] - 8.4289, glob6C[1], 8.0);
SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Pare no CheckPoint e Apague o Fogo !");
return 1;
}
if(!strcmp("/extintor", cmdtext, true, 9))
{
if(1 != glob90)
{
return SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Nгo Estб Acontecendo nenhum Incкndio !");
}
GivePlayerWeapon(playerid, 42, 999);
SendClientMessage(playerid, 0xFFFF00AA, "[INFO] Apague o Fogo !");
return 1;
}
return 0;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(glob90 == 1)
{
if((newkeys == 4 && GetPlayerWeapon(playerid) == 42) || (newkeys == 4 && GetVehicleModel(GetPlayerVehicleID(playerid)) == 407))
{
if(newkeys == 4 && GetPlayerWeapon(playerid) == 42)
{
glob1058[playerid] = 5;
globB8[playerid] = 1;
if(!glob888[playerid])
{
SetTimerEx("ApagarFogo", 12000, false, "i", playerid);
glob888[playerid]++;
}
}
else if(newkeys == 4 && GetVehicleModel(GetPlayerVehicleID(playerid)) == 407)
{
if(IsPlayerInRangeOfPoint(playerid, 1092616192, glob24[1] - 8.3718, glob48[1] - 8.4289, glob6C[1]))
{
globB8[playerid] = 1;
glob1058[playerid] = 10;
if(!glob888[playerid])
{
SetTimerEx("ApagarFogo", 12000, false, "i", playerid);
glob888[playerid]++;
}
}
}
}
else
{
glob1058[playerid] = 0;
globB8[playerid] = 0;
}
}
if(newkeys == 4 && GetPlayerWeapon(playerid) == 18)
{
if(glob90 == 1)
{
return SendClientMessage(playerid, 0xFFFF00AA, "[AVISO] Alguйm jб tocou fogo em algum lugar !");
}
new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0;
GetPlayerPos(playerid, var0, var1, var2);
glob24[0] = (-19.8352 + -1.9826 + var0 + 3) - 0.7077;
glob48[0] = 4.9899 + ((-9.3883 + -1.5053 + var1) - 7);
glob6C[0] = 0.0076 + (var2 - 2);
glob24[1] = (-19.8352 + -1.9817 + var0 + 3) - 0.7077;
glob48[1] = 4.9899 + ((-9.3883 + -0.1018 + var1) - 7);
glob6C[1] = 0.0076 + (var2 - 2);
glob24[2] = (-19.8352 + -3.2436 + var0 + 3) - 0.7077;
glob48[2] = 4.9899 + ((-9.3883 + -1.5876 + var1) - 7);
glob6C[2] = 0.0076 + (var2 - 2);
glob24[3] = (-19.8352 + -1.9826 + var0 + 3) - 0.7077;
glob48[3] = 4.9899 + ((-9.3883 + -1.5053 + var1) - 7);
glob6C[3] = 0.0076 + (var2 - 2);
glob24[4] = (-19.8352 + -1.7869 + var0 + 3) - 0.7077;
glob48[4] = 4.9899 + ((-9.3883 + -2.4807 + var1) - 7);
glob6C[4] = 0.0076 + (var2 - 2);
glob24[5] = (-19.8352 + -1.1714 + var0 + 3) - 0.7077;
glob48[5] = 4.9899 + ((-9.3883 + -0.6008 + var1) - 7);
glob6C[5] = 0.0076 + (var2 - 2);
glob24[6] = (-19.8352 + -2.4603 + var0 + 3) - 0.7077;
glob48[6] = 4.9899 + ((-9.3883 + 0.0454 + var1) - 7);
glob6C[6] = 0.0076 + (var2 - 2);
glob24[7] = (-19.8352 + -2.7717 + var0 + 3) - 0.7077;
glob48[7] = 4.9899 + ((-9.3883 + -0.6095 + var1) - 7);
glob6C[7] = 0.0076 + (var2 - 2);
glob24[8] = (-19.8352 + -2.4603 + var0 + 3) - 0.7077;
glob48[8] = 4.9899 + ((-9.3883 + 0.0454 + var1) - 7);
glob6C[8] = 0.0076 + (var2 - 2);
SetTimerEx("MolotovEfeito", 1700, false, "i", playerid);
}
return 1;
}
public Incendio(playerid)
{
new var0[200], var1[24];
GetPlayerName(playerid, var1, 24);
format(var0, 200, "[AVISO] Um Novo Incкndio surgiu na cidade. Culpado: %s !", var1);
SendClientMessageToAll(0x33FF00FF, var0);
glob0[0] = CreateObject(18690, glob24[0], glob48[0], glob6C[0], 0.0, 0.0, 0.0, 0);
glob0[1] = CreateObject(18690, glob24[1], glob48[1], glob6C[1], 0.0, 0.0, 0.0, 0);
glob0[2] = CreateObject(18690, glob24[2], glob48[2], glob6C[2], 0.0, 0.0, 0.0, 0);
glob0[3] = CreateObject(18691, glob24[3], glob48[3], glob6C[3], 0.0, 0.0, 0.0, 0);
glob0[4] = CreateObject(18690, glob24[4], glob48[4], glob6C[4], 0.0, 0.0, 0.0, 0);
glob0[5] = CreateObject(18691, glob24[5], glob48[5], glob6C[5], 0.0, 0.0, 0.0, 0);
glob0[6] = CreateObject(18690, glob24[6], glob48[6], glob6C[6], 0.0, 0.0, 0.0, 0);
glob0[7] = CreateObject(18690, glob24[7], glob48[7], glob6C[7], 0.0, 0.0, 0.0, 0);
glob0[8] = CreateObject(18691, glob24[8], glob48[8], glob6C[8], 0.0, 0.0, 0.0, 0);
KillTimer(SetTimerEx("Incendio", 5000, false, "i", playerid));
return 1;
}
public MolotovEfeito(playerid)
{
new var0[200], var1[24];
GetPlayerName(playerid, var1, 24);
format(var0, 200, "[AVISO] Um Novo Incкndio surgiu na cidade. Culpado: %s !", var1);
SendClientMessageToAll(0x33FF00FF, var0);
glob0[0] = CreateObject(18690, glob24[0], glob48[0], glob6C[0], 0.0, 0.0, 0.0, 0);
glob0[1] = CreateObject(18690, glob24[1], glob48[1], glob6C[1], 0.0, 0.0, 0.0, 0);
glob0[2] = CreateObject(18690, glob24[2], glob48[2], glob6C[2], 0.0, 0.0, 0.0, 0);
glob0[3] = CreateObject(18691, glob24[3], glob48[3], glob6C[3], 0.0, 0.0, 0.0, 0);
glob0[4] = CreateObject(18690, glob24[4], glob48[4], glob6C[4], 0.0, 0.0, 0.0, 0);
glob0[5] = CreateObject(18691, glob24[5], glob48[5], glob6C[5], 0.0, 0.0, 0.0, 0);
glob0[6] = CreateObject(18690, glob24[6], glob48[6], glob6C[6], 0.0, 0.0, 0.0, 0);
glob0[7] = CreateObject(18690, glob24[7], glob48[7], glob6C[7], 0.0, 0.0, 0.0, 0);
glob0[8] = CreateObject(18691, glob24[8], glob48[8], glob6C[8], 0.0, 0.0, 0.0, 0);
glob90 = 1;
KillTimer(SetTimerEx("MolotovEfeito", 2500, false, "i", playerid));
return 1;
}
public ApagarFogo(playerid)
{
new var0[150], var1[24];
if(glob888[playerid] > 0 && globB8[playerid] == 1 && glob1058[playerid] > 0)
{
if(glob1058[playerid] == 5)
{
new var2 = 0;
while(var2 < 9)
{
if(IsPlayerInRangeOfPoint(playerid, 1092616192, glob24[var2], glob48[var2], glob6C[var2]))
{
DestroyObject(glob0[var2]);
glob94[var2] = 1;
}
}
if(glob94[8] == 1)
{
glob90 = 0;
globB8[playerid] = 0;
glob888[playerid] = 0;
GetPlayerName(playerid, var1, 24);
format(var0, 150, "[AVISO] Uma Salva de Palmas para Quem Apagou o Fogo, %s !", var1);
SendClientMessageToAll(0x33FF00FF, var0);
GivePlayerMoney(playerid, 25000);
glob1058[playerid] = 0;
SendClientMessage(playerid, 0x33CCFFAA, "[INFO] Vocк Recebeu uma Quantia de 25000 Mil como Prкmio !");
KillTimer(SetTimerEx("ApagarFogo", 12000, false, "i", playerid));
}
}
if(glob1058[playerid] == 10 && IsPlayerInRangeOfPoint(playerid, 1092616192, glob24[1] - 8.3718, glob48[1] - 8.4289, glob6C[1]))
{
new var2 = 0;
while(var2 < 9)
{
DisablePlayerCheckpoint(playerid);
DestroyObject(glob0[var2]);
glob94[var2] = 1;
}
if(glob94[8] == 1)
{
glob90 = 0;
globB8[playerid] = 0;
glob888[playerid] = 0;
GetPlayerName(playerid, var1, 24);
format(var0, 150, "[AVISO] Uma Salva de Palmas para Quem Apagou o Fogo, %s !", var1);
SendClientMessageToAll(0x33FF00FF, var0);
GivePlayerMoney(playerid, 25000);
glob1058[playerid] = 0;
SendClientMessage(playerid, 0x33CCFFAA, "[INFO] Vocк Recebeu uma Quantia de 25000 Mil como Prкmio !");
KillTimer(SetTimerEx("ApagarFogo", 12000, false, "i", playerid));
}
}
}
return 1;
}
public OnFilterScriptExit()
{
for(new var0 = 0; var0 < 9; var0++)
{
DestroyObject(glob0[var0]);
glob94[var0] = 1;
}
return 1;
}
Erros de compilaзгo sгo comuns quando o cуdigo й resultado de uma decodificaзгo de arquivo .amx
Obrigado й que eu so tinha o AMX , converti pra PWN acho que й o programa que poe pra da erros VLW Parceiro!