AlliedModders

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

vikke 05-08-2005 06:00

Simspon Models
 
I don't see the problem. Im new to small.
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {         register_plugin("Simspon Models", "1.0", "vikke")         register_event("ResetHUD", "resetModel", "b")         return PLUGIN_CONTINUE } public plugin_precache() {         precache_model("models/player/simpson/terror.mdl")         precache_model("models/player/simpson/counter.mdl")         return PLUGIN_CONTINUE } public resetModel(id, level, cid) {                 if (userTeam == CS_TEAM_T) {                         cs_set_user_model(id, "terror")                 }                 else if(userTeam == CS_TEAM_CT) {                         cs_set_user_model(id, "counter")                 }         return PLUGIN_CONTINUE }
[/small]

v3x 05-08-2005 06:07

Try renaming stuff like this, and you need to get their team first:
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {     register_plugin("Simspon Models", "1.0", "vikke")     register_event("ResetHUD", "resetModel", "b")     return PLUGIN_CONTINUE } public plugin_precache() {     precache_model("models/player/simpson_t/simpson_t.mdl")     precache_model("models/player/simpson_ct/simpson_ct.mdl")     return PLUGIN_CONTINUE } public resetModel(id) {     new CsTeams:userTeam = cs_get_user_team(id)     if (userTeam == CS_TEAM_T) {         cs_set_user_model(id, "simpson_t")     }     else if(userTeam == CS_TEAM_CT) {         cs_set_user_model(id, "simpson_ct")     }     return PLUGIN_CONTINUE }

ZiP* 05-08-2005 06:10

You don't need the return PLUGIN_CONTINUE in the plugin_init...

do you? :roll:

v3x 05-08-2005 06:12

No, you don't really need it in your precache function either. I think you really only need it for hooked events.


All times are GMT -4. The time now is 16:49.

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