Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

(SOLVED) [Mod] Switching Weapon doesn't work

Featured Replies

Опубликовано:

Hey guys.

I don't know why, but this code doesn't work (red):

self takeAllWeapons();
self giveWeapon( "deserteagle_tactical_mp", 0, true );
self setWeaponAmmoClip( "deserteagle_tactical_mp", 0 );
self setWeaponAmmoStock ( "deserteagle_tactical_mp", 0 );
self switchToWeapon("deserteagle_mp");    //This one

I've the weapon, without ammo, but it doesn't switch to the weapon. Why? :/

 

I've put it in the onPlayerSpawned() thread.

 

- SerPo

Опубликовано:

You are trying to switch to a weapon you don't have at all. :mrgreen:

Should work like this:

self switchToWeapon(""deserteagle_tactical_mp");

Опубликовано:
  • Автор
You are trying to switch to a weapon you don't have at all. :mrgreen:

Should work like this:

self switchToWeapon("deserteagle_tactical_mp");

Didn't notice that :3

Tried it, still not working...

Опубликовано:
  • Автор
Do you have the weapon? And try making it it's own thread.

I get the weapon if I press the switch button.

So it's there, but not in the player's hands.

onPlayerSpawned()
{
  self endon("disconnect");

  for(;
  {
     self waittill("spawned_player");
     self thread modWeapon();
  }
}

modWeapon()
{
  self takeAllWeapons();
  self giveWeapon( "deserteagle_tactical_mp", 0, true );
  self setWeaponAmmoClip( "deserteagle_tactical_mp", 0 );
  self setWeaponAmmoStock ( "deserteagle_tactical_mp", 0 );
  self switchToWeapon("deserteagle_tactical_mp");
}

Опубликовано:

Try this

modWeapon()
{
    self takeAllWeapons();
    self giveWeapon( "deserteagle_tactical_mp", 0, true );
    self setWeaponAmmoClip( "deserteagle_tactical_mp", 0 );
    self setWeaponAmmoStock ( "deserteagle_tactical_mp", 0 );
    wait 0.1;
    self switchToWeapon("deserteagle_tactical_mp");
}

Гость
Эта тема закрыта для публикации сообщений.

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.