How To Make Objective Vehicles -
trick_master - 09.03.2012
Hi. i know you didnt understand what i m askin you to Help me But i ll explain..
i Want To Make a TDM (team dm) Script :
LS Airport team VS LV Airport team
And Hope to Host it ..
The objective is stealing other Team Plane and Get it back to base ..
i v maked evry thing exept This Hard Step : i need pawn code that Make The objective plane..An Objective plane.
Hope You Help me
if You Didnt Understand What i m asking. reply
Re: How To Make Objective Vehicles -
Tom1412 - 09.03.2012
dude no one will make that for free
Re: How To Make Objective Vehicles -
AndreT - 09.03.2012
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.
}
Re: How To Make Objective Vehicles -
trick_master - 09.03.2012
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 ?
Re: How To Make Objective Vehicles -
AndreT - 09.03.2012
I'm obviously not going to write any more code for you on this specific issue. Although I do offer coding for money, I wrote the previous just to help you understand a little.
Re: How To Make Objective Vehicles -
trick_master - 09.03.2012
Quote:
Originally Posted by AndreT
I'm obviously not going to write any more code for you on this specific issue. Although I do offer coding for money, I wrote the previous just to help you understand a little.
|
okay
Re: How To Make Objective Vehicles -
Vince - 09.03.2012
Meh, just open the Rivershell gamemode that comes with the server pack and adjust to your needs. It's the same type of capture-the-vehicle gamemode.
Re: How To Make Objective Vehicles -
trick_master - 12.03.2012
Quote:
Originally Posted by Vince
Meh, just open the Rivershell gamemode that comes with the server pack and adjust to your needs. It's the same type of capture-the-vehicle gamemode.
|
Thank You So Much , it works Great !