Raised This Month: $ Target: $400
 0% 

Array Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-12-2010 , 08:09   Re: Array Problem
Reply With Quote #5

dont work


here is my full code:
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>


#define PLUGIN "FutureMod"
#define VERSION "1.1"
#define AUTHOR "Mottzi"

      
new class[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /class""change_class")
    
register_clcmd("say_team /class""change_class")
    
register_event("HLTV""event_new_round""a""1=0""2=0")  

}

 public 
change_class(id)
 {
    if (!
is_user_alive(id) == 1)
    {
        new 
menu_class menu_create("\r: Choose a class!""change_class_menu");
       
        
menu_additem(menu_class"\wSonic""1"0);
        
        
menu_setprop(menu_classMPROP_EXITMEXIT_ALL);
        
        
menu_display(idmenu_class0);
    }
    else
    {
        
client_print(idprint_chat"Only dead peaple can change their class!")
    }
   

   
 }

 public 
change_class_menu(idmenu_classitem)
 {

    
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu_class);
        return 
PLUGIN_HANDLED;
    }

    
    new 
data[6], iName[64];
    new 
accesscallback;

    
menu_item_getinfo(menu_classitemaccessdata,5iName63callback);

    
    new 
key str_to_num(data);
   
    switch(
keyid)
    {
        case 
1:
        {
               
set_user_gravity(id0.5)
       class[
id] = 0
            client_print
(idprint_chat"[FM] You are a Sonic now!");
            
menu_destroy(menu_class);
       

            return 
PLUGIN_HANDLED;
        }
    }

    
menu_destroy(menu_class);
    return 
PLUGIN_HANDLED;
 }

 public 
event_new_round(id)
 
    {
        
client_print(idprint_chat"%i lool", class[id])
        new 
players[32], inum
        get_players
(playersinum)
        for(new 
0inumi++;) 
        {
        
client_print(idprint_chat"%i lool", class[id])
        if(class[
id] == )
        {
            
set_user_health(id150)
            
set_user_gravity(id0.5)
        }
        }
        return 
PLUGIN_CONTINUE

mottzi is offline
Send a message via MSN to mottzi
 



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 14:43.


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