Raised This Month: $ Target: $400
 0% 

client_infochanged model!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-15-2016 , 06:41   client_infochanged model!
Reply With Quote #1

Hi !
who can give me the better way to cheack players has changed models in consol using "model" cmd

i tryed that but it is not accurate!

PHP Code:
new new_model[33][32
new 
old_model[33][32

public 
client_infochanged(id
{  
    if(!
is_user_alive(id))
    
get_user_info(id,"model",old_model[id],31

    if(!
equali(new_model[id],old_model[id]))
    {
        
client_cmd(id,"drop");
        
client_print(id,print_chat,"==== Check Model !==== "
        return 
PLUGIN_HANDLED     
    
}
    
    return 
PLUGIN_HANDLED

__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-16-2016 , 14:52   Re: client_infochanged model!
Reply With Quote #2

Bump!
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Old 04-16-2016, 15:39
fysiks
This message has been deleted by fysiks. Reason: nvm
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-16-2016 , 15:41   Re: client_infochanged model!
Reply With Quote #3

Perhaps you should read the rules.
__________________
fysiks is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-16-2016 , 17:17   Re: client_infochanged model!
Reply With Quote #4

Give me full code.
Krtola is offline
Send a message via Skype™ to Krtola
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-17-2016 , 01:43   Re: client_infochanged model!
Reply With Quote #5

Quote:
Originally Posted by Krtola View Post
Give me full code.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new new_model[33][32
new 
old_model[33][32]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
}
 

public 
client_infochanged(id
{  
    if(!
is_user_alive(id))
    
get_user_info(id,"model",old_model[id],31

    if(!
equali(new_model[id],old_model[id]))
    {
        
client_cmd(id,"drop");
        
client_print(id,print_chat,"==== Check Model !==== "
        return 
PLUGIN_HANDLED     
    
}
    
    return 
PLUGIN_HANDLED

this all !
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-17-2016 , 04:07   Re: client_infochanged model!
Reply With Quote #6

Because you haven't used array new_model, you just check if it's not equal with old_mod, but new_model[id] has no value.
siriusmd99 is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 04-17-2016 , 05:08   Re: client_infochanged model!
Reply With Quote #7

Try this:
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Block Model Change"
#define VERSION "1.0"
#define AUTHOR "Krtola"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_ClientUserInfoChanged"client_infochanged")
}
 

public 
client_infochanged(id
{  
    new 
newmodel[32],oldmodel[32
    
get_user_info(id"name"newmodel,31
    
fm_get_user_model(id,oldmodel,31)

    
get_user_info(id,"model",oldmodel[id],31

    if(!
equali(newmodel[id],oldmodel[id]))
    {
        
client_cmd(id,"drop");
        
client_print(id,print_chat,"==== Check Model !==== "
        return 
PLUGIN_HANDLED     
    
}
    
    return 
PLUGIN_HANDLED
}

stock fm_get_user_model(playermodel[], len)
{
    
engfunc(EngFunc_InfoKeyValueengfunc(EngFunc_GetInfoKeyBufferplayer), "model"modellen)

Krtola is offline
Send a message via Skype™ to Krtola
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-17-2016 , 07:06   Re: client_infochanged model!
Reply With Quote #8

Thank you so much guys !

Krtola

You Gold special Thx
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
Old 04-19-2016, 12:01
abdobiskra
This message has been deleted by abdobiskra.
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 18:33.


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