Raised This Month: $ Target: $400
 0% 

All models do not changes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fighterzaka
Member
Join Date: Mar 2006
Old 10-17-2006 , 05:16   All models do not changes
Reply With Quote #1

Look i found a scirpting and edit little bit only name not the code it works but when next round some change the model not all
and next round again one player they was changed is normal and so other some times only 2 they changes soemtimes 70% of the peoples

The code is here:


Code:
Code: #include <amxmodx> #include <amxmisc> #include <cstrike> public plugin_init() {         register_plugin("Simpsons EDIT", "1.1.1", "Fighter")         register_event("ResetHUD", "resetModel", "b")         return PLUGIN_CONTINUE } public plugin_precache() {         precache_model("models/player/ctfun/ctfun.mdl")         precache_model("models/player/tfun/tfun.mdl")         return PLUGIN_CONTINUE } public resetModel(id, level, cid) {                 new CsTeams:userTeam = cs_get_user_team(id)             if(is_user_alive(id)) {                 if (userTeam == CS_TEAM_T) {                         cs_set_user_model(id, "tfun")                 }                 else if(userTeam == CS_TEAM_CT) {                         cs_set_user_model(id, "ctfun")                 }                 else {                         cs_reset_user_model(id)                 }         }         return PLUGIN_CONTINUE }

PS. i have place the
right place the proplem is all playrs do not changes :S¨

Please say if i ask too much
Fighterzaka is offline
Send a message via MSN to Fighterzaka
Fighterzaka
Member
Join Date: Mar 2006
Old 10-17-2006 , 16:10   Re: All models do not changes
Reply With Quote #2

Hello?
Fighterzaka is offline
Send a message via MSN to Fighterzaka
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 10-17-2006 , 23:11   Re: All models do not changes
Reply With Quote #3

1. Fix your indenting (I'm surprised it doesn't give you loose indentation warnings)
2. Why do you use id, level, cid as parameters (should only have id).
3. You don't need so many return statements

EDIT: Weird, I just noticed I have the same plugin in my cstrike folder
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 10-17-2006 at 23:16.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Fighterzaka
Member
Join Date: Mar 2006
Old 10-18-2006 , 05:13   Re: All models do not changes
Reply With Quote #4

Ok but i have a proplem more i can't code
i find that code can u like .. help me?

Code it? EDIT it?

Code:
//// simpsons.sma // C:\Programmer\hlserver\cstrike\addons\amxmodx\scripting\simpsons.sma<22> : warning 217: loose indentation // Header size:                            348 bytes // Code size:                               604 bytes // Data size:                               400 bytes // Stach/heap size:                   16384 bytes; estimated max. usage=175 cells <700 bytes> // Total requirements:                17816 // // 1 Warning. // Done. // // Compilation Time 0,19 sec // ------------------------------------------------

Last edited by Fighterzaka; 10-18-2006 at 05:23.
Fighterzaka is offline
Send a message via MSN to Fighterzaka
Fighterzaka
Member
Join Date: Mar 2006
Old 10-18-2006 , 08:06   Re: All models do not changes
Reply With Quote #5

I know can u do this for me Make every 30 Secounds it load the plugin or something like that PS. choose one of this
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>


public plugin_init() {
        register_plugin("Simpsons EDIT", "1.1.1", "Fighter")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

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

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {

                new CsTeams:userTeam = cs_get_user_team(id)
            if(is_dedicated_server(id)) {

                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "tfun")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "ctfun")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}
Next

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


public plugin_init() {
        register_plugin("Simpsons EDIT", "1.1.1", "Fighter")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}

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

        return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {

                new CsTeams:userTeam = cs_get_user_team(id)
            if(is_user_alive(id)) {

                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "tfun")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "ctfun")
                }
                else {
                        cs_reset_user_model(id)
                }
        }

        return PLUGIN_CONTINUE
}
Fighterzaka is offline
Send a message via MSN to Fighterzaka
Fighterzaka
Member
Join Date: Mar 2006
Old 10-20-2006 , 15:48   Re: All models do not changes
Reply With Quote #6

Hello?
Fighterzaka is offline
Send a message via MSN to Fighterzaka
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-20-2006 , 16:16   Re: All models do not changes
Reply With Quote #7

Quote:
Originally Posted by Fighterzaka View Post
is_dedicated_server(id)
wtf?
a client cannot be a dedicated server.

Did you even read what Lord_Destros wrote?
This will work...
Code:
#include <amxmodx> #include <cstrike> public plugin_init() {     register_plugin("Simpsons EDIT", "1.1.1", "Fighter")     register_event("ResetHUD", "resetModel", "b") } public plugin_precache() {     precache_model("models/player/ctfun/ctfun.mdl")     precache_model("models/player/tfun/tfun.mdl") } public resetModel(id) {         if ( ! is_user_connected(id) || ! is_user_alive(id) )         return PLUGIN_CONTINUE         new CsTeams:userTeam = cs_get_user_team(id)         if ( userTeam == CS_TEAM_T )         cs_set_user_model(id, "tfun")         else if ( userTeam == CS_TEAM_CT )         cs_set_user_model(id, "ctfun")     else         cs_reset_user_model(id)         return PLUGIN_CONTINUE }
[ --<-@ ] Black Rose is offline
Reply



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 04:51.


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