[Ajuda] Bug Neon
#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


Messages In This Thread
[Ajuda] Bug Neon - by Victor_Souz4 - 09.12.2011, 17:42
Re: [BUG]Neon - by [NWD]Jim._.Carrey - 09.12.2011, 18:18
Re: [BUG]Neon - by Victor_Souz4 - 09.12.2011, 18:49

Forum Jump:


Users browsing this thread: 1 Guest(s)