AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need help with Cars (https://forums.alliedmods.net/showthread.php?t=29068)

Soilent 05-28-2006 23:07

I need help with Cars
 
I dont know crap about cars for scripting, but how would i make cars have horns so you could bind horn to a key???

pre-Thanks

Peli 05-28-2006 23:32

Don't really get what you're saying, but if you want to script this out than this does belong in this section.

So anyways, I guess you could register a client command for a button (let's say 'x')

Code:
register_clcmd("say /horn", "function_horn", 0, "Horn noise")

And from there you could precache a sound.

Code:
public plugin_precache() {    precache_sound("") }

From there you can do it. :)

SweatyBanana 05-28-2006 23:33

Werent you going to tell him how to emit the sound?

eTsov 05-28-2006 23:52

yes, how would you emit the sound and also:

1) How can you determine whether or not a player is driving the car when he says /horn. If he isnt then no horn noise.

2) Would the sound be coming from the actual car, or even the player i suppose, and be hearable by all players on the server who would be able to tell where the noise origionated. The sound being 3d and affected by distance.

Soilent 05-29-2006 01:17

i would rather have it concmd and binded

the server would get flooded with /horn


All times are GMT -4. The time now is 16:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.