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

CS 1.6 plugin MENU


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
beda
New Member
Join Date: Mar 2012
Old 03-11-2012 , 07:45   CS 1.6 plugin MENU
Reply With Quote #1

Hi , I From Czech republic in Europe , and i need help , i find on google one thread with this code:

Quote:
// ############################################# ######################################
// ** * * * * * * * * * * * * * * * * * * * * * ** *
// * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * *
// * * * ******** * * * * * * * * * *
// * ** * * * * * * * * * * **
// * * * * * * * * * * * * * * * * * * * * * * * * *
// ############################################# ######################################
#include <amxmodx>

#define VERSION "1.0"

new menu

public plugin_init() {
register_plugin("Simple Menu", VERSION, "NapoleoN#") // Only using a define for Version to optimize the code!
register_clcmd("say /menu", "Cmd_Menu") // Register our function + command
}

public Cmd_Menu(id) { // Make our public function
if(is_user_alive(id)) { // Check if our user is alive
menu = menu_create("Menu Title", "menu_handler") // Create our menu

menu_additem(menu, "Hello!", "1") // Add an item to our menu
menu_additem(menu, "Goodbye!", "2") // Add an item to our menu

menu_display(id, menu) // Display our menu
}
else { // If the user is not online, then use else. "if(!is_user_alive(id))" would work aswell.
return PLUGIN_HANDLED // Do nothing with our plugin.
}
return PLUGIN_HANDLED // End our function
}

public menu_handler(id, menu, item) { // Make our public function for the menu_handler
if(item == MENU_EXIT) { // If the option the player took is Exit, then
menu_destroy(menu) // Destroy our menu
return PLUGIN_HANDLED
}

if(is_user_alive(id)) { // Check if our user is still alive, he might die while looking at the menu.
new szName[32]; get_user_name(id, szName, sizeof(szName) - 1) // Retrieve the name from the user
switch(item) {
case 0: client_print(0, print_chat, "Goodbye! Have a nice day further %s!", szName) // Print our message to everyone!
case 1: client_print(0, print_chat, "Goodbye! Have a nice day further %s!", szName) // Print our message to everyone!
}
}
else { // If the user is not online, then use else. "if(!is_user_alive(id))" would work aswell.
client_print(id, print_chat, "You're not alive!")
}
return PLUGIN_HANDLED
}
I need to make when someone clicks on button 2 so it write "hi my name is African," as if he wrote it himself .......I need uprage this line :case 1: client_print(0, print_chat, "Goodbye! Have a nice day further %s!", szName) //"

example : *Dead* Efko : hi my name is African


Thank you !!!!

Last edited by beda; 03-11-2012 at 08:00.
beda 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 01:44.


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