Raised This Month: $ Target: $400
 0% 

Menu and spawn stuff


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 06-10-2010 , 20:36   Menu and spawn stuff
Reply With Quote #1

So I got this menu where are 4 weapons and 1 of them is default(you spawn with it if you haven't taken another one), so I need some help with the spawn thing, so it would save the settings. I've made a menu based on the tutorial what Emp' had made. I think the spawn thing has something to do with the function, so that the WeaponName would change if the user chooses the other weapon.

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""FwdHamSpawn_Post"1);
    
    
register_clcmd("say /weapons""Weapons");
}

public 
FwdHamSpawn_Post(id)
{
    
SpawnedWeapon WeaponName // Like the function SpawnedWeapon = true / false
}

public 
Weapons(id)
{
    new 
menu menu_create("\yWeapons""menu_handler");
    
    
menu_additem(menu"M4P1""1"0); // The Default weapon
    
menu_additem(menu"AK47""2"0);
    
menu_additem(menu"AWP""3"0);
    
menu_additem(menu"Scout""4"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
menu_handler(idmenuitem)
{
    
// Other stuff here, no point on writing the whole code here :)

vL. is offline
 



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 05:23.


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