OnVehicleDeath Problem..
#1

ok.. so, i give a player a vehicle, and i code itl ike this

Code:
onplayerspawn 

car[playerid] =  CreateVehicle(444, -25.4514,462.4341,31.8625,19.7708, 6, 54, -1);
PutPlayerInVehicle(playerid,car[playerid],0);
this works fine, but now i want to know when the vehicle dies.. so i do this

Code:
 onvehicledeath
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (car[i] == vehicleid)
{ 
SendClientMessageToAll(TRES,"A vehicle has died");
car[i]=-1;
}
}
but it seems to work only when your vehicle goins in the water, not when it actualy blows up.. you know its health goes lover than 250, and it blows up.. so what is the problem?
Reply
#2

anyone want to help?
Reply
#3

hellllllllllllllp
Reply
#4

stop bumping, read the rules, only bump post 48hrs old
Reply
#5

Help, anyone?
Reply
#6

helpp, pls help mee.
Reply
#7

Quote:
Originally Posted by marinov
View Post
stop bumping, read the rules, only bump post 48hrs old
Read what he said.


Anyway:
Change
pawn Code:
for (new i = 0; i != MAX_PLAYERS; i++)
TO
pawn Code:
for (new i = 0; i != MAX_VEHICLES; i++)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)