OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Bulletsfire on 12 Jan 2004, 23:18:13

Title: read speed script
Post by: Bulletsfire on 12 Jan 2004, 23:18:13
is there a current script or what do i need to put it to make a script to read the speed on a vehicle and make it say you are speeding.
Title: Re:read speed script
Post by: macguba on 13 Jan 2004, 00:03:26
speed obj

Operand types:
obj: Object
Type of returned value:
Number
Description:
Object speed (in km/h)

Example:
speed player



Always[/i] look up the command reference before you post a question.  ;)
Title: Re:read speed script
Post by: gundernak on 13 Jan 2004, 00:16:39
syntax: [vehiclename,100] exec "speeding.sqs"

100 is the limit, you can set as you wish

speeder.sqs:
Code: [Select]
_speeder = _this select 0
_limit = _this select 1

#traffipax

@ speed _speeder > _limit

hint "you are speeding"

@ speed _speeder < _limit

goto "traffipax"

exit
Title: Re:read speed script
Post by: gundernak on 13 Jan 2004, 00:39:34
you can add this before line
Code: [Select]
goto "traffipax"
Code: [Select]
hint ""
Title: Re:read speed script
Post by: dmakatra on 13 Jan 2004, 08:01:14
You need a delay in that script or you'll end up with a friggn hint-pinging nightmare. :o

:beat: *Gets Shot* :beat:

EDIT: Whooop, nevermind. Thought it was ? not @ ;D
Title: Re:read speed script
Post by: Bulletsfire on 14 Jan 2004, 04:42:58
ok, now, i got that working. im not very good at scripting but i can i make it display you are speeding to the person and say that "speeders name here" is speeding to only certain other players? ;D