AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   change attack sprite (ESF: esforces) (https://forums.alliedmods.net/showthread.php?t=50300)

turbex 01-23-2007 14:02

change attack sprite (ESF: esforces)
 
what is the correct form to change a attack sprite
for example, i want to change a kamehameha sprite:

and i try this:
PHP Code:

#include <amxmodx>
#include <engine>
#include <fun>
#include <fakemeta>
#include <amxmisc>

new kamestartakamechargekameabkametrail 

public plugin_init()
{
    
register_plugin("myPlugin""1.0""tUrBeX");
    
register_messageget_user_msgid"EETrail" ), "trail" );
}

public 
plugin_precache()
{
    
kamestarta precache_model("sprites/10xkameastart.spr")
    
kameab precache_model("sprites/10xkamea.spr")
    
kametrail precache_model("sprites/10xkametrail.spr")
    
kamecharge precache_model("sprites/10xkamecharge.spr"
}

public 
trail(id)
{
    
pid read_data(1)
    new 
clipammo
    
new weaponId get_user_weapon(pidclipammo)
    if (
weaponId == 6)
    {
        
set_msg_arg_int5ARG_SHORTkamecharge// beam start
        
set_msg_arg_int6ARG_SHORTkamestarta// beam head
        
set_msg_arg_int7ARG_SHORTkameab)
        
set_msg_arg_int8ARG_SHORTkametrail// trail
        
set_msg_arg_int9ARG_BYTEget_msg_arg_int(9) * 
    }


but this code doesn't work... please help... what is the correct script?

dutchmeat 01-24-2007 03:58

Re: change attack sprite (ESF: esforces)
 
pid = read_data(1)

should be:

new pid = read_data(1)

Or to make it use less memory:

remove new pid = read_data,

and change 'get_user_weapon(pid, clip, ammo)'
to
'get_user_weapon(read_data(1), clip, ammo)'

turbex 01-25-2007 02:51

Re: change attack sprite (ESF: esforces)
 
ok... thanks...
but... the same result... doesn't work

any idea?


All times are GMT -4. The time now is 22:29.

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