AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Tank problems (https://forums.alliedmods.net/showthread.php?t=126398)

DoviuX 05-09-2010 00:49

Tank problems
 
I made that just one tank was in the round start but tank doesn't spawn.


PHP Code:

public Logevent_RoundStart()
{    
        new 
iPlayers[32], iNumidiRandom[32], iRandomNum;

        
get_players(iPlayersiNum);

        for ( new 
iNum i++ )
        {
            
id iPlayers[i];

            if ( 
cs_get_user_team(id) == CS_TEAM_T )
            {
                    
iRandomiRandomNum++ ] = id;
                    
TankID iRandomrandomiRandomNum ) ];
            }
        }


PHP Code:

public fw_PlayerSpawn(Playerid)
{
    new 
Floattank_healthFloat:tank_gravity
    tank_health 
get_pcvar_float(cvar_tank_hp)
    
tank_gravity get_pcvar_float(cvar_tank_gravity) / 800

    
if(g_zombie[id] && TankID == id)
    {
            
InfectedClass[id] = 7

            copy
(player_model[id], charsmaxplayer_model[] ), ZOMBIE_MODELIS8)
            
set_pev(idpev_healthtank_health)
            
set_pev(idpev_gravitytank_gravity)

            new 
name[32];
            
get_user_name(id,name,31);
            
set_hudmessage125255125, -1.00.2906.012.0 );
            
show_hudmessage0"%s is now a Tank!!!"name);
    }




All times are GMT -4. The time now is 03:37.

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