[FilterScript] Version kick.
#38

Quote:
Originally Posted by Xeon™
View Post
@Dignty fewer lines = Fast executing
wtf ? No it's not..


Quote:
Originally Posted by Xeon™
View Post
3-
PHP Code:
new versioncheck
This variable will take only two cases, false or true, so you have to use bool: tag like this.

PHP Code:
new bool:versioncheck
though its good for readability please note that pawn has only one data type...bool is just a tag it's not gonna make any change to performance..
Quote:
Originally Posted by Xeon™
View Post
I can do it on fewer lines like that:
PHP Code:
 CMD:togversion(playerid)
 {
     if(!
IsPlayerAdmin(playerid)) return 1;
     if(
versioncheck == falseversioncheck trueSendClientMessage(playerid,-1,".: VERSION ON :.");
     else 
versioncheck falseSendClientMessage(playerid,-1,".: VERSION OFF :.");
     return 
1;
 } 
I can short it furthermore...
PHP Code:
CMD:togversion(playerid)
 {
     if(!
IsPlayerAdmin(playerid)) return 1;
     
versioncheck = !versioncheck;
     return 
SendClientMessage(playerid,-1,versioncheck ? (".: VERSION ON :.") : (".: VERSION OFF :."));

But not gonna add any performance boost..

though @op it doesn't fit for a release and is terribly coded...1 star keep trying...
Reply


Messages In This Thread
Version kick. - by RogueDrifter - 09.12.2017, 17:35
Re: Version kick. - by Xeon™ - 09.12.2017, 18:00
Re: Version kick. - by IllidanS4 - 09.12.2017, 18:01
Re: Version kick. - by RogueDrifter - 09.12.2017, 18:07
Re: Version kick. - by SonnyGamer - 09.12.2017, 18:25
Re: Version kick. - by RogueDrifter - 09.12.2017, 18:27
Re: Version kick. - by Xeon™ - 09.12.2017, 18:34
Re: Version kick. - by RogueDrifter - 09.12.2017, 18:45
Re: Version kick. - by SonnyGamer - 09.12.2017, 18:56
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:00
Re: Version kick. - by Xeon™ - 09.12.2017, 19:04
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:08
Re: Version kick. - by Xeon™ - 09.12.2017, 19:10
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:13
Re: Version kick. - by Xeon™ - 09.12.2017, 19:16
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:18
Re: Version kick. - by Lucky13 - 09.12.2017, 19:21
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:23
Re: Version kick. - by Lucky13 - 09.12.2017, 19:27
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:30
Re: Version kick. - by rfr - 09.12.2017, 19:33
Re: Version kick. - by rfr - 09.12.2017, 19:36
Re: Version kick. - by RogueDrifter - 09.12.2017, 19:43
Re: Version kick. - by rfr - 09.12.2017, 20:17
Re: Version kick. - by RogueDrifter - 09.12.2017, 20:50
Re: Version kick. - by R4nd4ll - 09.12.2017, 23:50
Re: Version kick. - by Killa[DGZ] - 10.12.2017, 00:44
Re: Version kick. - by Dignity - 10.12.2017, 00:46
Re: Version kick. - by SquirrelLSRP - 10.12.2017, 00:55
Re: Version kick. - by RogueDrifter - 10.12.2017, 01:30
Re: Version kick. - by Abagail - 10.12.2017, 03:39
Re: Version kick. - by Infinity - 10.12.2017, 07:44
Re: Version kick. - by RogueDrifter - 10.12.2017, 09:49
Re: Version kick. - by Xeon™ - 10.12.2017, 11:24
Re: Version kick. - by Wisam - 10.12.2017, 12:16
Re: Version kick. - by rfr - 10.12.2017, 12:32
Re: Version kick. - by RogueDrifter - 10.12.2017, 12:39
Re: Version kick. - by GhostHacker9 - 10.12.2017, 12:45
Re: Version kick. - by RogueDrifter - 10.12.2017, 12:55
Re: Version kick. - by Infinity - 10.12.2017, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)