25.09.2017, 16:45
Ok, I have something like this:
But it's not working . ( i can compile it BUT the vehicle is not dissapearing)
Код HTML:
new vehicleid; // spawning the vehicle case 0: { GetPlayerFacingAngle(playerid, angle); GetPlayerPos(playerid, x, y, z); ticau_veh1 = CreateVehicle(481, x, y, z, angle, 144, 145, 125, 0); PutPlayerInVehicle(playerid,ticau_veh1,0); vehicleid = GetPlayerVehicleID(playerid); i[playerid] = 1; reset1(playerid); destroy1(playerid, vehicleid); return 1; } public destroy1(playerid, vehicleid) { SetTimerEx("destroy2",1000,true,"d",playerid); return 1; } forward destroy2(playerid, vehicleid); public destroy2(playerid, vehicleid) { if (IsPlayerInVehicle(playerid, vehicleid) == 0) { DestroyVehicle(vehicleid); } else { destroy1(playerid, vehicleid); } return 1; }