AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Origin] Make it further (https://forums.alliedmods.net/showthread.php?t=253310)

~Ice*shOt 12-19-2014 18:19

[Origin] Make it further
 
How I can do this Sprblood a little bit further from player? I need that spr at the point where player is aiming. My code:

PHP Code:

public Sprblood(id)
{
    new 
iOrigin[3]
    
get_user_origin(idiOrigin1);

    for (new 
03i++)
    {
        for (new 
02j++)
        {
            
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            
write_byte(TE_BLOODSPRITE)
            
write_coord(iOrigin[0] + 40)
            
write_coord(iOrigin[1])
            
write_coord(iOrigin[2])
            
write_short(spr_blood_spray)
            
write_short(spr_blood_drop)
            
write_byte(225)
            
write_byte(15)
            
message_end()
        }
    }


Now it is further, but when I turn a little bit it's on the same place (because I'm adding only at X).
I think I need to get other origin, but I don't know which.

HamletEagle 12-20-2014 05:59

Re: [Origin] Make it further
 
Code:

new iOrigin[3]
get_user_origin(id, iOrigin, 3);

Get the origin from players eyes(where he is aiming).

~Ice*shOt 12-20-2014 10:25

Re: [Origin] Make it further
 
With this it appears at the end of aim origin, for example if you're aiming into wall it appers on it

HamletEagle 12-20-2014 10:32

Re: [Origin] Make it further
 
And where you want ?


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

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