Making this code shorter
#4

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Like this?
PHP код:
//global on the top of the script:
#define PHW(%0,%1) PlayerHasWeapon(%0,%1)
//the shorter code:
if(PHW(playerid,25) || PHW(playerid,27) || PHW(playerid,29) || PHW(playerid,30) || PHW(playerid,31) || PHW(playerid,33) || PHW(playerid,34)) 
Or how to make the code totally unreadable. It bothers me to no end when I see people do that. Typing "SCM" or "SPD" because it's apparently too hard to type it out in full.

@OP: the code isn't pretty but there's only so much you can do. Any way I look at it will make it slower.
Reply


Messages In This Thread
Making this code shorter - by GoldenLion - 11.07.2016, 17:01
Re: Making this code shorter - by Mencent - 11.07.2016, 17:05
Re: Making this code shorter - by GoldenLion - 11.07.2016, 17:10
Re: Making this code shorter - by Vince - 11.07.2016, 17:11
Re: Making this code shorter - by Nero_3D - 11.07.2016, 17:11
Re: Making this code shorter - by OneDay - 11.07.2016, 17:45
Re: Making this code shorter - by Mencent - 11.07.2016, 17:58
Re: Making this code shorter - by MayaEU - 11.07.2016, 17:58
Re: Making this code shorter - by DarkSkull - 11.07.2016, 18:36
Re: Making this code shorter - by Stinged - 11.07.2016, 19:09

Forum Jump:


Users browsing this thread: 3 Guest(s)