SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

Thread Tools Display Modes
Old 06/02/2010, 04:38 PM   #1
Little Clucker
Join Date: Jan 2010
Posts: 2
Reputation: 0
Default 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?
Rauminator is offline  
Old 06/02/2010, 05:37 PM   #2
DeathOnaStick's Avatar
Join Date: May 2009
Posts: 1,028
Reputation: 27
Default 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.
If this helps you, please thank me by giving me reputation points
DeathOnaStick is offline  
Old 06/02/2010, 05:40 PM   #3
Correlli's Avatar
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: Sm like an optional Parameter

You don't need to change the core files.

pawn Code:
stock AddVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, my_param)
      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?
Correlli is offline  

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED \o/]sscanf and multiple optional parameters dcmd_crash Help Archive 29 26/04/2010 12:36 AM
Optional parameters? Gozerr Help Archive 1 27/02/2010 02:21 PM
Optional Parameters Dreftas Help Archive 1 11/10/2009 11:34 AM
using sscanf for optional integer inputs at the end of a command ( possible?) iLinx Help Archive 1 31/07/2009 08:00 PM

All times are GMT. The time now is 11:50 PM.

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