Raised This Month: $ Target: $400
 0% 

Health and armor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Weezer
BANNED
Join Date: Oct 2010
Old 01-15-2011 , 16:57   Health and armor
Reply With Quote #1

Why wont this work?
PHP Code:
include  #include  #include   #define PLUGIN    "Random" #define AUTHOR    "Glorian #define VERSION    "1.0"  public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)          register_clcmd("say /execute", "execute"); }  public Execute(id) {     new menu = menu_create ("\rExecute-Gaming.se:", "menu_handler");          menu_additem(menu, "\r 150 Health", "1", 0);     menu_additem(menu, "\r 150 Armor", "2", 0);          menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);          menu_display(id, menu, 0);      }  public health(id){     if(is_user_connected(id) && is_user_alive(id)){         if(get_user_health(id)){             set_user_health(id, 0);         }     } }  public armor(id){     if(is_user_connected(id) && is_user_alive(id)){         if(get_user_armor(id)){             set_user_armor(id, 0);         }     } }   public menu_handler(id, menu, item) {          if( item == MENU_EXIT )     {         menu_destroy(menu);         return PLUGIN_HANDLED;     }          new data[6], iName[64];     new access, callback;          menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);          new key = str_to_num(data);          switch(key)     {         case 1:         {             client_print(id, print_center, "[Execute-Gaming] You Got 150 Health!);             menu_destroy(menu);             return PLUGIN_HANDLED;         }         case 2:         {             client_print(id, print_center. "[Execute-Gaming] You Got 150 Armor!);         }     }          menu_destroy(menu);     return PLUGIN_HANDLED; } 
Weezer 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 04:11.


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