OnVehicleDeath - how can I do?
#1

Hi. I created my vehicle system that is totally different with SA:MP's vehicles. In fact, I never use vehicleid. I have a problem. I want to set that if a vehicle death, it set to him a variable that say that it is dead. When it respawn it set a total of health.
The problem is: id = ?

"VicinoVeicolo" = IsPlayerNearVehicle -> return id;

"InVeicolo" = IsPlayerInVehicle -> return id;

but don't work neither of both.

PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    for(new 
0MAX_PLAYERSi++)
    {
        
//new id = VicinoVeicolo(i);
               //new id = InVeicolo(i);
        
if(Veicolo[id][Creato] == 1)
        {
            if(
Veicolo[id][Acquistato] == 1)
            
Veicolo[id][Distrutto] = 1;
            else 
Veicolo[id][Distrutto] = 0;
        }
    }
    
    return 
1;

Reply


Messages In This Thread
OnVehicleDeath - how can I do? - by DarkLouis - 02.05.2015, 12:26
Re: OnVehicleDeath - how can I do? - by Mencent - 02.05.2015, 12:30
Re: OnVehicleDeath - how can I do? - by sammp - 02.05.2015, 12:31
Re: OnVehicleDeath - how can I do? - by DarkLouis - 02.05.2015, 12:32
Re: OnVehicleDeath - how can I do? - by Mencent - 02.05.2015, 12:39
Re: OnVehicleDeath - how can I do? - by DarkLouis - 02.05.2015, 12:47
Re: OnVehicleDeath - how can I do? - by DarkLouis - 02.05.2015, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)