Raised This Month: $ Target: $400
 0% 

a little help with GG


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Racoon
Senior Member
Join Date: Mar 2008
Location: Ukraine
Old 03-31-2011 , 11:31   a little help with GG
Reply With Quote #1

Hello again I've been modifying the gungame.sma. I've tried to add some fun stuff for admins. For example, during the final level players with ADMIN_LEVEL_A access need to get 5 kills with grenade, instead of 1. The problem is the granade, which doesn't refresh, when you kill somebody...
PHP Code:
show_weapons_menu(id)
{
    new 
totalWeapons weaponNumwpnsPerPage 10;
    new 
pageTotal floatround(float(totalWeapons) / float(wpnsPerPage),floatround_ceil);

    if(
page[id] < 1page[id] = 1;
    if(
page[id] > pageTotalpage[id] = pageTotal;

    new 
len formatex(menuText,511,"\y%L %L (%i/%i)\w^n",id,"GUNGAME",id,"WEAPONS",page[id],pageTotal);
    
//len += formatex(menuText[len],511-len,"\d-----------\w^n");

    
new start = (wpnsPerPage * (page[id]-1)) + 1i;

    
// are there any custom kill requirements?
    
new customKillsFloat:expectedFloat:killsperlvl get_pcvar_float(gg_kills_per_lvl);
    for(
i=0;i<weaponNum;i++)
    {
        if(
equal(weaponName[i],KNIFE) || equal(weaponName[i],HEGRENADE)) expected 1.0;
        if(
equal(weaponName[i],HEGRENADE) && (!(get_user_flags(id) & ADMIN_LEVEL_A))) expected 5.0;
        else 
expected killsperlvl;
    
        if(
weaponGoal[i] != expected)
        {
            
customKills 1;
            break;
        }
    } 
Attached Files
File Type: sma Get Plugin or Get Source (gungame_new.sma - 562 views - 282.0 KB)
Racoon is offline
Send a message via ICQ to Racoon
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:32.


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