[Ajuda] Bug Neon
#1

O problema eo seguinte galera quando digito /neon funciona dbioa escolho a cor e tals ate ai tudo certo mais quando o carro de alguem explode ou dar respawn o meu neon some.

aki um ex:
pawn Код:
if(listitem == 1) {
                if(NeonAtivo[playerid] == 1) return SendClientMessage(playerid, -1, "{EE3B3B}[INFO]: {FFFFFF}Vocк jб estб usando neon desligue-o.");
                NeonAtivo[playerid] = 1;
                SetPVarInt(playerid, "neon", 1);
                SetPVarInt(playerid, "green", ObjetoNeon[0] = CreateObject(18649,0,0,0,0,0,0));
                SetPVarInt(playerid, "green1", ObjetoNeon[1] = 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,COR_VERMELHO,  "{EE3B3B}[INFO]: {FFFFFF}Verde Neon - Neon tem sido acrescentado ao seu veнculo.");
            }

creio que os bugs seja aki..
pawn Код:
public OnVehicleDeath(vehicleid)
{
    DestroyObject(ObjetoNeon[0]);
    DestroyObject(ObjetoNeon[1]);
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    DestroyObject(ObjetoNeon[0]);
    DestroyObject(ObjetoNeon[1]);
    return 1;
}
Reply
#2

Se o carro de alguйm explode o neon do seu carro some? o.O

Tenta mudar as variбveis em vez de ser assim "global", mude para ser por veнculo exemplo de base:

pawn Код:
#include <a_samp>

new
    ObjetoNeon[ 2 ][ MAX_VEHICLES ];

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/Neon", cmdtext, true, 10) == 0)
    {
        SetPVarInt( playerid, "neon", 1 );
        SetPVarInt(playerid, "green", ObjetoNeon[ 0 ][ GetPlayerVehicleID( playerid ) ] = CreateObject( 18649, 0, 0, 0, 0, 0, 0 ));
        SetPVarInt(playerid, "green1", ObjetoNeon[ 1 ][ GetPlayerVehicleID( playerid ) ] = 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, -1,  "{EE3B3B}[INFO]: {FFFFFF}Verde Neon - Neon tem sido acrescentado ao seu veнculo." );
        return 1;
    }
    return 0;
}

public OnVehicleDeath( vehicleid )
{
    DestroyObject( ObjetoNeon[ 0 ][ vehicleid ] );
    DestroyObject( ObjetoNeon[ 1 ][ vehicleid ] );
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    DestroyObject( ObjetoNeon[ 0 ][ vehicleid ] );
    DestroyObject( ObjetoNeon[ 1 ][ vehicleid ] );
    return 1;
}
Reply
#3

Thanks..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)