Raised This Month: $ Target: $400
 0% 

[CS:GO] Retakes 1.5


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mitchell
~lick~
Join Date: Mar 2010
Old 11-20-2014 , 14:47   Re: [CS:GO] Retakes
Reply With Quote #4

Why use SQL to save simple spawns? WHy not keyvalues or what ever for easily adding spawn points.
"ServerCommand" can be replaced with SetConVarInt.. However i disagree with forcing these values to what the plugin wants. Why not have them edit their configs. or better yet use AutoExecConfig to execute the commands..

Also line 267-269:
PHP Code:
            if(IsValidClient(i) && !IsClientSourceTV(i))
            {
                if (
IsValidClient(i) && GetClientTeam(i) != 1)
                { 
Not sure why you need to check if the player is valid twice..

On the side note of the IsValidClient....
PHP Code:
stock bool:IsValidClient(clientbool:alive false)
{
    return 
client >= && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && (!alive || IsPlayerAlive(client));

confusing to look at, especially since you use this check in almost all the loops, and don't even use the second argument. Since you don't use the second argument any where you can remove the "alive" variable. Since you gather the client from a loop that is in the bounds of (client >= 1 && client <= MaxClients) already you can remove that. If the player is in game then of course he is already connected.. so you could remove IsClientConnected().
You're left with:
Code:
return IsClientInGame(client);
Theres some other things that could happen to ideally make the plugin a lot better on performance, etc.
Very nice idea' though.

EDIT: Try getting rid of SMLib also, so it can compile on the forum.

Last edited by Mitchell; 11-20-2014 at 14:48.
Mitchell is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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