Raised This Month: $ Target: $400
 0% 

Classes Menu and set_user_"*"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-16-2009 , 04:30   Classes Menu and set_user_"*"
Reply With Quote #1

PHP Code:
public ShowMenu(id
{
    new 
menu menu_create("Classes Menu" "Class_Handle");
    
menu_additem(menu ,"Hunter""1" 0); 
    
menu_additem(menu ,"Smoker""2" 0); 
    
menu_additem(menu ,"Boomer""3" 0); 
    
menu_additem(menu ,"Tank""4" 0);
    
menu_setprop(menu MPROP_EXIT MEXIT_ALL);
    
menu_display(id menu 0); 
    return 
PLUGIN_CONTINUE

public 
Class_Handle(id menu item

    if(
item == MENU_EXIT
    { 
        
menu_destroy(menu); 
    } 
    new 
szCommand[6] , szName[64]; new access callback
    
menu_item_getinfo(menu item access szCommand szName 63 callback); 
    new 
str_to_num(szCommand
    if(
PlayerClass[id] != i
    { 
        
PlayerClass[id] = i client_print(id,print_chat,"You are now a %s",CLASSES[i]) 
    }
    else 
    { 
        
client_print(id,print_chat,"You are alredy a %s",CLASSES[i]) 
    } 
    
menu_destroy(menu); 
    return 
PLUGIN_CONTINUE 
}  
public 
bacon_spawn(id)

 if (!
is_user_alive(id))
  return
 
 static 
CsTeamsteam team cs_get_user_team(id)
 
 if (
team == CS_TEAM_T)
 {
if (
PlayerClass[id] == CLASS_SMOKER)
{
set_user_health(id900);
set_user_maxspeed(id240);
}  
if (
PlayerClass[id] == CLASS_HUNTER)
{
set_user_health(id700);
set_user_maxspeed(id250)
}  
if (
PlayerClass[id] == CLASS_BOOMER)
{
set_user_health(id500);
set_user_maxspeed(id260);

 
if (
PlayerClass[id] == CLASS_TANK)
{
set_user_health(id2000);
set_user_maxspeed(id220);

What i doing bad with this ? I want to make a some classes for T's (Zombies)
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
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 01:25.


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