24.10.2007, 14:01
[color=red][center][FS]Speeding control
I always wanted to make something unique. And here is it. If you go to fast than next to a object(flitspaal=dutch, how to say it in english?? ) the max speed then you will get fined depented on your speed.
Credits:
Speedometer creater: Peter
Speeding limit: Antironix
Screenshots:
/imageshack/my.php?i...edlimitwl3.jpg
How to add a new "flitspaal :"
At line 68 you see:
Delete those other AddFlitsPaal things and add your new one. If you want to have more then 2 "Flitspalen " then set maxobject to another number(can be found at the top of the script.
this is how you must add a new "flitspaal".
modelid=object id. Look on wiki.
Floatx/yy/zz= coordinates.
radius= How far you can be caught of the "flitspaal".
Speed= The max speed you may drive.
Update:
Download:
http://www.pastebin.ca/750380
http://rapidshare.com/files/65320633/speedo.rar.html
Questions:
grtz Anti
ps. I didn't found any translations of the word "flitspaal". So somebody let me know how you call it.
I always wanted to make something unique. And here is it. If you go to fast than next to a object(flitspaal=dutch, how to say it in english?? ) the max speed then you will get fined depented on your speed.
Credits:
Speedometer creater: Peter
Speeding limit: Antironix
Screenshots:
/imageshack/my.php?i...edlimitwl3.jpg
How to add a new "flitspaal :"
At line 68 you see:
pawn Код:
AddFlitsPaal(i, 1278, 2077.5579,1013.2529,10.8203, 20, 50);
AddFlitsPaal(i, 1278, 2078.9189,1235.0403,10.3865, 20, 40);
this is how you must add a new "flitspaal".
pawn Код:
AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)
Floatx/yy/zz= coordinates.
radius= How far you can be caught of the "flitspaal".
Speed= The max speed you may drive.
Update:
Quote:
Updated. I deleted the speedo meter, it gave me some bugs and i didn't want to fix the speedo meter but only the flitspaal thing. Changes: - Deleted speedometer - playerid has become i(all players) example: PAWN Code: AddFlitsPaal(i, 1278, 2077.5579,1013.2529,10.8203, 20, 100); AddFlitsPaal(i, 1278, 2078.9189,1235.0403,10.3865, 20, 40); Fixed: - Working now for all players - If it is good, the object are working too! New things: - Added a delay that ALL players can be shotted again. I set it to 1 second to make it save that you won't be shot twice. If you want to get the fee less change the number 17 on line 112 or change the 1:10(broke?lol) . Example: PAWN Code: 20 * 17/10 =34 $ to pay 20 * 5/10 = 10 $ to pay 20 * 3/10 = 6 $ to pay |
http://www.pastebin.ca/750380
http://rapidshare.com/files/65320633/speedo.rar.html
Код:
Question 1: I get fined twice, how to avoid it? Answer: Well there isn't really a way to avoid it how you want it,but there are 3 ways; 1. Just change the updateseconds, so you all players can get 1 second after someone get fined not get fined. 2. Change the speed to a very high value, so you will pass the flitspaal faster than your updateseconds. 3. Change your radius. If you have a small radius you drive faster through it. If you have a large radius, you get fined lots of time. Question 2: How to change the fee? Answer: Just play with the numbers under new fee = 17/10;. The fee is calculated like this: (YOURSPEED - MAXSPEED)*(17/10). So if you driving 20 mph and the maxspeed is 10, your fee is (20-10)*(17/10)=17. If you lower the 17 of 17/10 then your fee will be lower, if you make it higher then the fee will be higher.
ps. I didn't found any translations of the word "flitspaal". So somebody let me know how you call it.