20.06.2009, 22:01
Hello,
With help form abernathy and a few other people i have managed to get my script looking like below. The only problem left is that when the player enters the checkpoint all the trailers respawn including other players. How do i code it so that only the trailer being towed is forced to respawn and not all the other players trailers as well.
Thanks in advance,
Josh
With help form abernathy and a few other people i have managed to get my script looking like below. The only problem left is that when the player enters the checkpoint all the trailers respawn including other players. How do i code it so that only the trailer being towed is forced to respawn and not all the other players trailers as well.
Код:
public OnPlayerEnterCheckpoint(playerid) { new vehicleid = GetPlayerVehicleID(playerid); if (IsPlayerInVehicle(playerid,vehicleid)) if (IsTrailerAttachedToVehicle(vehicleid)) { GameTextForPlayer(playerid, "~r~Congratulations! ~n~Successfully Completed! ~n~~g~$5,000", 5000, 3); GivePlayerMoney(playerid, 5000); DisablePlayerCheckpoint(playerid); SetVehicleToRespawn(vehicleid); SetVehicleToRespawn(Trailer[0]); SetVehicleToRespawn(Trailer[1]); } else { GameTextForPlayer(playerid, "~r~You need a trailer. ~w~~n~Noob", 2000, 3); } else { DisablePlayerCheckpoint(playerid); } return 1; }
Josh