SetDisableWeapon
#1

SetDisabledWeapons there isn't now.

With this function I could unsync this 3 weapons: SetDisabledWeapons(43,44,45);

There are here: https://sampwiki.blast.hk/wiki/SetDisabledWeapons
To re-sync certain weapons, you can just call SetDisabledWeapons again[CIT]

But now...



What can i do for this OLD bug now?

Reply
#2


EDIT: Sorry SoeH, my English is not very good.
Reply
#3

Quote:
Originally Posted by erorcun
SetDisabledWeapon is removed in 0.3

You should use SetPlayerArmedWeapon in OnPlayerUpdate.

EDIT: Sorry SoeH, my English is not very good.
Olso my English.
Now you have understand my problem?
Reply
#4

Quote:
Originally Posted by SoeH
Olso my English.
Now you have understand my problem?
Yes.
Reply
#5

SetPlayerArmedWeapon will work. However, hackers might get around that one day. Try this as well - hackers won't be able to break this. I don't recommend it for normal use though - it can be exploited if you know how.
Код:
public OnPlayerUpdate(playerid) {
	switch (GetPlayerWeapon(playerid)) {
		case 43,44,45: {
			new keys, updown, leftright;
			GetPlayerKeys(playerid, keys, updown, leftright);
			if (keys & KEY_FIRE) return 0;
		}
	}
	return 1;
}
Reply
#6

With this i can have night vision and thermal sights without the others to see??

I think not....
Reply
#7

Quote:
Originally Posted by Seif_
Wouldn't desyncing the player while he wears the goggles(sync him back once he's wearing them) prevent others from having the effect?
Reply
#8

Or you could try

pawn Код:
public OnPlayerUpdate(playerid)
{
  switch (GetPlayerWeapon(playerid))
  {
    Case 43,44,45:
    {
      SetPlayerArmedWeapon(playerid, 0);
    }
  }
  return 1;
}
Reply
#9

Quote:
Originally Posted by Gappy
Or you could try

pawn Код:
public OnPlayerUpdate(playerid)
{
  switch (GetPlayerWeapon(playerid))
  {
    Case 43,44,45:
    {
      SetPlayerArmedWeapon(playerid, 0);
    }
  }
  return 1;
}

I WANT A NORMAL NIGHT VISION AND THERMAL SIGHTS, I WANT USE THIS WEAPON.
Reply
#10

Using night vision goggles without the effects being given to all online players is I assume what you are trying to do, Disabling the weapons used to fix this, but there is no longer a simple way of doing it.

Is that what your getting at?
Reply
#11

Removing SetDisabledWeapons was probably the stupidest decision ever made in SA:MP development.

It worked, and it was useful to a majority of server owners.

Now we have to disable goggles all together, or desync a player when they are holding them, which is just ridiculous.
Reply
#12

Quote:
Originally Posted by Redgie
Using night vision goggles without the effects being given to all online players is I assume what you are trying to do, Disabling the weapons used to fix this, but there is no longer a simple way of doing it.

Is that what your getting at?
Yes, and it's a shame. I want understand why. And I want understand also why this: http://forum.sa-mp.com/index.php?topic=127641.0

For me it's a shame that these functions are removed no reason, and I am sure there is not a reason.
If Kye bother to change the color of the server's message to me is fine, but should not raise functions they serve.

Finally, there isn't a solution therefore? Ok tanks to all.

- SoeH
Reply
#13

Other than disabling the effects of those weapons, what other use did SetDisabledWeapons have? I think it was a silly function that didn't really make sense. I am happy SetDisabledWeapons is gone. SetPlayerArmedWeapon in OnPlayerUpdate is much better.
Reply
#14

Quote:
Originally Posted by BeckzyBoi
Other than disabling the effects of those weapons, what other use did SetDisabledWeapons have? I think it was a silly function that didn't really make sense. I am happy SetDisabledWeapons is gone. SetPlayerArmedWeapon in OnPlayerUpdate is much better.
1) If you are happy, i'm happy for you.
2) OnPlayerUpdate is a LAG solution.
3) Also I think that is a stupid function but I think that it's UNIQUE metod for resolve this OLD BUG.

But if you have solution, and you can solve my problem with SetPlayerArmedWeapon, ok, you write in this post please.



@Seif: Also I thought that in 0.3 it was solved.
Reply
#15

Cameras are already fixed. I think the goggles might be in 0.3b. But other than fixing the problems with goggles SetDisabledWeapons served no purpose. I am happy it is gone, and that doesn't mean I don't want the goggles to work because if they did it would be awesome.
Reply
#16

Camera? Ok man, let's go all to photograph samp1!11! ...-.-

What are you doing with the camera? Nice, but it's the most useless weapon in GTA.

I think that if there is a solution, AND THERE IS, kye must work for fix.




Reply
#17

I have an amazing idea......

Make a timer that checks the players weapons every second or two.

Then, simply ban the id that has the weapon id that is impossible to get from ammu or a command (a gun that you have to use hacks to get)


woooww..........

amazing..........
Reply
#18

pawn Код:
#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;
}
It worked in the same way before, when it was a native function. The only difference is that this desync player who uses disabled weapons when the native one desynced only the weapon.
Reply
#19

Quote:
Originally Posted by [INF
Interceptor ]
I have an amazing idea......

Make a timer that checks the players weapons every second or two.

Then, simply ban the id that has the weapon id that is impossible to get from ammu or a command (a gun that you have to use hacks to get)


woooww..........

amazing..........
People are just stupid. We WANT to use goggles, but we just don't want effect to be shown to everyone.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)