[Ajuda] Comando /neon
#1

Ola pessoal tenho um comando aqui /neon q nao funciona direito, tipo o comando funciona, aparece a lista de cores mas quando vc click na cor desejada , continua como se nao tive-se feito nada

Comando :

pawn Код:
#define Oficina1 IsPlayerInRangeOfPoint(playerid, 2.5, -47.7836, 270.6917, 2.2500) //
#define Oficina2 IsPlayerInRangeOfPoint(playerid, 10.0, 24.6492, 2418.9697, 22.7578)
#define Oficina3 IsPlayerInRangeOfPoint(playerid, 3.0, 1348.4963, 946.5101, 10.5252)
#define Oficina4 IsPlayerInRangeOfPoint(playerid, 4.0, -547.3569,507.0492,2.5933)
#define Oficina5 IsPlayerInRangeOfPoint(playerid, 5.0, -1656.2089,454.5365,7.4053)
#define Oficina6 IsPlayerInRangeOfPoint(playerid, 5.0, 2096.6445,1120.9552,11.1395)



COMMAND:neon(playerid, params[])//OK
{
new OptionsList[200], DialogTitle[200];
SendAdminText(playerid, "/neon", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (GetPlayerVehicleSeat(playerid) == 0)
{
if (Oficina1 || Oficina2 || Oficina3 || Oficina4 || Oficina5 || Oficina6)
{
format(DialogTitle, sizeof(DialogTitle), "Selecione o neon:");

format(OptionsList, sizeof(OptionsList), "%sSirene\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sNeon vermelho\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sNeon azul\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sNeon verde\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sNeon amarelo\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sNeon rosa\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sNeon branco\n", OptionsList);
format(OptionsList, sizeof(OptionsList), "%sRemover neon\n", OptionsList);
ShowPlayerDialog(playerid, DialogNeon, DIALOG_STYLE_LIST, DialogTitle, OptionsList, "Selecionar", "Cancelar");
}        
else            
SendClientMessage(playerid, 0xFF0000FF, "{FF0000}Vocк nгo estб em uma oficina!");
}
else
SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[Oficina] Vocк nгo estб dirigindo um veнculo!");
}
else
return 0;
return 1;
}

Esses Defines sгo os lugares onde o comando pode ser executado ! espero q me ajudem
Reply
#2

Para o neon aparecer tem que tar de noite, utilize algum comando para alterar o clima, e vocк vera .

Ow se nгo, manda o cуdigo completo, por que o erro pode ser em outro local .
Reply
#3

Luucass Tem Skype ? Posso Te Ajudar Pelo Skype
Reply
#4

como sempre gente com o ppc_trucking

include PPC_Dialogs:
pawn Код:
Dialog_Neon(playerid, response, listitem)
{
    // Just close the dialog if the player clicked "Cancel"
    if(!response) return 1;

    // Setup local variables
    new vehicleid;

    // Get the player's vehicle
    vehicleid = GetPlayerVehicleID(playerid);

    // Check if the player chose anothet option than "Remove neons"
    if (listitem != 7)
    {
        // Check if the vehicle already has neon lights attached
        if (AVehicleData[vehicleid][NeonLeft] != 0)
        {
            // Delete the current neon-lights and clear the variables
            DestroyObject(AVehicleData[vehicleid][NeonLeft]);
            DestroyObject(AVehicleData[vehicleid][NeonRight]);
            AVehicleData[vehicleid][NeonLeft] = 0;
            AVehicleData[vehicleid][NeonRight] = 0;
        }
    }

    // Process the option chosen from the dialog
    if (listitem == 0) // Police Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18646,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18646,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~p~Neon policial", 3500, 5);
    }

    if (listitem == 1) // Red light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18647,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18647,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~r~Neon Vermelho", 3500, 5);
    }

    if (listitem == 2) // Blue light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18648,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18648,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~b~Neon azul", 3500, 5);
    }

    if (listitem == 3) // Green Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18649,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18649,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~g~Neon verde", 3500, 5);
    }

    if (listitem == 4) // Yellow Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18650,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18650,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~y~Neon amarelo", 3500, 5);
    }

    if (listitem == 5) // Pink Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18651,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18651,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~p~Neon rosa", 3500, 5);
    }

    if (listitem == 6) // White Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18652,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18652,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~w~Neon branco", 3500, 5);
    }

    if (listitem == 7) // Remove neons
    {
        // Delete the current neon-lights and clear the variables
        DestroyObject(AVehicleData[vehicleid][NeonLeft]);
        DestroyObject(AVehicleData[vehicleid][NeonRight]);
        AVehicleData[vehicleid][NeonLeft] = 0;
        AVehicleData[vehicleid][NeonRight] = 0;
        GameTextForPlayer(playerid, "Neons foram removidos do seu veнculo", 3500, 5);
    }

    return 1;
}
Reply
#5

