Whats wrong with it? Rep +
#7

Quote:
Originally Posted by Threshold
Посмотреть сообщение
pawn Код:
new// No reason to define X,Y,Z twice for two seperate uses.
            Float:Z,
            Float:Y,
            Float:Z;
Nor is there any reason to create a variable if they aren't going to be used in some instances. What if the player is on the same team as the person they shot? You will not use X, Y or Z. (Also, you introduced 'z' twice) What if they are not using the weapon 23, 33 or 34? You have created useless variables. What if they weren't shot in the head? You have created useless variables.
It's still better then making two local variables.

Quote:
pawn Код:
switch(weaponid) // Switch statements are faster then if statements.
                    {
                        case 23, 33, 34:
For 3 cases, the difference is extremely insignificant.

Still more efficient then using if statements.
Also, rather it's 1 or 100 it's just as efficient .

Quote:
pawn Код:
SetPVarInt(playerid, "Headshot", 1); // Headshotted isn't a word.
                            GameTextForPlayer(playerid, "~r~Headshot", 3000, 3); // Headshotted isn't a word.
This doesn't affect any portion of his code. All that does is make sure he goes through his entire script and mucks around with every single time he uses the function 'Headshotted' to rename it.

CTRL + H - 1 second and all 'Headshooted' is changed to the correct term.
Code wise it's fine yes, However a server with bad grammar will not attract players.
Reply


Messages In This Thread
Whats wrong with it? Rep + - by MBilal - 21.01.2015, 03:36
Re: Whats wrong with it? Rep + - by Threshold - 21.01.2015, 04:11
Re: Whats wrong with it? Rep + - by MBilal - 21.01.2015, 04:19
Re: Whats wrong with it? Rep + - by Threshold - 21.01.2015, 04:32
Re: Whats wrong with it? Rep + - by Lynn - 21.01.2015, 04:51
Re: Whats wrong with it? Rep + - by Threshold - 21.01.2015, 05:35
Re: Whats wrong with it? Rep + - by Lynn - 21.01.2015, 06:00
Re: Whats wrong with it? Rep + - by Threshold - 22.01.2015, 04:47

Forum Jump:


Users browsing this thread: 1 Guest(s)