SA-MP Forums Archive
speedgun inside vehicle - 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)
+--- Thread: speedgun inside vehicle (/showthread.php?tid=572848)



speedgun inside vehicle - Eestlane123 - 02.05.2015

Is this possible to script?
If police officer is inside COP Car, then he can see speed of car what is forward of cop car


Re: speedgun inside vehicle - Michael B - 02.05.2015

Yes, it can be scripted. I've seen something similar to a roleplay server. I don't know more details though.

Edit: Found this filterscript meanwhile. I hope it is what you're looking for.


Re: speedgun inside vehicle - Eestlane123 - 02.05.2015

Thank you


Re: speedgun inside vehicle - Eestlane123 - 05.05.2015

i try to put this script inside my gamemode, if i put this
Код:
for (new i = 1; i <= MAX_VEHICLES; i++)
        {
            VehRadarID [i] = -1;
            SpeedAndModel [i] = TextDrawCreate (545.0, 200.0, "~b~ ~n~~r~");
            TextDrawFont (SpeedAndModel [i], 2);
            TextDrawLetterSize (SpeedAndModel [i], 0.3, 1.0);
            CheckingSpeed [i] = 0;
        }
Then all car inside my server are gone/dissapeared.


Re: speedgun inside vehicle - MP2 - 05.05.2015

Show the declarations of those arrays. They need to be [MAX_VEHICLES+1] in size. Probably an index out of bounds error.


Re: speedgun inside vehicle - Eestlane123 - 05.05.2015

i'm not sure what you mean, maybe this

Код:
new OldVehID [MAX_PLAYERS];
new Text: SpeedAndModel [MAX_VEHICLES];
new VehRadarID [MAX_VEHICLES];
new CheckingSpeed [MAX_VEHICLES];
new Text: RadarHud;



Re: speedgun inside vehicle - Pottus - 05.05.2015

Код:
new Text: SpeedAndModel [MAX_VEHICLES];
Really dude?

To do this you need to think of how you want to it work EXACTLY first it is very easy to code actually.


Re: speedgun inside vehicle - Eestlane123 - 05.05.2015

maybe you help, 'cause i dont understand...