AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Count Player Loop (https://forums.alliedmods.net/showthread.php?t=189438)

MokeN 07-07-2012 09:02

Count Player Loop
 
Hello,

I'll need some help of you guys, 3 things.

1. I need a loop, then it's only 1 Terrorist left this action should be executed:

PHP Code:

        set_hudmessage 2556464, -1.00.3500.15.00.10.1, -
        
show_hudmessage 0"[SG]: Game Over!")
       
        
strip_user_weaponsid )
       
        if (
cs_get_user_team(id) == CS_TEAM_CT)
        {
    
give_item(id"weapon_knife")
    
give_item(id"weapon_m4a1"
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammoidCSW_M4A190 )
    
cs_set_user_bpammoidCSW_DEAGLE35 )
    
set_user_noclip(id)
       
      } else if (
cs_get_user_team(id) == CS_TEAM_T)
        {
            
give_item(id"weapon_knife")
        
server_cmd"sv_gravity 800" )
        
server_cmd"sv_airaccelerate 10" )
        }
    }


2. I need a function that's preventing the HE grenade to explode & they'll just dissapear, i've used grenade think for the explode prob but it isn't working.


3. The world models aren't working, they have been before but not now :s
It's like when i throw etc. a Snowball, there's a HE in the air instead of aw snowball.

PHP Code:

public fwdSetModel(ent,const model[])
{    
    if(!
pev_valid(ent) || !equal(model,"models/w_hegrenade.mdl")) 
        return 
FMRES_IGNORED
        
    
switch(g_iCurrentGame)
    {
        case 
GAME_DGBALLengfunc(EngFunc_SetModelentg_szDodgeball_World)
        case 
GAME_ZMBOMBSengfunc(EngFunc_SetModelentg_szZombiebomb_World)
        case 
GAME_SNOWBALLengfunc(EngFunc_SetModelentg_szSnowball_World)
        case 
GAME_ANGRYBIRDSengfunc(EngFunc_SetModelentg_szAngryBirds_World)
        default: return 
FMRES_IGNORED
    
}
    
    return 
FMRES_SUPERCEDE


Thanks in advance!:)

Santaaa 07-07-2012 20:26

Re: Count Player Loop
 
Uhmm, can i ask u something what does SG stand for in ur position because SG is also my community's name: Super Gaming.

anyway

PHP Code:

new players[32], count
get_players
(playerscount"ae""TERRORIST"// OR "CT"

if (count == 1)
{
    
//action


And sorry for the world model, I have troubles with it too. So I cant help you with that. (dont wanna give people bad advice)

Veggetta 07-07-2012 21:00

Re: Count Player Loop
 
Why don't you just remove the HE ?

Santaaa 07-07-2012 21:02

Re: Count Player Loop
 
Quote:

Originally Posted by Veggetta (Post 1745710)
Why don't you just remove the HE ?

He wants to set another model on the HE grenade, so it looks like a snowball and he wants to block the explosive part of the HE grenade, if im correct.

MokeN 07-08-2012 06:30

Re: Count Player Loop
 
Quote:

Originally Posted by Santaaa (Post 1745696)
Uhmm, can i ask u something what does SG stand for in ur position because SG is also my community's name: Super Gaming.

SG stands for Scandic-Gamers

Website: www.scandic-gamers.com

Quote:

Originally Posted by Santaaa (Post 1745696)
He wants to set another model on the HE grenade, so it looks like a snowball and he wants to block the explosive part of the HE grenade, if im correct.

Yes, that's correct. But i got all working now thanks to Xellath. :)

Thanks anyway =)


All times are GMT -4. The time now is 15:08.

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