Raised This Month: $51 Target: $400
 12% 

native + player model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 11-11-2013 , 09:04   native + player model
Reply With Quote #1

Hy allied modders users i try to use player models plugin witch sets player models CT and TE, but i have a server with a random ct player santa , the player models plugin sets the model for santa too

I whant that santa to have a different model, and i have created a native
Code:
public native_get_santa ( id ) {
	return mosul [ id ] == true ? 1 : 0
}
and
Code:
	mosul [ id ] = true;
to that random santa, but this player_models sets it's own model how can i solve this ?
.SMA

i have added a check but nothing
Code:
public set_model ( id )
{
	if ( get_santa ( id ) )
		return 1;
.inc
Code:
#pragma reqlib "santa"

native get_santa ( id );
Attached Files
File Type: sma Get Plugin or Get Source (player_model_changer.sma - 213 views - 4.3 KB)
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 11-11-2013 at 09:05.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
Old 11-12-2013, 02:02
LordOfNothing
This message has been deleted by LordOfNothing.
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 11-12-2013 , 06:16   Re: native + player model
Reply With Quote #2

Quote:
Originally Posted by LordOfNothing View Post
PHP Code:
public native_get_santa idparam ) {
    return 
mosul id ,get_param(1)];

wrong the native works fine as it is, the player model plugin had to be remaked, i have done another who works just fine

Thanks for answers.
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 11-12-2013 , 07:13   Re: native + player model
Reply With Quote #3

@LordOfNothing
Stop posting useless crap.

@CryWolf
Here you go:
PHP Code:
public fw_PlayerSpawn id )
{
    if ( !
is_user_alive id ) )
        return;
    
set_task 4.0"set_model"id )

---------->
PHP Code:
public fw_PlayerSpawn id )
{
    if ( !
is_user_alive id ) )
        return;

    if ( 
get_santa id ) )
        return 
1;

    
set_task 4.0"set_model"id )

PHP Code:
public native_get_santa id ) {
    return 
mosul id ] == true 0

------>

PHP Code:
public native_get_santa (plugin,params) {
    static const 
maxplayers get_maxplayers();

    static 
client;

    
client get_param(1);

    if (
client || client maxplayers)
    {
        
log_error(AMX_ERR_NATIVE,"Invaild player %d",client);
        return 
false
    
}

    return 
mosul[client];

PHP Code:
// In santa plugin, in plugin natives forward:
register_native("get_santa","native_get_santa",0); 
PHP Code:
// In inc
native bool:get_santa(id); 
__________________

Last edited by simanovich; 11-12-2013 at 07:13.
simanovich 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 03:49.


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