[Help] with destroying Trailer.
#1

When the player enters the checkpoint i want to destroy the truck AND the trailer at the moment only the truck gets destroyed. You will see what i mean by my code. Also when the truck and trailer gets destroyed how to i get them to respawn? Createvechile or addstaticvehcile? or something else.

Код:
public OnPlayerEnterCheckpoint(playerid) {

new vehicleid=GetPlayerVehicleID( playerid );
if (IsPlayerInVehicle(playerid,vehicleid) ) {

if ( IsTrailerAttachedToVehicle(vehicleid) )
 {
GameTextForPlayer(playerid, "~r~Congratulations! Here, have 5k", 2000, 3);
GivePlayerMoney(playerid, 5000);
DisablePlayerCheckpoint(playerid);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(vehicleid);
}
else {
GameTextForPlayer(playerid, "~r~You need a trailer. Noob", 2000, 3);
}}

else { DisablePlayerCheckpoint(playerid);
}

return 1;
}
Thanks in advance,
Josh

Reply


Messages In This Thread
[Help] with destroying Trailer. - by Bofhead - 20.06.2009, 09:11
Re: [Help] with destroying Trailer. - by Abernethy - 20.06.2009, 09:20
Re: [Help] with destroying Trailer. - by Bofhead - 20.06.2009, 09:21
Re: [Help] with destroying Trailer. - by Abernethy - 20.06.2009, 09:26
Re: [Help] with destroying Trailer. - by Bofhead - 20.06.2009, 09:27
Re: [Help] with destroying Trailer. - by Abernethy - 20.06.2009, 09:30
Re: [Help] with destroying Trailer. - by Bofhead - 20.06.2009, 09:52
Re: [Help] with destroying Trailer. - by Bofhead - 20.06.2009, 09:58
Re: [Help] with destroying Trailer. - by Grim_ - 20.06.2009, 10:00
Re: [Help] with destroying Trailer. - by Bofhead - 20.06.2009, 10:03

Forum Jump:


Users browsing this thread: 1 Guest(s)