Quote:
Originally Posted by AndreT
You will need to create a vehicle and store its ID in a variable, for example:
pawn Код:
// above main() new veh_LSairport = INVALID_VEHICLE_ID;
// whereever your gamemode round loads if(veh_LSairport != INVALID_VEHICLE_ID) { // if the vehicle already exists, destroy it (to avoid vehicles "piling up") DestroyVehicle(veh_LSairport); } // create a new vehicle veh_LSairport = CreateVehicle(...);
Now that the vehicle is streamed in for a player, OnVehicleStreamIn is called. I will use this method to avoid having to create an array for vehicles holding the data. Note that the information set to a vehicle for a player has to be set every time the vehicle streams in for the player.
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid) { if(vehicleid == veh_LSairport // if the vehicle is the "marked" vehicle && gTeam[forplayerid] == TEAM_SFAIRPORT) // if the player is in the SF airport team { SetVehicleParamsForPlayer(vehicleid, forplayerid, 1, 0); } // add an "else if" statement here to continue with the objective vehicle for the LS airport team. }
|
Thanks , That was usful , Can i PM you for More Information ?