09.12.2017, 18:34
Ok here we go, I've reviewed your code.
1- Indentation is killed.
2- You forget #define FILTERSCRIPT
3-
This variable will take only two cases, false or true, so you have to use bool: tag like this.
4- You are declaring 3 arrays for 3 strings you could optimize that by using only 2.
5-
waste of lines you could use
instead
6-
Delayed message 
waste of lines and CPU usage, you could send directly the messages (your messages won't appear to the player because the second one will be called after delayed kick finish and that's not cool.
7 -
You are wrong mate, these are a valid values. VW 999 exists same for others.
8-
I can do it on fewer lines like that:
spaghetti code...
thanks for your shit long code mate!
P.S: we need quality/rapidity, not the longer
1- Indentation is killed.
2- You forget #define FILTERSCRIPT
3-
PHP Code:
new versioncheck;
PHP Code:
new bool:versioncheck;
5-
PHP Code:
if(strcmp(versionstring, "0.3.7-R2"))//checking if that string has the wanted version.
{
}
PHP Code:
if(!strcmp(versionstring, "0.3.7-R2"))
6-
PHP Code:
format(messagestring, sizeof(messagestring), " Server Has Kicked %s, Reason : OLD CLIENT VERSION %s ", playername,versionstring);
SendClientMessageToAll(-1,messagestring);
SetTimerEx("DelayedKick",1000, false, "i", playerid);//delaying both the kick and the message to make sure the player gets the messages on time.
SetTimerEx("DelayedMessages",500,false,"i",playerid);//thats the delayed message

waste of lines and CPU usage, you could send directly the messages (your messages won't appear to the player because the second one will be called after delayed kick finish and that's not cool.
7 -
PHP Code:
SetPlayerWeather(playerid, 999);//blinding the player on his disconnect to make sure he's totally out.
SetPlayerVirtualWorld(playerid, 999);//same as above
SetPlayerInterior(playerid,999);//same as above
8-
PHP Code:
CMD:togversion(playerid,params[])
{
if (IsPlayerAdmin(playerid))//change this to your admin system
{
if(versioncheck ==0)//if the version is ON
{
versioncheck =1;
SendClientMessage(playerid,-1,".: VERSION OFF :.");
}
else if(versioncheck ==1)//if the version is OFF
{
versioncheck =0;
SendClientMessage(playerid,-1,".: VERSION ON :.");
}
}
return 1;
}
PHP Code:
CMD:togversion(playerid)
{
if(!IsPlayerAdmin(playerid)) return 1;
if(versioncheck == false) versioncheck = true, SendClientMessage(playerid,-1,".: VERSION ON :.");
else versioncheck = false, SendClientMessage(playerid,-1,".: VERSION OFF :.");
return 1;
}
thanks for your shit long code mate!
P.S: we need quality/rapidity, not the longer
