[Ajuda] Neon bugado
#1

meu neon paro de funcionar... eu seleciono a cor porem nгo adciona no veiculo!!

codigo:

pawn Код:
if(dialogid == Neon) //Neon
    {
        if(response)
        {
            switch(listitem)
            {
                     case 0:
                     {
                      DestroyObject(GetPVarInt(playerid, "neon"));
                      DeletePVar(playerid, "Status");
                      DestroyObject(GetPVarInt(playerid, "neon1"));
                      DeletePVar(playerid, "Status");

                      SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
                      SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
                      AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                      AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 1:
                     {
                     DestroyObject(GetPVarInt(playerid, "neon"));
                     DeletePVar(playerid, "Status");
                     DestroyObject(GetPVarInt(playerid, "neon1"));
                     DeletePVar(playerid, "Status");

                     SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
                     SetPVarInt(playerid, "neon1", CreateObject(18647,0,0,0,0,0,0));
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 2:
                     {
                     DestroyObject(GetPVarInt(playerid, "neon"));
                     DeletePVar(playerid, "Status");
                     DestroyObject(GetPVarInt(playerid, "neon1"));
                     DeletePVar(playerid, "Status");

                     SetPVarInt(playerid, "neon", CreateObject(18649,0,0,0,0,0,0));
                     SetPVarInt(playerid, "neon1", CreateObject(18649,0,0,0,0,0,0));
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 3:
                     {
                     DestroyObject(GetPVarInt(playerid, "neon"));
                     DeletePVar(playerid, "Status");
                     DestroyObject(GetPVarInt(playerid, "neon1"));
                     DeletePVar(playerid, "Status");

                     SetPVarInt(playerid, "neon", CreateObject(18652,0,0,0,0,0,0));
                     SetPVarInt(playerid, "neon1", CreateObject(18652,0,0,0,0,0,0));
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 4:
                     {
                     DestroyObject(GetPVarInt(playerid, "neon"));
                     DeletePVar(playerid, "Status");
                     DestroyObject(GetPVarInt(playerid, "neon1"));
                     DeletePVar(playerid, "Status");

                     SetPVarInt(playerid, "neon", CreateObject(18651,0,0,0,0,0,0));
                     SetPVarInt(playerid, "neon1", CreateObject(18651,0,0,0,0,0,0));
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70,        0.0, 0.0, 0.0);
                     AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 5:
                     {
                    DestroyObject(GetPVarInt(playerid, "neon"));
                    DeletePVar(playerid, "Status");
                    DestroyObject(GetPVarInt(playerid, "neon1"));
                    DeletePVar(playerid, "Status");

                    SetPVarInt(playerid, "neon", CreateObject(18650,0,0,0,0,0,0));
                    SetPVarInt(playerid, "neon1", CreateObject(18650,0,0,0,0,0,0));
                    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                     }
                     case 6:
                     {
                      DestroyObject(GetPVarInt(playerid, "neon"));
                      DeletePVar(playerid, "Status");
                      DestroyObject(GetPVarInt(playerid, "neon1"));
                      DeletePVar(playerid, "Status");
                     }
               }
         }
    }
Reply
#2

Manda o comando que exibe a dialog de neon para o jogador.
Reply
#3

Quote:
Originally Posted by RodrigoMSR
Посмотреть сообщение
Manda o comando que exibe a dialog de neon para o jogador.
pawn Код:
CMD:neon(playerid, params[])
{
    if(GetPlayerState(playerid) != 2)
    return Msg(playerid, Vermelho, "[x]: {FFFFFF}Somente motoristas podem usar esse comando!");
        if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    ShowPlayerDialog(playerid, Neon, DIALOG_STYLE_LIST, "{F63D00}# {FFFFFF}Lista Neon", "{1C86EE}Azul\n{FF0000}Vermelho\n{32CD32}Verde\n{FFFFFF}Branco\n{EE799F}Rosa\n{FFFF00}Amarelo\nRemover Neon", "Colocar", "");
    return 1;
}
acho que o erro nгo esta aqui!
Reply
#4

Bem, faz um tempo q nгo venho aqui, entгo nгo posso te ajudar com o problema principal.
(3 anos pra ser exato)

Porйm, eu gostaria de te dar uma dica.
Eu nгo usaria uma PVar pra guardar informaзхes de UM CARRO (ou objeto, porque nй) sу porque ele serб usado por uma pessoa.
Pq? Pq esses dados vгo ser excluidos quando o cara sair do server (mas se essa for sua intenзгo, entгo blz.).
Btw, quando o veнculo й destruido, o objeto й mantido, e o proximo veiculo que pegar o ID do antigo vai ter os objetos adicionados nele.
Fonte: https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

Se por acaso o cara sair do servidor, vc vai ter que se virar pra achar as IDs desses neons, porque as PVars ja eram...
Se eu estiver errado em algum ponto, pode corrigir, fera.
Reply
#5

alguem pode ajudar??
Reply
#6

realmente da pra vocк melhorar esse cуdigo do neon veja a ultima atualizaзгo do meu FS ele esta com todas as cores de neon da pra vocк tirar uma ideia...
https://sampforum.blast.hk/showthread.php?tid=566525
Reply
#7

ah.. acho q reconheci esse sistema de neon .. eu fiz uns teste nele.. mais ele й mt cheio de bug
as vezes um lado do neon do carro nгo sai ;-; e outros por ai.. sem dizer q tava todo desarrumado '-'

esse aki й um fs de neon mt top sabe :v
http://forum.sa-mp.com/showthread.ph...highlight=Neon
de nada ^^
Reply
#8

Quote:
Originally Posted by iSprunk
Посмотреть сообщение
ah.. acho q reconheci esse sistema de neon .. eu fiz uns teste nele.. mais ele й mt cheio de bug
as vezes um lado do neon do carro nгo sai ;-; e outros por ai.. sem dizer q tava todo desarrumado '-'

esse aki й um fs de neon mt top sabe :v
http://forum.sa-mp.com/showthread.ph...highlight=Neon
de nada ^^
nгo entendi seu comentбrio!! meu neon eu que fiz por isso tem bugs!! eu quero somente corrigilos e nгo pegar outro codigo!
Reply
#9

Nгo estб dando conflito com algum FS que vocк inseriu, que usa dialogs ?
Reply
#10

Quote:
Originally Posted by Glederson_dom
Посмотреть сообщение
Nгo estб dando conflito com algum FS que vocк inseriu, que usa dialogs ?
nгo uso FS somente o GM!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)