Raised This Month: $ Target: $400
 0% 

Need help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 01-15-2012 , 13:34   Need help
Reply With Quote #1

I was trying to make a top3 model plugin but, it say's warning at: 40th line can someone help? I don't know what i made wrong

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

public plugin_init() {
    
register_plugin("Top Model""1.0""Kakarott")
    
register_event("ResetHUD""resetModel""b")
    return 
PLUGIN_CONTINUE
}

public 
plugin_precache() {
    
precache_model("models/player/top1/top1.mdl")
    
precache_model("models/player/top1/top1T.mdl")
    
precache_model("models/player/top2/top2.mdl")
    
precache_model("models/player/top3/top3.mdl")
    
    return 
PLUGIN_CONTINUE
}

public 
resetModel(id)
{
    new 
izStats[8] = {0, ...}
    new 
izBody[8]
    new 
iRankPos
    
    iRankPos 
get_user_stats(idizStatsizBody)
    
    if (
<= iRankPos ) {
            
cs_set_user_model(id"top1")
        }
        else if(
iRankPos == ) {
            
cs_set_user_model(id"top2")
        }
    else if(
iRankPos == ) {
            
cs_set_user_model(id"top3")
        }
        else {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE

aaa131 is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 01-15-2012 , 13:39   Re: Need help
Reply With Quote #2

Tip: Don't use cs_set_user_model.

Fixed to compile:

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

public plugin_init() { 
    
register_plugin("Top Model""1.0""Kakarott"
    
register_event("ResetHUD""resetModel""b"


public 
plugin_precache() { 
    
precache_model("models/player/top1/top1.mdl"
    
precache_model("models/player/top1/top1T.mdl"
    
precache_model("models/player/top2/top2.mdl"
    
precache_model("models/player/top3/top3.mdl"


public 
resetModel(id

    new 
izStats[8] = {0, ...} 
    new 
izBody[8
    new 
iRankPos 
     
    iRankPos 
get_user_stats(idizStatsizBody
     
    if (
<= iRankPos )
        
cs_set_user_model(id"top1"
    else if(
iRankPos == )
        
cs_set_user_model(id"top2"
    else if(
iRankPos == )
        
cs_set_user_model(id"top3"
    else
        return 
PLUGIN_HANDLED 
        
    
return PLUGIN_CONTINUE 

Problem? bad tabbing.

Last edited by fireattack; 01-15-2012 at 13:41.
fireattack is offline
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 01-15-2012 , 13:44   Re: Need help
Reply With Quote #3

thank you What do you suggesting instead of cs_set_user? (sry for bad english)
aaa131 is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 01-15-2012 , 13:48   Re: Need help
Reply With Quote #4

Check this ->

https://forums.alliedmods.net/showthread.php?t=69386
http://forums.alliedmods.net/showthread.php?t=161255
fireattack is offline
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 01-15-2012 , 14:47   Re: Need help
Reply With Quote #5

I could'nt use this can you make for me ?
https://forums.alliedmods.net/showthread.php?t=69386
I am beginner I can't merge this codes with my codes
aaa131 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 15:38.


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