[Ajuda] Neon
#1

Olб!, vim aqui pedir ajuda num sistema de neon que nгo funfa nen a pal'--', jб testei vбrios e vбrios e a p* do neon nгo aparece! o comando executa normalmente + o neon nгo aparece ! entгo baixei uma Include <KveH> ( [INC]KveH - Funзхes para veнculos by [iPs] Ken https://sampforum.blast.hk/showthread.php?tid=228434)

Enfim mesmo com essa include o neon nгo aparece, creio que seja algum problema fбcil entгo vim aqui pedir ajuda de vocкs , segue abaixo o codigo com a include KveH.

pawn Код:
#include <a_samp>
#include <zcmd>
#include <KveH>

#define DialogNeon 1

CMD:neon(playerid,params[])
{
    #pragma unused params
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid,-1,"Vocк nгo estб em um veiculo!");
    ShowPlayerDialog(playerid, DialogNeon, DIALOG_STYLE_LIST, "Escolha a cor:","Azul\nVerde\nAmarelo\nBranco\nRosa\nDesligar Neon","Selecionar","Fechar");
    return true;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DialogNeon) {
        if(response) {
            new vehicleid = GetPlayerVehicleID(playerid);
            if(listitem == 0) {
                SetVehicleNeon(vehicleid, Neon_Azul, StatusON);
                SendClientMessage(playerid, -1,"Neon Azul adicionado");
            }
            if(listitem == 1) {
                SetVehicleNeon(vehicleid, Neon_Verde, StatusON);
                SendClientMessage(playerid, -1,"Neon Verde adicionado");
            }
            if(listitem == 2) {
                SetVehicleNeon(vehicleid, Neon_Amarelo, StatusON);
                SendClientMessage(playerid, -1,"Neon amarelo adicionado");
            }
            if(listitem == 3) {
                SetVehicleNeon(vehicleid, Neon_Branco, StatusON);
                SendClientMessage(playerid, -1,"Neon branco adicionado");
            }
            if(listitem == 4) {
                SetVehicleNeon(vehicleid, Neon_Rosa, StatusON);
                SendClientMessage(playerid, -1,"Neon rosa adicionado");
            }
            if(listitem == 5) {
                SetVehicleNeon(vehicleid, Neon_Azul, StatusOFF);
                SetVehicleNeon(vehicleid, Neon_Vermelho, StatusOFF);
                SetVehicleNeon(vehicleid, Neon_Amarelo, StatusOFF);
                SetVehicleNeon(vehicleid, Neon_Branco, StatusOFF);
                SetVehicleNeon(vehicleid, Neon_Rosa, StatusOFF);
                SetVehicleNeon(vehicleid, Neon_Verde,StatusON);
                SendClientMessage(playerid, -1,"Neon(s) deletado");
            }
        }
    }
    return true;
}
Deis de jб meu muito obrigado.
Reply
#2

Amigo te recomendo utilizar uma include feita por Woozie. Neon Library. Mais simples e facil de usar
Reply
#3

Lуs, esta sua include foi feita pelo Shelby.
#Tуpico:
Usa esta include > https://sampforum.blast.hk/showthread.php?tid=200569
Reply
#4

Entгo mais vocкs nгo intenderam, acontece que eu ja testei esses, e nenhum funcionou saca? acho que й algo realacionado as minhas includes sei lб, alguem sabe o que pode ser?
Reply
#5

como nгo funcionou ?
para rodar os neуns, necessita da versгo 0.3c.
Reply
#6

Informaзхes
Reply
#7

tb tive esse probleminha.. olha um fs ai.. perfeito eu acho =p fiz pra vc.. e so usar a inc.. e pronto !!!



pawn Код:
#include <a_samp>
#include <Neon>

