AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Smoke (https://forums.alliedmods.net/showthread.php?t=23042)

Obbin 01-09-2006 10:27

Smoke
 
1. What is the name of the smoke-sprite? (is there any at all?)
I mean the smoke that is in the air not the smokepuff.

2. Can i remove the smoke to one or many players? (buying smoke removal)

3. How to make a sprite that sticks to/follows one player (even if player is moving), that is onley visible to one person (#id)?

Thx

Charr 01-09-2006 13:41

1. - Dont get What you mean

2. - Dont get What you mean

3. - Yes

Obbin 01-09-2006 14:25

Quote:

Originally Posted by Charr
1. - Dont get What you mean

2. - Dont get What you mean

3. - Yes

1. I mean the smoke that appears when u throw a Smoke grenade. sorry if that wasn't clear.

2. I meaned that Player(1) can see the smoke and player(2) can't. (Smoke-grenade-smoke)

3. How?

Charr 01-09-2006 14:48

1 & 2 would probably be some sort of FM hook, while 3 you would have to use a message. If you need more info, try searching for SVC_TEMPENTITY.

Obbin 01-09-2006 14:49

3. Yeah i have done that but i don't understand how to make it stick to one player.

Charr 01-09-2006 14:54

Here:
Code:
// Global new sprite // In precache sprite = precache_model("...") //... message_begin(MSG_ONE,SVC_TEMPENTITY,{0,0,0},id) write_byte(17) // What kind of tempentity it is write_coord(origin[0]) // X Coordinate write_coord(origin[1]) // Y Coordinate write_coord(origin[2]) // Z Coordinate write_short(sprite) // The spr's name. Giving it 0 means it has none... write_byte(YourScaleHere) // The scale of the sprite (in 0.1s) write_byte(brightnessofthesprite) // And, well, the brightness of the sprite.   message_end()

Obbin 01-09-2006 14:58

Ok thx, now one more thing, how to get the coordinates of a player? :oops:
I guess Orgin[1], Orgin[2] and Orgin[3] should be the players coordinates?

Charr 01-09-2006 15:02

Yep
Code:
new origin[3] get_user_origin(id,origin,0)

But I forgot to mention that if you want to keep the sprite alive, you'll need to set a looping/repeating task.

Obbin 01-09-2006 15:28

client_PreThink?

Charr 01-09-2006 15:30

You can use that too :P


All times are GMT -4. The time now is 15:59.

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