SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Help Archive (https://forum.sa-mp.com/forumdisplay.php?f=89)
-   -   Sm like an optional Parameter (https://forum.sa-mp.com/showthread.php?t=126004)

Rauminator 06/02/2010 04:38 PM

Sm like an optional Parameter
 
Hey Guys
I want to realize a Reallife Mode but I stack at the Carsystem.
My idea: A Optional Parameter to AddStaticVehicle but I know its not realizable without changing the corefiles.

Anyone with an idea?

DeathOnaStick 06/02/2010 05:37 PM

Re: Sm like an optional Parameter
 
What do you mean? I don't understand neither, what you want to effect with it, nor, what you want to do with it. Please explain a bit further.

Correlli 06/02/2010 05:40 PM

Re: Sm like an optional Parameter
 
You don't need to change the core files.

Example:
pawn Code:
stock AddVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, my_param)
{
  new
      vehicleID = AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, angle, color1, color2);
  myVariable[vehicleID] = my_param;
  return vehicleID;
}

I haven't tested this, i guess you'll need to that.

If this is what you want?


All times are GMT. The time now is 12:35 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.