Raised This Month: $ Target: $400
 0% 

Hard coding steamid into an amxx plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ltcjohnson
Junior Member
Join Date: Nov 2004
Old 03-07-2006 , 09:34   Hard coding steamid into an amxx plugin
Reply With Quote #1

I want to hard code peoples steamid into a plugin because there isnt enough custom admin levels. What would be the best way to go about it?

What would I need to change to have it use steam id instead of the ADMIN_LEVEL_A ect...?

Code:
#include <amxmodx>   #include <amxmisc>   #include <cstrike>   public plugin_init() {     register_plugin("AMX Admin Model", "1.1.1", "whitemike")     register_event("ResetHUD", "resetModel", "b") } public plugin_precache() {     precache_model("models/player/admin_ct/admin_male_ct.mdl")     precache_model("models/player/admin_te/admin_male_te.mdl")     precache_model("models/player/admin_ct/admin_girl_ct.mdl")     precache_model("models/player/admin_te/admin_girl_te.mdl") } public resetModel(id, level, cid) {           if (get_user_flags(id) & ADMIN_LEVEL_A) {                   new CsTeams:userTeam = cs_get_user_team(id)                   if (userTeam == CS_TEAM_T) {                           cs_set_user_model(id, "admin_male_te")         }                   else if(userTeam == CS_TEAM_CT) {                           cs_set_user_model(id, "admin_male_ct")         }                   else {             cs_reset_user_model(id)         }     }           if (get_user_flags(id) & ADMIN_LEVEL_B) {                   new CsTeams:userTeam = cs_get_user_team(id)                   if (userTeam == CS_TEAM_T) {                           cs_set_user_model(id, "admin_girl_te")         }                   else if(userTeam == CS_TEAM_CT) {                           cs_set_user_model(id, "admin_girl_ct")         }                   else {                           cs_reset_user_model(id)         }     }     return PLUGIN_CONTINUE }
ltcjohnson is offline
 



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 20:29.


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