Explore Entra skype pow.
Reply
#6

Quote:
Originally Posted by ExPLORE
Посмотреть сообщение
como sempre gente com o ppc_trucking

include PPC_Dialogs:
pawn Код:
Dialog_Neon(playerid, response, listitem)
{
    // Just close the dialog if the player clicked "Cancel"
    if(!response) return 1;

    // Setup local variables
    new vehicleid;

    // Get the player's vehicle
    vehicleid = GetPlayerVehicleID(playerid);

    // Check if the player chose anothet option than "Remove neons"
    if (listitem != 7)
    {
        // Check if the vehicle already has neon lights attached
        if (AVehicleData[vehicleid][NeonLeft] != 0)
        {
            // Delete the current neon-lights and clear the variables
            DestroyObject(AVehicleData[vehicleid][NeonLeft]);
            DestroyObject(AVehicleData[vehicleid][NeonRight]);
            AVehicleData[vehicleid][NeonLeft] = 0;
            AVehicleData[vehicleid][NeonRight] = 0;
        }
    }

    // Process the option chosen from the dialog
    if (listitem == 0) // Police Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18646,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18646,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~p~Neon policial", 3500, 5);
    }

    if (listitem == 1) // Red light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18647,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18647,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~r~Neon Vermelho", 3500, 5);
    }

    if (listitem == 2) // Blue light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18648,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18648,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~b~Neon azul", 3500, 5);
    }

    if (listitem == 3) // Green Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18649,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18649,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~g~Neon verde", 3500, 5);
    }

    if (listitem == 4) // Yellow Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18650,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18650,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~y~Neon amarelo", 3500, 5);
    }

    if (listitem == 5) // Pink Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18651,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18651,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~p~Neon rosa", 3500, 5);
    }

    if (listitem == 6) // White Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18652,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18652,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~w~Neon branco", 3500, 5);
    }

    if (listitem == 7) // Remove neons
    {
        // Delete the current neon-lights and clear the variables
        DestroyObject(AVehicleData[vehicleid][NeonLeft]);
        DestroyObject(AVehicleData[vehicleid][NeonRight]);
        AVehicleData[vehicleid][NeonLeft] = 0;
        AVehicleData[vehicleid][NeonRight] = 0;
        GameTextForPlayer(playerid, "Neons foram removidos do seu veнculo", 3500, 5);
    }

    return 1;
}

Warning :

pawn Код:
C:\Documents and Settings\admin\Desktop\Rodovia Brasil 0.3z\gamemodes\RodoviaBrasil.pwn(2168) : warning 203: symbol is never used: "Dialog_Neon"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#7

Na include PPC_Defines:
pawn Код:
// abaixo da define dialogboat coloque #define DialogNeon 108
#define DialogBoat                  107
#define DialogNeon                  108
No gamemod:

abaixo da case dialogboat:

pawn Код:
case DialogBoat: Dialog_Boat(playerid, response, listitem); // The boat-dialog
case DialogNeon: Dialog_Neon(playerid, response, listitem); // The neon-dialog
Reply
#8

