Raised This Month: $ Target: $400
 0% 

Some help...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mentalproblems
Junior Member
Join Date: Mar 2019
Old 08-15-2019 , 17:09   Some help...
Reply With Quote #1

If I'm wanting to set a knife model to work only with my SteamID.

How do I do that... How do I actually make the plugin recognize my ID...

if (get_user_authid(id) == "STEAM:1:0_ID") or?... anyone to explain me how to?

Thank u.


What I mean is, how do I make this work?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>

#define ADMINFLAG    ADMIN_LEVEL_G

new const myid[] = "STEAM_0:1:xxxxxx"

new const v_Knife_Admin[64] = "models/rgc_vip/v_vip_knife.mdl"
new const v_Knife_myknife[64] = "models/rgc_vip/v_alb_knife.mdl"

public plugin_init() {
    
register_plugin("Admin/VIP Knife Models""2.0""nobody")
    
register_event("CurWeapon""Event_CurWeapon""be""1=1")
}

public 
plugin_precache() {
    
precache_model(v_Knife_Admin)
    
precache_model(v_Knife_myknife)
}

public 
Event_CurWeapon(id) {
    new 
weapon read_data(2)
    
    if (
get_user_authid(idmyidcharsmax(myid)) && (weapon == CSW_KNIFE) {
        
set_pev(idpev_viewmodel2v_Knife_myknife)
    }
    else if(
get_user_flags(id) == ADMINFLAG && weapon == CSW_KNIFE) {
        
set_pev(idpev_viewmodel2v_Knife_Admin)
    }


Last edited by mentalproblems; 08-15-2019 at 17:22. Reason: Added code.
mentalproblems is offline
 


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 17:25.


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