AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [q]need small fix in syntax (https://forums.alliedmods.net/showthread.php?t=207916)

oxygen935 02-08-2013 08:56

[q]need small fix in syntax
 
Hello everyone,
i want to create a plugin whick in player spawn will change the model of vip when he is CT to a custom model...

but i need some help to do this...

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "Vip Model"
#define VERSION "1.0"
#define AUTHOR "oxygen"


public plugin_init() 
{
    
RegisterHam(Ham_Spawn"player""player_spawn"1)
}

public 
plugin_precache()
{
    
precache_model("models/player/bond/bond.mdl")
    
precache_model("models/player/bond/bondT.mdl")
}

public 
player_spawn(id)
{
    if(
cs_get_user_team(id) == CS_TEAM_CT || get_user_flags ADMIN_LEVEL_H)
    {
        
cs_set_user_model(id"bond")
    }



hleV 02-08-2013 08:58

Re: [q]need small fix in syntax
 
Code:
if(cs_get_user_team(id) == CS_TEAM_CT || get_user_flags & ADMIN_LEVEL_H)
:arrow:
Code:
if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT && get_user_flags & ADMIN_LEVEL_H)

oxygen935 02-08-2013 09:04

Re: [q]need small fix in syntax
 
syntax error again!....

hleV 02-08-2013 09:10

Re: [q]need small fix in syntax
 
Oh,
Code:
get_user_flags
:arrow:
Code:
get_user_flags(id)


All times are GMT -4. The time now is 20:35.

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