20.06.2009, 09:11
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.
Thanks in advance,
Josh
Код:
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; }
Josh