Перейти к содержимому
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.
Опубликовано:

Hey guys, just wondering if you guys know a method of splitting a string, or if It's an easier way, finding out what attachments are the primary and secondary weapon. :S I was going to use self getCurrentWeapon, but I wasn't sure if I could split the string with '_', cheytac_xmags_fmj_mp? Any help?

Featured Replies

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

strTok().

 

To get the current attachments name something similar to this should work:

 

getAttName()
{
currentWeap = self getCurrentWeapon();
weapTokens = strtok( currentWeap, "_" );
attName = weapTokens[1];

return attName;
}

 

EDIT: nvm, havent read properly. You want to get the attachments name not the primary name. :>

Edited the function above, also this might help you depending on what you want to do....

 

Depending on your mod (how you give weapons):

 

The primary and secondary attachments names are stored to the following local variables:

 

loadoutPrimaryAttachment
loadoutPrimaryAttachment2 
loadoutSecondaryAttachment
loadoutSecondaryAttachment2

 

Take a look at giveloadout() function in class.gsc.

Опубликовано:
With each and every day, I gain so much more respect for you. <3 You, Sir, are a god.

 

Thanks i guess, but everyone with very basic programming knowledge would know that ;D ...

Опубликовано:
With each and every day, I gain so much more respect for you. <3 You, Sir, are a god.

 

Thanks i guess, but everyone with very basic programming knowledge would know that ;D ...

/totally offtopic: Hey banz, could you go on #Avail on rizon, I could use a little help with something :P

Опубликовано:
  • Автор
With each and every day, I gain so much more respect for you. <3 You, Sir, are a god.

 

Thanks i guess, but everyone with very basic programming knowledge would know that ;D ...

 

Insult? O.o Nahh, I'm joking. :P But I know I'm a script-kiddie, I need to buy a book and learn some C++, the only thing I really know is self-taught C#... :/

Опубликовано:
With each and every day, I gain so much more respect for you. <3 You, Sir, are a god.

 

Thanks i guess, but everyone with very basic programming knowledge would know that ;D ...

 

Insult? O.o Nahh, I'm joking. :P But I know I'm a script-kiddie, I need to buy a book and learn some C++, the only thing I really know is self-taught C#... :/

 

It wasn't meant as an insult. I meant, "no, i don't need to be 'god' to know that basic stuff".

Опубликовано:
  • Автор
With each and every day, I gain so much more respect for you. <3 You, Sir, are a god.

 

Thanks i guess, but everyone with very basic programming knowledge would know that ;D ...

 

Insult? O.o Nahh, I'm joking. :P But I know I'm a script-kiddie, I need to buy a book and learn some C++, the only thing I really know is self-taught C#... :/

 

It wasn't meant as an insult. I meant, "no, i don't need to be 'god' to know that basic stuff".

 

I was just kidding around. :3 Take a compliment haha. :P You're like the only one that tries to help me. xD

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

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

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

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

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

Account

Navigation

Поиск

Поиск

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.