Raised This Month: $ Target: $400
 0% 

a script from my sma. !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 08-28-2009 , 09:40   a script from my sma. !
Reply With Quote #1

where is the problem?

return PLUGIN_CONTINUE

}

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

return PLUGIN_CONTINUE
}

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


register_event("ResetHUD", "resetModel", "b")
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
hzqst
Senior Member
Join Date: Jul 2008
Old 08-28-2009 , 10:07   Re: a script from my sma. !
Reply With Quote #2

why do you write
PHP Code:
precache_model("models/player/smith/smith.mdl"
2 times?
hzqst is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-28-2009 , 10:10   Re: a script from my sma. !
Reply With Quote #3

Here you go

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

public plugin_init( ) {
    
register_plugin"Model""1.0""xPaw" );
    
    
RegisterHamHam_Spawn"player""FwdHamSpawn_Player");
}

public 
plugin_precache( )
    
precache_model"models/player/smith/smith.mdl" );

public 
FwdHamSpawn_Playerid )
    if( 
is_user_aliveid ) && ( get_user_flagsid ) & ADMIN_CVAR ) )
        
cs_set_user_modelid"smith" ); 
__________________
xPaw is offline
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 08-28-2009 , 10:18   Re: a script from my sma. !
Reply With Quote #4

i need to add it in my sma. ....

no creat new plugin
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-28-2009 , 12:40   Re: a script from my sma. !
Reply With Quote #5

wtf? he reconstructed your code... you did it wrong... what you means with "my sma"?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 08-28-2009 , 12:46   Re: a script from my sma. !
Reply With Quote #6

http://forums.alliedmods.net/showthread.php?t=101902


thats i mean
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 08-28-2009 , 17:43   Re: a script from my sma. !
Reply With Quote #7

Actually the Zombie Plague Core sets the models in every spawn, there is no need of doing that :/
__________________
"There is no knowledge, that is not power"
fezh is offline
Reply


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 14:59.


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