AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   native + player model (https://forums.alliedmods.net/showthread.php?t=229633)

CryWolf 11-11-2013 09:04

native + player model
 
1 Attachment(s)
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 );


CryWolf 11-12-2013 06:16

Re: native + player model
 
Quote:

Originally Posted by LordOfNothing (Post 2059883)
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.

simanovich 11-12-2013 07:13

Re: native + player model
 
@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); 



All times are GMT -4. The time now is 23:18.

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