Quote:
Originally Posted by ExPLORE
Посмотреть сообщение
como sempre gente com o ppc_trucking

include PPC_Dialogs:
pawn Код:
Dialog_Neon(playerid, response, listitem)
{
    // Just close the dialog if the player clicked "Cancel"
    if(!response) return 1;

    // Setup local variables
    new vehicleid;

    // Get the player's vehicle
    vehicleid = GetPlayerVehicleID(playerid);

    // Check if the player chose anothet option than "Remove neons"
    if (listitem != 7)
    {
        // Check if the vehicle already has neon lights attached
        if (AVehicleData[vehicleid][NeonLeft] != 0)
        {
            // Delete the current neon-lights and clear the variables
            DestroyObject(AVehicleData[vehicleid][NeonLeft]);
            DestroyObject(AVehicleData[vehicleid][NeonRight]);
            AVehicleData[vehicleid][NeonLeft] = 0;
            AVehicleData[vehicleid][NeonRight] = 0;
        }
    }

    // Process the option chosen from the dialog
    if (listitem == 0) // Police Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18646,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18646,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~p~Neon policial", 3500, 5);
    }

    if (listitem == 1) // Red light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18647,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18647,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~r~Neon Vermelho", 3500, 5);
    }

    if (listitem == 2) // Blue light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18648,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18648,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~b~Neon azul", 3500, 5);
    }

    if (listitem == 3) // Green Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18649,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18649,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~g~Neon verde", 3500, 5);
    }

    if (listitem == 4) // Yellow Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18650,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18650,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~y~Neon amarelo", 3500, 5);
    }

    if (listitem == 5) // Pink Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18651,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18651,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~p~Neon rosa", 3500, 5);
    }

    if (listitem == 6) // White Light
    {
        AVehicleData[vehicleid][NeonLeft] = CreateObject(18652,0,0,0,0,0,0);
        AVehicleData[vehicleid][NeonRight] = CreateObject(18652,0,0,0,0,0,0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonLeft], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        AttachObjectToVehicle(AVehicleData[vehicleid][NeonRight], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
        GameTextForPlayer(playerid, "~w~Neon branco", 3500, 5);
    }

    if (listitem == 7) // Remove neons
    {
        // Delete the current neon-lights and clear the variables
        DestroyObject(AVehicleData[vehicleid][NeonLeft]);
        DestroyObject(AVehicleData[vehicleid][NeonRight]);
        AVehicleData[vehicleid][NeonLeft] = 0;
        AVehicleData[vehicleid][NeonRight] = 0;
        GameTextForPlayer(playerid, "Neons foram removidos do seu veнculo", 3500, 5);
    }

    return 1;
}
Quote:
Originally Posted by ExPLORE
Посмотреть сообщение
Na include PPC_Defines:
pawn Код:
// abaixo da define dialogboat coloque #define DialogNeon 108
#define DialogBoat                  107
#define DialogNeon                  108
No gamemod:

abaixo da case dialogboat:

pawn Код:
case DialogBoat: Dialog_Boat(playerid, response, listitem); // The boat-dialog
case DialogNeon: Dialog_Neon(playerid, response, listitem); // The neon-dialog

Coloquei o case na public OnDialogResponsee deu esses seguintes erros

pawn Код:
C:\Documents and Settings\admin\Desktop\Rodovia Brasil 0.3z\gamemodes\RodoviaBrasil.pwn(760) : error 040: duplicate "case" label (value 107)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#9

Altere a define para

pawn Код:
#define DialogNeon                  109
Reply
#10

pawn Код:
C:\Documents and Settings\admin\Desktop\Rodovia Brasil 0.3z\pawno\include\PPC_Dialogs.inc(2610) : warning 201: redefinition of constant/macro (symbol "DialogNeon")
C:\Documents and Settings\admin\Desktop\Rodovia Brasil 0.3z\gamemodes\RodoviaBrasil.pwn(760) : error 040: duplicate "case" label (value 107)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)