AlliedModders

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

MAMOHT 07-20-2011 10:12

Problem
 
Hello,
I want to create a plugin that would change the model to any other terrorist model, at a certain variable. I tried to create, but nothing came of it. What did I do wrong in the plugin?
Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "test"
#define VERSION "1.0 beta"
#define AUTHOR "Mihail"




public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("dr_mode","1")
    return PLUGIN_CONTINUE
}
public plugin_precache ()
{
    precache_model("models/player/gign/gign.mdl")
    return PLUGIN_CONTINUE
}

///террорист становится зомби
public ter_infect(id) {
    if (get_user_team(id) == 1 && get_cvar_num("dr_mode") == 2)
    {
        cs_set_user_model(id, "gign")
        set_user_health(id, 2000)
        return PLUGIN_CONTINUE
    }
    return PLUGIN_CONTINUE
}

P.S. Translate by google.:mrgreen:

ANTICHRISTUS 07-20-2011 16:39

Re: Problem
 
sorry but, do you know this: Players Models 1.3.1 ( 13 nov 2010 ) ?


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

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