Raised This Month: $ Target: $400
 0% 

Need Some Codes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 10-24-2009 , 16:59   Re: Need Some Codes
Reply With Quote #5

PHP Code:
// Last terrorist Check
new players[32], pnum;
get_players(playerspnum,"ae""TERRORIST");

if(
pnum == 1)
{
    
// 1 terrorist alive
}

// If you want it automaticly
register_event("DeathMsg",         "DeathMsg""a"); // add to plugins init

public DeathMsg()
{
    new 
Victim read_data(2)
    if(
get_user_team(Victim) == 1)
    {
        new 
players[32], pnum;
        
get_players(playerspnum,"ae""TERRORIST");

        if(
pnum == 1)
        {
            
// 1 terrorist alive
        
}
    }
}
    
// add only cts in your menu
new players[32], pnumplayerszplayer[10];
get_players(playerspnum);
    
name[32]
    
for( new 
ii<pnumi++ )
{
        
player players[i]
        
get_user_name(player,name,31)
        
num_to_str(playerszplayer9);
        
menu_additem(menunameszplayer0);
}

// to handle it
new data[6], iName[64];
new 
accesscallback;
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
new 
player str_to_num(data); 
__________________
I am out of order!

Last edited by grimvh2; 10-24-2009 at 17:05.
grimvh2 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 17:38.


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