Raised This Month: $ Target: $400
 0% 

script c4model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-25-2007 , 04:32   script c4model
Reply With Quote #1

I maked this:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Test Change c4"
#define VERSION "1.0"
#define AUTHOR "SAMURAI"


#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_concmd("amx_c4model","change_c4model",ADMIN_RCON,"message etc...");
}

public change_c4model(id,level,cid)
{
    if(!cmd_access(id,level,cid,2))
    return PLUGIN_HANDLED;
    
    new argv[64]
    read_argv(1,argv,63)
    
    new g_model[128]
    
    if(argv[0])
    {
        format(g_model, 127, "models/%s.mdl", argv)
    }
    
    else
    {
        copy(g_model,127,"models/w_c4.mdl")
    }
    
    new target = -1, classname[] = "func_bomb_target"
    while ((target = fm_find_ent_by_class(target, classname)))
    {
        engfunc(EngFunc_SetModel,"func_bomb_target")
    }
    
    return PLUGIN_HANDLED;
}
But doesen't change the model when i use command . It's something wrong on my code ?
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:43.


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