Raised This Month: $ Target: $400
 0% 

Array Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-12-2010 , 08:37   Re: Array Problem
Reply With Quote #1

my guess would be that you have error logs in event round start because the player in not alive or something, check the logs and enable debug.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-12-2010 , 08:40   Re: Array Problem
Reply With Quote #2

Quote:
Originally Posted by drekes View Post
my guess would be that you have error logs in event round start because the player in not alive or something, check the logs and enable debug.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#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")
    
    
RegisterHamHam_Spawn "player" "fw_HamSpawn_Post" );
}

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

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 iName63callback);
    
    new 
key str_to_num(data);
         
    switch( 
key )
    {
        case 
1:
        {
            
set_user_gravity(id0.5)
            class[
id] = //or key will work
            
client_printid print_chat "[FM] You are a Sonic now!" );
        }
    }
    
    
menu_destroy(menu_class);
    
    return 
PLUGIN_HANDLED;
}

public 
fw_HamSpawn_PostiPlayer )
{
    if( ( class[ 
iPlayer ] == ) && is_user_aliveiPlayer ) )
    {
        
set_user_healthiPlayer 150 );
        
set_user_gravityiPlayer 0.5 );
        
        
client_printiPlayer print_chat "%i lool" , class[ iPlayer ] )
    }

__________________

Last edited by Bugsy; 06-12-2010 at 08:51.
Bugsy 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 14:43.


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