AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Kill Self. Remove other things. (https://forums.alliedmods.net/showthread.php?t=131907)

shuttle_wave 07-10-2010 05:29

Kill Self. Remove other things.
 
PHP Code:

    else if(iVictim == iKiller)
    {
        new 
iPlayers[MAX_PLAYERS], iNum;
        
get_players(iPlayersiNum"a");
        
        for(new 
i<= iNumi++)
        {
            if(
g_bLRInProgress[i])
            {
                
g_bBeacon[i] = false;
                
g_bLRInProgress[i] = false;
                if(
is_user_alive(i))
                {
                    
strip_user_weapons(i);
                    
set_user_health(i100);
                    if(
cs_get_user_team(i) == CS_TEAM_CT)
                    {
                        
give_item(i"weapon_knife");
                        
give_item(i"weapon_m4a1");
                        
cs_set_user_bpammo(iCSW_M4A190);
                        
give_item(i"weapon_usp");
                        
cs_set_user_bpammo(iCSW_USP120);
                        
give_item(i"weapon_hegrenade");
                        
give_item(i,"item_assaultsuit");
                    }
                    
                    else if(
cs_get_user_team(i) == CS_TEAM_T)
                    {
                        
give_item(i"weapon_knife");
                    }
                }
            }
        }
        
g_bLRCountDownProgress false;
        
remove_task(TASK_COUNTDOWN);
        
remove_task(TASK_BOMB);
        
remove_task(TASK_HIDDEN);
        
remove_task(TASK_CRAZY);
        
Game LR_NONE;
    } 

that bit of my code doesnt seem to work.

Hunter-Digital 07-10-2010 08:22

Re: Kill Self. Remove other things.
 
What exacly does not work ? Write some debug messages and see where the code stops... and check that part.

shuttle_wave 07-10-2010 09:16

Re: Kill Self. Remove other things.
 
that is code is suppose to do this. when someone is in lastrequest g_bLrInProgress and they kill them self it should switch the g_bLrInProgress[index] = false and remove the beacon g_bBeacon[index] = false and remove all task and give the alive players back there weapons

shuttle_wave 07-10-2010 09:17

Re: Kill Self. Remove other things.
 
but it doesnt work

shuttle_wave 07-11-2010 01:40

Re: Kill Self. Remove other things.
 
PROBLEM SOLVED


All times are GMT -4. The time now is 07:06.

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