Quote:
Originally Posted by lay295
From taking a quick look your IsValidClient seems to be messed up. I have no idea what he's talking about saying it's not clean though and "really bad" it seems fine besides a few small things.
Code:
stock bool IsValidClient(client)
{
if (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && IsFakeClient(client) && IsClientSourceTV(client))return true;
return false;
}
Wouldn't this only return true if you're a bot and a sourcetv client? O.o
Also your first check
Code:
if(args < 0 || !BetAmmont || IsValidClient(client))
Wouldn't args never be less than 0? Maybe you meant args <=0 or args < 1. No real point in checking if they have -1 args.
I'm also not sure what the purpose of !BetAmmont would be, as in your code that could never resolve to true. Since StringToInt would just return 0 on failure anyways. Thus (!BetAmmount) == false all the time.
NOTE: I haven't actually tested the plugin, just making some observations.
|
i forget to add ! in the start in the isvalidclient i will fix now, and the arg check is working fine i do the same all the time, also the !BetAmmont checks if it is a number again using it in other plugins working great, fixed the plugin i uploaded the updated version.
__________________
◆ Developer - C++,C#,Python,VB.NET,Java,SQF,AS 3.0,AS 2.0,SP,Pawn,LUA
◆
Steam Link