Перейти к содержимому
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]Some GSC functions aren't working in my mod.

Featured Replies

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

Hello,

I started yesterday playing with GSC modding, made my first iSnipe-like mod, but I found some big problems.

Some functions don't work!

I tried

self maps\mp\perks\_perks::givePerk("throwingknife_mp");
self setWeaponAmmoClip("throwingknife_mp", 1);

to give the player a TK, and it didn't work.

Then I tried

self giveWeapon("throwingknife_mp"); //Also tried with ("throwingknife_mp", 0, false)
self GiveMaxAmmo("throwingknife_mp");

but neither this worked.

Another issue i found is that

self thread maps\mp\gametypes\_hud_message::hintMessage("LaXiS");

doesn't work, and I can't find why! (BTW if I use iPrintLn or iPrintLnBold they work)

 

I always put my GSC files in m2demo\scripts, I don't get any error and the modification works, but not the functions I just mentioned above. And I try them in a private match.

 

Who can help me? Thanks :cry:

Опубликовано:
  • Автор
I just tried now with the hintMessage() and it works fine for me. I use this method: viewtopic.php?f=17&t=2330 with the folder raw/scripts.

Yes, but it's the same since that new revisions like r94 doesn't use raw (but if the folder exists it searches in it) but m2demo.

 

--- EDIT ---

Hey! Say what?!

I put the gsc script in raw\scripts and added "thread" to givePerk() (I forgot it's simply a thread from another script, and it must be treated as a thread):

self thread maps\mp\perks\_perks::givePerk("throwingknife_mp");
self setWeaponAmmoClip("throwingknife_mp", 1);

Now work both the TK and the hintMessage!

Thanks!

Опубликовано:
Yes, but it's the same since that new revisions like r94 doesn't use raw (but if the folder exists it searches in it) but m2demo.

Ummmm no... it uses the FS_ReadFile commands to load all of the custom assets which searches in m2demo, raw, main, and all of the iwd files (which is why you can overwrite things already in the game)

Опубликовано:
  • Автор
Yes, but it's the same since that new revisions like r94 doesn't use raw (but if the folder exists it searches in it) but m2demo.

Ummmm no... it uses the FS_ReadFile commands to load all of the custom assets which searches in m2demo, raw, main, and all of the iwd files (which is why you can overwrite things already in the game)

Yeah that's why, but in the end, if the raw folder is missing, the game continues anyway without errors nor warnings...

Join the conversation

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

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

Сейчас на странице 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.