Raised This Month: $ Target: $400
 0% 

Help with one script


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fr4Nc3Zu
Junior Member
Join Date: Jul 2008
Old 09-20-2012 , 10:21   Help with one script
Reply With Quote #1

Hello..i dont know scripting..but i have one friend who made this script:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

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

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

        return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
        if (
get_user_flags(id) & ADMIN_LEVEL_H) {
                new 
CsTeams:userTeam cs_get_user_team(id)
                if (
userTeam == CS_TEAM_T) {
                        
cs_set_user_model(id"vip_te")
                }
                else if(
userTeam == CS_TEAM_CT) {
                        
cs_set_user_model(id"vip_ct")
                }
                else {
                        
cs_reset_user_model(id)
                }
        }

        return 
PLUGIN_CONTINUE

The script it`s working..but has a small error occasionally:
PHP Code:
[AMXXRun time error 10 (plugin "vip_model.amxx") (native "cs_get_user_team") - debug not enabled
Any clue what`s that about ? It helps if i put the plugin in debug mod ?

Last edited by Fr4Nc3Zu; 09-22-2012 at 17:40.
Fr4Nc3Zu is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 09-20-2012 , 13:45   Re: Help with one script
Reply With Quote #2

Yes. Enable debug and post output.
gogicaa is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 09-20-2012 , 18:58   Re: Help with one script
Reply With Quote #3

It's badly coded.
__________________

Last edited by claudiuhks; 09-20-2012 at 19:56.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
avril-lavigne
Banned
Join Date: Apr 2009
Old 09-21-2012 , 19:31   Re: Help with one script
Reply With Quote #4

use case CS_TEAM_CT:
check if(is_user_alive(id)) {
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 09-21-2012 at 19:32.
avril-lavigne is offline
Fr4Nc3Zu
Junior Member
Join Date: Jul 2008
Old 09-22-2012 , 11:10   Re: Help with one script
Reply With Quote #5

like i said..i dont know scripting..what it`s wrong ?
I`m waiting for exact error..debug on..
Fr4Nc3Zu is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 09-22-2012 , 11:43   Re: Help with one script
Reply With Quote #6

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

new bool:g_bAdmin33 ];

public 
plugin_init( ) {
    
register_plugin"Admin Model""1.2""whitemike" );
    
    
RegisterHamHam_Spawn"player""FwdHamPlayerSpawn");
}

public 
plugin_precache( ) {
    
precache_model"models/player/vip_ct/vip_ct.mdl" );
    
precache_model"models/player/vip_te/vip_te.mdl" );
}

public 
client_authorizedid )
    
g_bAdminid ] = bool:( get_user_flagsid ) & ADMIN_LEVEL_H );

public 
client_disconnectid )
    
g_bAdminid ] = false;

public 
FwdHamPlayerSpawn( const id ) {
    if( 
g_bAdminid ] && is_user_aliveid ) ) {
        switch( 
cs_get_user_teamid ) ) {
            case 
CS_TEAM_Tcs_set_user_modelid"vip_te" );
            case 
CS_TEAM_CTcs_set_user_modelid"vip_ct" );
        }
    }

use that version of the plugin.
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos is offline
Fr4Nc3Zu
Junior Member
Join Date: Jul 2008
Old 09-22-2012 , 16:18   Re: Help with one script
Reply With Quote #7

ty..i will try this version

LE: so far so good..no errors

Last edited by Fr4Nc3Zu; 09-26-2012 at 03:29.
Fr4Nc3Zu 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 08:13.


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