//----- DIALOG ----------------//
#define DIALOG_NEON 300
//----------------------------------------------------------------------------//
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" FS Neon V1 By ApolloRJ");
print("--------------------------------------\n");
return 1;
}
//----------------------------------------------------------------------------//
public OnFilterScriptExit()
{
    return 1;
}
//----------------------------------------------------------------------------//
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[130];
new idx;
cmd = strtok(cmdtext, idx);
//----------------------------------------------------------------------------//
if(strcmp(cmd, "/neon", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ ERROR ]{FFFFFF} Vocк Nгo Esta Em Um Veнculo!!");
ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "{FFFF00}Menu {FFFFFF}Neon","[ Azul ]\n[ Vermelho ]\n[ Verde ]\n[ Branco ]\n[ Rosa ]\n[ Amarelo ]\n[ Undercover ]\n[ Desligue Neon ]","OK","Sair");
return 1;
}
return 0;
}
//----------------------------------------------------------------------------//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_NEON)
{
if(response)
{
if(listitem == 0)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_BLUE);
GameTextForPlayer(playerid, "~b~Azul~w~ Neon foi Adicionado Ao Seu Veiculo",2000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 1)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_RED);
GameTextForPlayer(playerid, "~r~Vermelho~w~ Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 2)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_GREEN);
GameTextForPlayer(playerid, "~g~Verde~w~ Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 3)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_WHITE);
GameTextForPlayer(playerid, "~w~Branco Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 4)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_PINK);
GameTextForPlayer(playerid, "~p~Rosa~w~Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 5)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_YELLOW);
GameTextForPlayer(playerid, "~y~Amarelho~w~Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 6)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_POLICE);
GameTextForPlayer(playerid, "Undercover~w~ Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 7)
{
new vehicleid = GetPlayerVehicleID( playerid );
RemoveNeonFromVehicle( vehicleid );
GameTextForPlayer(playerid, "~g~Neon Foi Excluido De Seu Veiculo",3000,5);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); //sound
SetPlayerTime(playerid,12,0); //dia
}
}
return 1;
}
return 0;
}
//----------------------------------------------------------------------------//
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
//----------------------------------------------------------------------------//
//-------- F I M -------------------------------------------------------------//
//----------------------------------------------------------------------------//
[Include] Neon Library
https://sampforum.blast.hk/showthread.php?tid=262451


By ApolloRJ
Reply
#8

Quote:
Originally Posted by ApolloRJ
Посмотреть сообщение
tb tive esse probleminha.. olha um fs ai.. perfeito eu acho =p fiz pra vc.. e so usar a inc.. e pronto !!!



pawn Код:
#include <a_samp>
#include <Neon>

//----- DIALOG ----------------//
#define DIALOG_NEON 300
//----------------------------------------------------------------------------//
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" FS Neon V1 By ApolloRJ");
print("--------------------------------------\n");
return 1;
}
//----------------------------------------------------------------------------//
public OnFilterScriptExit()
{
    return 1;
}
//----------------------------------------------------------------------------//
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[130];
new idx;
cmd = strtok(cmdtext, idx);
//----------------------------------------------------------------------------//
if(strcmp(cmd, "/neon", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "[ ERROR ]{FFFFFF} Vocк Nгo Esta Em Um Veнculo!!");
ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "{FFFF00}Menu {FFFFFF}Neon","[ Azul ]\n[ Vermelho ]\n[ Verde ]\n[ Branco ]\n[ Rosa ]\n[ Amarelo ]\n[ Undercover ]\n[ Desligue Neon ]","OK","Sair");
return 1;
}
return 0;
}
//----------------------------------------------------------------------------//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_NEON)
{
if(response)
{
if(listitem == 0)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_BLUE);
GameTextForPlayer(playerid, "~b~Azul~w~ Neon foi Adicionado Ao Seu Veiculo",2000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 1)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_RED);
GameTextForPlayer(playerid, "~r~Vermelho~w~ Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 2)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_GREEN);
GameTextForPlayer(playerid, "~g~Verde~w~ Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 3)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_WHITE);
GameTextForPlayer(playerid, "~w~Branco Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 4)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_PINK);
GameTextForPlayer(playerid, "~p~Rosa~w~Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 5)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_YELLOW);
GameTextForPlayer(playerid, "~y~Amarelho~w~Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 6)
{
AttachNeonToVehicle(GetPlayerVehicleID(playerid), NEON_POLICE);
GameTextForPlayer(playerid, "Undercover~w~ Neon foi Adicionado Ao Seu Veiculo",3000,5);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
SetPlayerTime(playerid,0,0); //noite
}
if(listitem == 7)
{
new vehicleid = GetPlayerVehicleID( playerid );
RemoveNeonFromVehicle( vehicleid );
GameTextForPlayer(playerid, "~g~Neon Foi Excluido De Seu Veiculo",3000,5);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); //sound
SetPlayerTime(playerid,12,0); //dia
}
}
return 1;
}
return 0;
}
//----------------------------------------------------------------------------//
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
//----------------------------------------------------------------------------//
//-------- F I M -------------------------------------------------------------//
//----------------------------------------------------------------------------//
[Include] Neon Library
https://sampforum.blast.hk/showthread.php?tid=262451


By ApolloRJ
Aprendeu legal (y) kkkkkkkkkk
Reply
#9

Quote:
Originally Posted by Los
Посмотреть сообщение
Aprendeu legal (y) kkkkkkkkkk
o que tem de errado ai?? ....
Reply
#10

Quote:
Originally Posted by [O.z]Caroline
Посмотреть сообщение
Lуs, esta sua include foi feita pelo Shelby.
#Tуpico:
Usa esta include > https://sampforum.blast.hk/showthread.php?tid=200569
Shelby e Larceny sгo fakes dele mesmo.

Woozie = Larceny/Shelby.

A histуria toda comeзa no Woozie. Enfim, se quiser pergunte pra ele por PM.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)