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

[Req] set Player model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 03-22-2015 , 08:12   [Req] set Player model
Reply With Quote #1

Hey , i built this menu ,
PHP Code:
#include <amxmodx>  
#include <fun>  
#include <cstrike> 

public plugin_init() 
 { 
     
register_clcmd"say /class","Classmenu" );  
 }  
 public 
Classmenuid 
 { 
     
    new 
menu menu_create"Class menu""menu_handler" ); 
     
    
menu_additemmenu"\\w Sasuke"""); 
    
menu_additemmenu"\\w Naruto"""); 
    
menu_additemmenu"\\y Neji"""ADMIN_ADMIN ); 
    

    
menu_setpropmenuMPROP_EXITMEXIT_ALL );      
    
menu_displayidmenu); 
      
 } 

 public 
menu_handleridmenuitem 
 { 

    switch( 
item 
    { 
        case 
0
        { 
            
client_printidprint_chat"You Are now Sasuke xD" ); 
            
set_user_maxspeedid get_user_maxspeedid ) + 700.0 ); 
            
set_user_health(idget_user_healthid ) + 300); 
            
give_item(id"weapon_hegrenade")
            
give_item(id"Weapon_smokegrenade")
            
cs_set_user_bpammo(idCSW_HEGRENADE10)
            
cs_set_user_bpammo(idCSW_SMOKEGRENADE10)  

            
menu_destroymenu ); 
            return 
PLUGIN_HANDLED
        } 
        case 
1
        { 
            
client_printidprint_chat" You are now Naruto" ); 
            
set_user_maxspeedid get_user_maxspeedid ) + 500.0 ); 
            
set_user_health(idget_user_healthid ) + 350); 
        } 
        case 
2
        { 
            
client_printidprint_chat"You have selected Neji" ); 
        } 
        case 
MENU_EXIT
        { 
            
client_printidprint_chat"You exited the menu... " ); 
        } 
    } 

     
    
menu_destroymenu ); 
    return 
PLUGIN_HANDLED
 } 
I Want to display it , once the player is connected , and allow to open it one time in round ? i was told that i should use some natives Like
PHP Code:
 client_putinserver id 
, but i dont know how to , but also i need the code to change the player model to models/player/x when He choose 1 for exemple.. can any one help pls ? Ty

Last edited by Zaidbt; 03-22-2015 at 09:21.
Zaidbt is offline
GhostMan
Senior Member
Join Date: Jun 2012
Old 03-22-2015 , 15:55   Re: [Req] set Player model
Reply With Quote #2

Here is example how to call your menu 10 sec after player connects to server.

PHP Code:
#define TASK_CALL 6312

public client_putinserver(id)
{
    
set_task(10.0"call_menu"id+TASK_CALL)
}

public 
call_menu(id)
{
    new 
pid id TASK_CALL
    
    
if(is_user_alive(pid)
        
Classmenu(pid)

__________________
Hi.
GhostMan is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 03-22-2015 , 19:44   Re: [Req] set Player model
Reply With Quote #3

Ty Bro
Zaidbt is offline
Reply


Thread Tools
Display Modes

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 11:53.


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