SetDisabledWeapons()
#1

As this is a discussion forum, I wanted to ask, why was it removed? It really was a useful function and saved me a lot of code, now I have to create another way of preventing weapon hacks (already know what I'm going to do, but..).. So, why?
Reply
#2

Quote:
Originally Posted by Calgon
As this is a discussion forum, I wanted to ask, why was it removed? It really was a useful function and saved me a lot of code, now I have to create another way of preventing weapon hacks (already know what I'm going to do, but..).. So, why?
Use OnPlayerUpdate and create your own SetDisabledWeapons ?
Reply
#3

It should be in, I don't understand why it got removed. And answers like 'make yours'..Come on..

Why the hell would you make yours if you could type that code in 5 seconds.
Reply
#4

If it was my guess it probably caused some issues with other things or something. I don't think they would remove it if it worked fine with everything. There was probably some bug it caused when used or something. That's my guess
Reply
#5

Quote:
Originally Posted by Lavamike
If it was my guess it probably caused some issues with other things or something. I don't think they would remove it if it worked fine with everything. There was probably some bug it caused when used or something. That's my guess
I agree but it'd be good if they'd say the reason. All we know is just that it was removed - Period.
Reply
#6

Quote:
Originally Posted by XtremeChio
Quote:
Originally Posted by Lavamike
If it was my guess it probably caused some issues with other things or something. I don't think they would remove it if it worked fine with everything. There was probably some bug it caused when used or something. That's my guess
I agree but it'd be good if they'd say the reason. All we know is just that it was removed - Period.
Would be nice to know, even though I never used it
Reply
#7

Here you are.
pawn Code:
#define DISABLED_WEAPONS 35, 36, 37, 38

public OnPlayerUpdate(playerid)
{
 #if defined DISABLED_WEAPONS
 new weapon = GetPlayerWeapon(playerid);
   
 switch(weapon)
 {
  case DISABLED_WEAPONS:
  {
   GivePlayerWeapon(playerid, weapon, -GetPlayerAmmo(playerid));
   return 0;
  }
 }
 #endif
   
 return 1;
}
Reply
#8

Quote:
Originally Posted by Balon
Here you are.
pawn Code:
#define DISABLED_WEAPONS 35, 36, 37, 38

public OnPlayerUpdate(playerid)
{
 #if defined DISABLED_WEAPONS
 new weapon = GetPlayerWeapon(playerid);
   
 switch(weapon)
 {
  case DISABLED_WEAPONS:
  {
   GivePlayerWeapon(playerid, weapon, -GetPlayerAmmo(playerid));
   return 0;
  }
 }
 #endif
   
 return 1;
}
Quote:
Originally Posted by TimmehBoy
Quote:
Originally Posted by Calgon
As this is a discussion forum, I wanted to ask, why was it removed? It really was a useful function and saved me a lot of code, now I have to create another way of preventing weapon hacks (already know what I'm going to do, but..).. So, why?
Use OnPlayerUpdate and create your own SetDisabledWeapons ?
Guys, he never asked for a new solution, he was just asking if the devs/testers or whatever could say why they removed it. AND he said:

Quote:
Originally Posted by Calgon
now I have to create another way of preventing weapon hacks (already know what I'm going to do, but..)
Reply
#9

i never used this function. imo this thing was stupid, i just ban them!
Reply
#10

Quote:
Originally Posted by Doerfler
i never used this function. imo this thing was stupid, i just ban them!
Using it for the camera/goggles meant that it wasn't stupid.
Reply
#11

I don't see reason removing this function, it took just 1 line. OnPlayerUpdate it takes more lines. This doesn't makes sense.
Reply
#12

Quote:
Originally Posted by TheMaTrIx4057
This doesn't makes sense.
If it was removed then it probably does because i doubt they would remove it without a reason.
Reply
#13

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by TheMaTrIx4057
This doesn't makes sense.
If it was removed then it probably does because i doubt they would remove it without a reason.
I'm not 100% sure, but i think it was removed to use more
Code:
OnPlayerUpdate
. I may be wrong, but that is what i think.
Reply
#14

Quote:

I don't see reason removing this function, it took just 1 line. OnPlayerUpdate it takes more lines. This doesn't makes sense.

:O What a stupid thinking. It took one line in your code, but it took many more lines in the server code.
Reply
#15

Quote:
Originally Posted by TheMaTrIx4057
I'm not 100% sure, but i think it was removed to use more
Code:
OnPlayerUpdate
. I may be wrong, but that is what i think.
That doesn't make sense, everyone is trying to avoid the usage of OnPlayerUpdate because of the lag.
Reply
#16

Quote:
Originally Posted by TheMaTrIx4057
I don't see reason removing this function, it took just 1 line. OnPlayerUpdate it takes more lines. This doesn't makes sense.
Reply
#17

Everything has sense.
Reply
#18

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by TheMaTrIx4057
I'm not 100% sure, but i think it was removed to use more
Code:
OnPlayerUpdate
. I may be wrong, but that is what i think.
That doesn't make sense, everyone is trying to avoid the usage of OnPlayerUpdate because of the lag.
When they script things properly there wont be any lag using OnPlayerUpdate :S. Or atleast, players wont notice anything.
Reply
#19

Quote:
Originally Posted by TimmehBoy
When they script things properly there wont be any lag using OnPlayerUpdate :S. Or atleast, players wont notice anything.
Try and script 2k or more code properly at OnPlayerUpdate. The problem is that OnPlayerUpdate callback isn't good for big codes.
Reply
#20

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by TimmehBoy
When they script things properly there wont be any lag using OnPlayerUpdate :S. Or atleast, players wont notice anything.
Try and script 2k or more code properly at OnPlayerUpdate. The problem is that OnPlayerUpdate callback isn't good for big codes.
Who said something about 2k code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)