02.05.2015, 12:26
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.
The problem is: id = ?
"VicinoVeicolo" = IsPlayerNearVehicle -> return id;
"InVeicolo" = IsPlayerInVehicle -> return id;
but don't work neither of both.
PHP код:
public OnVehicleDeath(vehicleid, killerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
//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;
}