07.01.2010, 00:50
Hi there,
I am a pretty decent scripter. However, I still have much to learn. For instance, is there a way to create a variable to equal every vehicle?
Okay, like this.
new vehid;
public OnGameModeInit( )
{
vehid = AddStaticVehicle(***,X,Y,Z,color1, color2); //
return 1;
}
public OnPlayerEnterVehicle (playerid, vehicleid)
{
if (vehicleid == vehid)
{
AddVehicleComponent(vehicle, 1010); // Nitro
}
return 1;
I want "***" to equal every vehicle in the game, regardless of coordinates of that model. I am sick of manually putting in line for line coding. It would be nice to cut down on some of my code so my server runs smoother. The server will take care of the rest whether the vehicle is capable of nitrous or not. I want to use this type of system for more than one function so it would really be great if someone can help me. Thanks
I am a pretty decent scripter. However, I still have much to learn. For instance, is there a way to create a variable to equal every vehicle?
Okay, like this.
new vehid;
public OnGameModeInit( )
{
vehid = AddStaticVehicle(***,X,Y,Z,color1, color2); //
return 1;
}
public OnPlayerEnterVehicle (playerid, vehicleid)
{
if (vehicleid == vehid)
{
AddVehicleComponent(vehicle, 1010); // Nitro
}
return 1;
I want "***" to equal every vehicle in the game, regardless of coordinates of that model. I am sick of manually putting in line for line coding. It would be nice to cut down on some of my code so my server runs smoother. The server will take care of the rest whether the vehicle is capable of nitrous or not. I want to use this type of system for more than one function so it would really be great if someone can help me. Thanks