[FilterScript] droll
#1

,,,
', What is this?

A Filterscript which detects a player driving on the wrong side of a road.
This script dont got any commands to use (it has 3 or 4, only for admins indeed). Its working in background, checking for players passing defined positions. What happens to the player then, is up to YOU
,,,
', What do i need else to run it?

ZCMD Include
sscanf2 Plugin
Streamer Plugin
,,,
', Commands

Code:
./addspot
	for /command lovers. adds 1 spot at the vehicle position. to be honest, its a relict from start :)
./addspots
	sets the player into a mode which allows to add 1 or more spots by pressing a key, some key-combinations adds a spot at the left/right side of your carm or 3/5 spots at the sides.
./savespots <Name>
	saves ALL spots into Spots/<Name>.txt
./erasespots
	instead of reloading the filterscript to ad a new route, you should start from scratch.
,,,
', How it (not) works (smart aleck alert!)

- a race-checkpoint with negative size, was supposed to work, unfortunately it shows the red marker on the map even with negative sizes.
- OnPlayerUpdate() or a timer, checking for like 1000 spots touched - would almost freeze the server, hence the MAX_PLAYERS limit.
- a Pickup, invisible to the player? well, sort of. i had some serious /rage moments when figuring out how to get that thing to work:

a pickup type 14 is pickupable in a car only. nice, exactly what i need, but it also plays a sound. shit.
a pickup type 23 is existing all the time, but cannot get picked up in a car... what to do?
the conclusion is the bribe-star (objectID 1247), type 23, which can get picked up like in singleplayer, we all know them.
by just "pushing" the pickups below the street makes them invisible, but they still can get touched. for broad roads some more pickups will work fine.
at high speeds it can happen that the pickup wont get touched, so either place 2 pickups a few units infront of the first one, or just depend on that the next one triggers...

Code:
new Float:PushDown=1.25;
makes them invisible. if you want to see the stars, just set it to 0. its good to know the already existing pickups. anyways, you wont need the stupid rotating stars when editing, the arrows do a better job.

here a little quick tut on how to use the /addspots in combination with key/joypadbutton presses:


Download:


if you create a route, let us ALL benefit of it: post it here in a comment, please.
Reply
#2

Great job Babul

Good for RolePlay servers.
Reply
#3

Your scripting makes it seem so damn simple!

Nice job, Babul!
Reply
#4

thx
even a blind chicken finds a corn sometimes ^^
oh btw: DONT count my typos lol
hm. i forgot to mention the S variable. it was meant to be used as checkpoint size - it will get used as Speed"Trap" in next version (player driving on the right side, but too fast), if requested.
Reply
#5

Quote:
Originally Posted by Babul
View Post
oh, i want to mention: no timers.
Streamer plugin uses a timer.
Reply
#6

Quote:
Originally Posted by Babul
View Post

- a Pickup, invisible to the player? well, sort of. i had some serious /rage moments when figuring out how to get that thing to work:

I stand corrected.

Nice
Reply
#7

@Macluawn:
indeed the plugin uses a timer, the script doesnt. shall i release a version especially for you WITH a scripted timer? ima do it then, and you dont forget to run the profiler aswell then, pls.
@Donya:
yes, you were assuming right with the pickups, thats why i rep-ed you +3 ^^
Reply
#8

script uses the plugin and plugin uses a timer.
so.. indirectly the script uses a timer.
Reply
#9

Quote:
Originally Posted by Macluawn
View Post
script uses the plugin and plugin uses a timer.
so.. indirectly the script uses a timer.
(Y) i wanted to say the same thing all is about the plugin !
Reply
#10

yep. nevertheless iam glad that it wont need a scripted timer for 500 players each, or a public called each 50ms, looping through 500 players to seek for like 2000 positions...
the streamer DOES all the dirty work :P (isnt it what we all are trying to do? save some worthy CPU cycles for the script? the streamer handles all >1000 pickups, and the script just reacts on them. i cant think about a better way to outsource CPU usage, so yes, youre right.)
also, pay attention to the HashBack array. it saves some time aswell hehe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)