View Single Post
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 09-08-2010 , 14:24   Re: [L4D2] Bot Grenade Transfer
Reply With Quote #8

After looking over it, some suggestions:


PHP Code:
public PlaySound(client, const String:s_Sound[32]) 
Theres no reason for this to be public

You might want to add a trigger delay/timer to your OnClientRunCmd because if everyone pressed USE at once and kept it pressed im fairly certain the server would feel a spike

PHP Code:
    decl i_UserIDi_Victimi_Attacker
decl is not needed or useful for single Cell (=int) types

PHP Code:
                if (GetConVarInt(c_SoundsOn)) {PlaySound(i_VictimSOUND_LITTLEREWARD);}
                if (
GetConVarInt(c_SoundsOn)) {PlaySound(i_AttackerSOUND_BIGREWARD);} 
Why not just use one if


Consider using CheatClientCommand and the likes of "give pipe_bomb" instead, to fix equip issues

PHP Code:
ClientCommand(i_Attacker,g_Vocalize[i]); 
I dont think Clientcommand vocalizing works. Does it?



PHP Code:
    for (new client 1client MaxClientsclient++) {

        
// Client in game, team survivor, is alive, with no grenade
        
if (IsClientInGame(client) && GetClientTeam(client) == && GetClientHealth(client) > && GetPlayerWeaponSlot(client2) == -1) {
            
decl Float:f_TargetPos[3]; // = grenade (auto grab)
            
decl Float:f_ClientPos[3]; // = bot
            
decl Float:f_PlayerPos[3]; // = human player
            
decl String:s_EdictClassName[32];
            
decl String:s_Temp[32]; 
Put the local variables infront of the loop
AtomicStryker is offline