#define FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
#define NEON 1337
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Neon System ");
print(" Traduzido ");
print("--------------------------------------\n");
return 1;
}
#endif
new ObjetoNeon[15];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк tem que ser o motorista para comprar o neon");
return 1;
}
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Escolha seu neon","{0000FF}Azul\n{00FF00}Verde\n{FFFF00}Amarelo\n{FFFFFF}Branco\n{FF00FF}Rosa\nRemover Neon","Ok","Cancelar");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк nгo estб em um veiculo");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == NEON)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "blue", ObjetoNeon[0] = CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "blue1", ObjetoNeon[1] = CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon azul em seu carro");
}
if(listitem == 1)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "green", ObjetoNeon[2] = CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "green1", ObjetoNeon[3] = CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "green"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "green1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon verde em seu carro");
}
if(listitem == 2)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "yellow", ObjetoNeon[4] = CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "yellow1", ObjetoNeon[5] = CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "yellow"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "yellow1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon amarelo em seu carro");
}
if(listitem == 3)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "white", ObjetoNeon[6] = CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "white1", ObjetoNeon[7] = CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "white"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "white1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon branco em seu carro");
}
if(listitem == 4)
{
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "pink", ObjetoNeon[8] = CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "pink1", ObjetoNeon[9] = CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon rosa em seu carro");
}
if(listitem == 5)
{
DestroyObject(ObjetoNeon[0]);
DestroyObject(ObjetoNeon[1]);
DestroyObject(ObjetoNeon[2]);
DestroyObject(ObjetoNeon[3]);
DestroyObject(ObjetoNeon[4]);
DestroyObject(ObjetoNeon[5]);
DestroyObject(ObjetoNeon[6]);
DestroyObject(ObjetoNeon[7]);
DestroyObject(ObjetoNeon[8]);
DestroyObject(ObjetoNeon[9]);
DestroyObject(ObjetoNeon[0]);
DestroyObject(ObjetoNeon[1]);
DestroyObject(ObjetoNeon[2]);
DestroyObject(ObjetoNeon[3]);
DestroyObject(ObjetoNeon[4]);
DestroyObject(ObjetoNeon[5]);
DestroyObject(ObjetoNeon[6]);
DestroyObject(ObjetoNeon[7]);
DestroyObject(ObjetoNeon[8]);
DestroyObject(ObjetoNeon[9]);
SendClientMessage(playerid, COLOR_WHITE, "Voce removeu o seu neon");
}
}
}
return 1;
}
public OnVehicleDeath(vehicleid)
{
DestroyObject(ObjetoNeon[0]);
DestroyObject(ObjetoNeon[1]);
DestroyObject(ObjetoNeon[2]);
DestroyObject(ObjetoNeon[3]);
DestroyObject(ObjetoNeon[4]);
DestroyObject(ObjetoNeon[5]);
DestroyObject(ObjetoNeon[6]);
DestroyObject(ObjetoNeon[7]);
DestroyObject(ObjetoNeon[8]);
DestroyObject(ObjetoNeon[9]);
DestroyObject(ObjetoNeon[0]);
DestroyObject(ObjetoNeon[1]);
DestroyObject(ObjetoNeon[2]);
DestroyObject(ObjetoNeon[3]);
DestroyObject(ObjetoNeon[4]);
DestroyObject(ObjetoNeon[5]);
DestroyObject(ObjetoNeon[6]);
DestroyObject(ObjetoNeon[7]);
DestroyObject(ObjetoNeon[8]);
DestroyObject(ObjetoNeon[9]);
}
public OnVehicleSpawn(vehicleid)
{
DestroyObject(ObjetoNeon[0]);
DestroyObject(ObjetoNeon[1]);
DestroyObject(ObjetoNeon[2]);
DestroyObject(ObjetoNeon[3]);
DestroyObject(ObjetoNeon[4]);
DestroyObject(ObjetoNeon[5]);
DestroyObject(ObjetoNeon[6]);
DestroyObject(ObjetoNeon[7]);
DestroyObject(ObjetoNeon[8]);
DestroyObject(ObjetoNeon[9]);
DestroyObject(ObjetoNeon[0]);
DestroyObject(ObjetoNeon[1]);
DestroyObject(ObjetoNeon[2]);
DestroyObject(ObjetoNeon[3]);
DestroyObject(ObjetoNeon[4]);
DestroyObject(ObjetoNeon[5]);
DestroyObject(ObjetoNeon[6]);
DestroyObject(ObjetoNeon[7]);
DestroyObject(ObjetoNeon[8]);
DestroyObject(ObjetoNeon[9]);
}
new CarroID = GetPlayerVehicleID(playerid);
if(IsVehicleUsingNeon(CarroID) || IsVehicleUsingBuzzer(CarroID)) return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon ou sirene!");
new Menu:NEON_MENU;
public OnGameModeExit()
{
NEON_MENU = CreateMenu("Neons", 1, 50.0, 180.0, 130.0, 130.0);
AddMenuItem(NEON_MENU, 0, "Branco");
AddMenuItem(NEON_MENU, 0, "Azul");
AddMenuItem(NEON_MENU, 0, "Verde");
AddMenuItem(NEON_MENU, 0, "Rosa");
AddMenuItem(NEON_MENU, 0, "Vermelho");
AddMenuItem(NEON_MENU, 0, "Amarelo");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Current = GetPlayerMenu(playerid);
if(Current == NEON_MENU)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "Vocк nгo estб em um veнculo.");
switch(row)
{
case 0:
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_WHITE);
}
case 1:
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_BLUE);
}
case 2:
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_GREEN);
}
case 3:
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_PINK);
}
case 4:
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_RED);
}
case 5:
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_YELLOW);
}
}
}
return 1;
}
CMD:neon(playerid, params[])
return ShowMenuForPlayer(NEON_MENU, playerid);
#include "nLibrary"
#define NEON_BLUE (0)
#define NEON_PINK (1)
#define NEON_YELLOW (2)
#define NEON_GREEN (3)
#define NEON_RED (4)
#define NEON_WHITE (5)
#define NEON_POLICE (6)
#define FILTERSCRIPT
#define COLOR_WHITE 0xFFFFFFAA
#include <a_samp>
#define NEON 1337
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Neon System ");
print(" Traduzido ");
print("--------------------------------------\n");
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/neon", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк tem que ser o motorista para comprar o neon");
return 1;
}
else
{
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Escolha seu neon","{0000FF}Azul\n{00FF00}Verde\n{FFFF00}Amarelo\n{FFFFFF}Branco\n{FF00FF}Rosa\nRemover Neon","Ok","Cancelar");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк nгo estб em um veiculo");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == NEON)
{
if(response)
{
if(listitem == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new CarroID = GetPlayerVehicleID(playerid);
if(IsVehicleUsingNeon(CarroID))
{
return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
}
else
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_BLUE);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon Azul em seu carro");
}
}
}
if(listitem == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new CarroID = GetPlayerVehicleID(playerid);
if(IsVehicleUsingNeon(CarroID))
{
return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
}
else
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_GREEN);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon verde em seu carro");
}
}
}
if(listitem == 2)
{
if(IsPlayerInAnyVehicle(playerid))
{
new CarroID = GetPlayerVehicleID(playerid);
if(IsVehicleUsingNeon(CarroID))
{
return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
}
else
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_YELLOW);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon amarelo em seu carro");
}
}
}
if(listitem == 3)
{
if(IsPlayerInAnyVehicle(playerid))
{
new CarroID = GetPlayerVehicleID(playerid);
if(IsVehicleUsingNeon(CarroID))
{
return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
}
else
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_WHITE);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon branco em seu carro");
}
}
}
if(listitem == 4)
{
if(IsPlayerInAnyVehicle(playerid))
{
new CarroID = GetPlayerVehicleID(playerid);
if(IsVehicleUsingNeon(CarroID))
{
return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
}
else
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_PINK);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon rosa em seu carro");
}
}
}
if(listitem == 5)
{
RemoveNeonFromVehicle(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Voce removeu o seu neon");
}
}
}
return 1;
}
public OnVehicleDeath(vehicleid)
{
RemoveNeonFromVehicle(vehicleid);
}
public OnVehicleSpawn(vehicleid)
{
RemoveNeonFromVehicle(vehicleid);
}
#include "a_samp"
#include "nLibrary"
#define NEON_BLUE (0)
#define NEON_PINK (1)
#define NEON_YELLOW (2)
#define NEON_GREEN (3)
#define NEON_RED (4)
#define NEON_WHITE (5)
#define NEON_POLICE (6)
#define NEON 1337
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/neon", cmdtext, true, 10) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк tem que ser o motorista para comprar o neon");
return 1;
}
else
{
ShowPlayerDialog(playerid, NEON, DIALOG_STYLE_LIST, "Escolha seu neon","{0000FF}Azul\n{00FF00}Verde\n{FFFF00}Amarelo\n{FFFFFF}Branco\n{FF00FF}Rosa\nRemover Neon","Ok","Cancelar");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк nгo estб em um veiculo");
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case NEON:
{
if(!response) return 1;
{
new CarroID = GetPlayerVehicleID(playerid);
switch(listitem)
{
case 0:
{
if(IsVehicleUsingNeon(CarroID)) return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_BLUE);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon Azul em seu carro");
}
case 1:
{
if(IsVehicleUsingNeon(CarroID)) return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_GREEN);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon verde em seu carro");
}
case 2:
{
if(IsVehicleUsingNeon(CarroID)) return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_YELLOW);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon amarelo em seu carro");
}
case 3:
{
if(IsVehicleUsingNeon(CarroID)) return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_WHITE);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon branco em seu carro");
}
case 4:
{
if(IsVehicleUsingNeon(CarroID)) return SendClientMessage(playerid, -1, "[ ERRO ] Esse carro jб estб usando um neon!");
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_PINK);
SendClientMessage(playerid, COLOR_WHITE, "Voce instalou o neon rosa em seu carro");
}
case 5:
{
RemoveNeonFromVehicle(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Voce removeu o seu neon");
}
}
}
}
}
return 1;
}
public OnVehicleDeath(vehicleid)
{
RemoveNeonFromVehicle(vehicleid);
}
public OnVehicleSpawn(vehicleid)
{
RemoveNeonFromVehicle(vehicleid);
}
|
ta a mesma coisa, ta dando para add mas de 1 neon! deve ser oq que esta errado?
|