06.10.2011, 12:43
pawn Код:
new TrailerId[6] = {
{1st trailer id},
{2nd trailer id},
{3th trailer id},
{4th trailer id},
{5th trailer id},
{6th trailer id}
};
//onplayerentercheckpoint
TogglePlayerControllable(playerid, false);
SetTimerEx("AttachOneTrailer",5000,false,"i",playerid);
public AttachOneTrailer(playerid)
{
AttachTrailerToVehicle(TrailerId[Random(random(sizeof(TrailerId))], GetPlayerVehicleID(playerid));//will attach one of those trailers randomly
TogglePlayerControllable(playerid, true);
//SendClientMessage
return 1;
}