AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Example Of Sprite (https://forums.alliedmods.net/showthread.php?t=106843)

Fraancooo-. 10-19-2009 15:10

Example Of Sprite
 
Someone give me an example on how to make a sprite to a player?

From already thank you very much

Sorry For my bad English

Hawk552 10-19-2009 15:14

Re: Example Of Sprite
 
Quote:

Originally Posted by Fraancooo-. (Post 967108)
Someone give me an example on how to make a sprite to a player?

From already thank you very much

Sorry For my bad English

You mean one that follows a player? Do you want it as a message or an entity?

Fraancooo-. 10-19-2009 15:15

Re: Example Of Sprite
 
As an entity, to put many sprites on a menu and you can buy, such as the powers of the Super Hero

Hawk552 10-19-2009 15:16

Re: Example Of Sprite
 
Quote:

Originally Posted by Fraancooo-. (Post 967113)
As an entity, to put many sprites on a menu and you can buy, such as the powers of the Super Hero

What do you want the entity to do? Follow a player?

Fraancooo-. 10-19-2009 15:22

Re: Example Of Sprite
 
Yes, sorry is that previously did not understand you

Hawk552 10-19-2009 15:52

Re: Example Of Sprite
 
Untested but compiled:

PHP Code:

#include <amxmodx>
#include <engine>

new gSpriteModel[] = "sprites/dot.spr"
new gSprite

new gPlayerSprite[33]

public 
plugin_init()
    
register_plugin"Sprite Follow""1.0""Hawk552" )

public 
plugin_precache()
    
gSprite precache_modelgSpriteModel )

public 
plugin_cfg()
    
register_clcmd"mysprite""CmdMySprite" )

public 
CmdMySpriteid )
{
    if ( 
gPlayerSprite[id] )
    {
        
remove_entitygPlayerSprite[id] )
        
gPlayerSprite[id] = 0
    
}
    else
    {
        new 
ent gPlayerSprite[id] = create_entity"info_target" )
        
entity_set_stringentEV_SZ_classname"env_sprite" )
        
entity_set_intentEV_INT_modelindexgSprite )
        
entity_set_intentEV_INT_rendermode// additive for transparency
        
entity_set_floatentEV_FL_renderamt255.0 // completely solid
        
entity_set_edictentEV_ENT_aimentid )
        
entity_set_intentEV_INT_movetypeMOVETYPE_FOLLOW )
    }
    
    return 
PLUGIN_HANDLED



Fraancooo-. 10-19-2009 16:04

Re: Example Of Sprite
 
thanks testing now


All times are GMT -4. The time now is 17:44.

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