05.02.2011, 18:58
ok.. so, i give a player a vehicle, and i code itl ike this
this works fine, but now i want to know when the vehicle dies.. so i do this
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?
Code:
onplayerspawn car[playerid] = CreateVehicle(444, -25.4514,462.4341,31.8625,19.7708, 6, 54, -1); PutPlayerInVehicle(playerid,car[playerid],0);
Code:
onvehicledeath for (new i = 0; i != MAX_PLAYERS; i++) { if (car[i] == vehicleid) { SendClientMessageToAll(TRES,"A vehicle has died"); car[i]=-1; } }