SA-MP Forums Archive
Sm like an optional Parameter - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Sm like an optional Parameter (/showthread.php?tid=126004)



Sm like an optional Parameter - Rauminator - 06.02.2010

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?


Re: Sm like an optional Parameter - DeathOnaStick - 06.02.2010

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.


Re: Sm like an optional Parameter - Correlli - 06.02.2010

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?