SetDisabledWeapons() -
Calgon - 05.09.2009
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?
Re: SetDisabledWeapons() -
[eLg]Timmy - 05.09.2009
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 ?
Re: SetDisabledWeapons() -
XtremeChio - 05.09.2009
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.
Re: SetDisabledWeapons() -
lavamike - 05.09.2009
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
Re: SetDisabledWeapons() -
XtremeChio - 05.09.2009
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.
Re: SetDisabledWeapons() -
lavamike - 05.09.2009
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
Re: SetDisabledWeapons() -
Balon - 05.09.2009
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;
}
Re: SetDisabledWeapons() -
lavamike - 05.09.2009
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..)
|
Re: SetDisabledWeapons() -
d0 - 05.09.2009
i never used this function. imo this thing was stupid, i just ban them!
Re: SetDisabledWeapons() -
Westie - 05.09.2009
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.
Re: SetDisabledWeapons() -
MaTrIx4057 - 05.09.2009
I don't see reason removing this function, it took just
1 line. OnPlayerUpdate it takes more lines. This doesn't makes sense.
Re: SetDisabledWeapons() -
Correlli - 05.09.2009
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.
Re: SetDisabledWeapons() -
MaTrIx4057 - 05.09.2009
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
. I may be wrong, but that is what i think.
Re: SetDisabledWeapons() -
Balon - 05.09.2009
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.
Re: SetDisabledWeapons() -
Correlli - 05.09.2009
Quote:
Originally Posted by TheMaTrIx4057
I'm not 100% sure, but i think it was removed to use more . 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.
Re: SetDisabledWeapons() -
MaTrIx4057 - 05.09.2009
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.
|
Re: SetDisabledWeapons() -
Correlli - 05.09.2009
Everything has sense.
Re: SetDisabledWeapons() -
[eLg]Timmy - 05.09.2009
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 . 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.
Re: SetDisabledWeapons() -
Correlli - 05.09.2009
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.
Re: SetDisabledWeapons() -
[eLg]Timmy - 05.09.2009
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.