AlliedModders

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

KrazyKiller316 08-29-2005 20:00

Script
 
Is there a way to give to Make the models go to 1 person/SteamID

Code:

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

public plugin_init() {
        register_plugin("Admin Models", "1.1.1", "Krazy")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

public plugin_precache() {
        precache_model("models/player/krazy/krazy.mdl")
        precache_model("models/player/krazy/krazy.mdl")

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
        if (get_user_flags(id)) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "krazy.mdl")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "krazy.mdl")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}

I took the script from someone Sorry :)

Velocity36 08-29-2005 20:12

You can make them go to an admin..if thats what you want

KrazyKiller316 08-29-2005 20:13

no i want it to go to 1 person

Velocity36 08-29-2005 20:16

You can try this..

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {         register_plugin("Admin Models", "1.1.1", "Krazy")         register_event("ResetHUD", "resetModel", "b")         return PLUGIN_CONTINUE } public plugin_precache() {         precache_model("models/player/krazy/krazy.mdl")         precache_model("models/player/krazy/krazy.mdl")         return PLUGIN_CONTINUE } public resetModel(id, level, cid) {         if (get_user_authid(id) = STEAM_ID_HERE ) {                 new CsTeams:userTeam = cs_get_user_team(id)                 if (userTeam == CS_TEAM_T) {                         cs_set_user_model(id, "krazy.mdl")                 }                 else if(userTeam == CS_TEAM_CT) {                         cs_set_user_model(id, "krazy.mdl")                 }                 else {                         cs_reset_user_model(id)                 }         }         return PLUGIN_CONTINUE }

KrazyKiller316 08-29-2005 20:16

i dont want it to go for all admins....

Velocity36 08-29-2005 20:18

Reaplace STEAM_ID_HERE with the steam ID you want it to go to

KrazyKiller316 08-29-2005 20:18

All i got was Errors!!!

Velocity36 08-29-2005 20:19

Try again, I updated it.

XxAvalanchexX 08-29-2005 20:19

Velocity, I'm beginning to think you don't really understand how to code.

KrazyKiller, this should work:

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define STEAMID STEAM_0:0:1234567 public plugin_init() {         register_plugin("Admin Models", "1.1.1", "Krazy")         register_event("ResetHUD", "resetModel", "b") } public plugin_precache() {         precache_model("models/player/krazy/krazy.mdl") } public resetModel(id) {         new steamid[32];         get_user_authid(id,steamid,31);         if(equali(steamid,STEAMID)) {                 cs_set_user_model(id, "krazy")         } }

KrazyKiller316 08-29-2005 20:22

it didnt give me error but im gonna try it


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

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