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], iNum, id, iRandom[32], iRandomNum;
get_players(iPlayers, iNum);
for ( new i = 0 ; i < iNum ; i++ ) { id = iPlayers[i];
if ( cs_get_user_team(id) == CS_TEAM_T ) { iRandom[ iRandomNum++ ] = id; TankID = iRandom[ random( iRandomNum ) ]; } } }
PHP Code:
public fw_PlayerSpawn(Player, id) { new Float: tank_health, Float: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], charsmax( player_model[] ), ZOMBIE_MODELIS8) set_pev(id, pev_health, tank_health) set_pev(id, pev_gravity, tank_gravity)
new name[32]; get_user_name(id,name,31); set_hudmessage( 125, 255, 125, -1.0, 0.29, 0, 6.0, 12.0 ); show_hudmessage( 0, "%s is now a Tank!!!", name); } }
|