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

Hi all,

 

I'm creating an instagib mod (yes I just realized CFour already created one...) Anyway I think I did everything (probably not because that's why it's not working) when I load my mod and I go ingame... nothing works.

 

This is what I added in _rank.gsc:

doDvars ()
{
setDvar ( "sv_cheats", "1" );
setDvar ( "bg_fallDamageMinHeight", "999" );
setDvar ( "bg_fallDamageMaxHeight", "998" );
setDvar ( "g_speed", "300" );
setDvar ( "perk_weapspreadmultiplier, "0.01" );
setDvar ( "jump_spreadAdd", "0" );
setDvar ( "cg_drawgun", "0" );
setDvar ( "jump_slowdownEnable", "0" );
setDvar ( "g_gravity", "600" );
setDvar ( "bg_viewbobmax", "600" );
setDvar ( "jump_height", "50");
self allowADS(false);
setDvar( "scr_game_forceuav", "1" );
}
self takeAllWeapons();
wait 0.1;
self giveweapon ( "cheytac_fmj_mp", 0, false);
wait 0.1;
self switchToWeapon ( "cheytac_fmj_mp");
}	
}

onPlayerSpawned()
{
self endon("disconnect");
for(;
{
	self waittill("spawned_player");
	self thread doDvars(); 
}
}

 

unlammo()
{
       self endon ( "disconnect" );
       self endon ( "death" );

       for(;
       {
               currentWeapon = self getCurrentWeapon();
               if ( currentWeapon != "none" )
               {
                       if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
                       {
                               self setWeaponAmmoClip( currentweapon, 9999, "left" );
                               self setWeaponAmmoClip( currentweapon, 9999, "right" );
                       }
                       else
                               self setWeaponAmmoClip( currentWeapon, 9999 );
                       self GiveMaxAmmo( currentWeapon );
               }

               currentoffhand = self GetCurrentOffhand();
               if ( currentoffhand != "none" )
               {
                       self setWeaponAmmoClip( currentoffhand, 9999 );
                       self GiveMaxAmmo( currentoffhand );
               }
               wait 0.01;
       }
}

 

And here's the IWD.

Featured Replies

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

Add the server dvars on init(). They are set everytime a player spawns, as it is now.

 

Besides that you have to call unlammo() somewhere or it won't do anything.

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

doDvars ()
{

self allowADS(false);
setDvar( "scr_game_forceuav", "1" );
[b][color=#FF0000]}[/color][/b]
self takeAllWeapons();
wait 0.1;
self giveweapon ( "cheytac_fmj_mp", 0, false);
wait 0.1;
self switchToWeapon ( "cheytac_fmj_mp");
[b][color=#FF0000]}[/color][/b]	

What are these for?

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

damn braces

What are these for?

 

Just some random curly braces. ;)

 

Emphasis, don't you get a syntax error? ( I am sure you do)

Опубликовано:
  • Автор

damn braces

What are these for?

 

Just some random curly braces. ;)

 

Emphasis, don't you get a syntax error? ( I am sure you do)

I don't... I just removed those braces and it's still not working.

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

damn braces

What are these for?

 

Just some random curly braces. ;)

 

Emphasis, don't you get a syntax error? ( I am sure you do)

I don't... I just removed those braces and it's still not working.

 

Yes, i see now. Your _rank.gsc doesn't even get loaded because you messed up the folder structure in your .iwd file.

Why do you even have two _rank.gsc in there?

(I wouldn't suggest to use _rank.gsc at all for the things you want to do, better use _class.gsc)

 

Just put (one of) your _rank.gsc (or _class.gsc) in maps/mp/gametypes and pack it to .iwd.

And as i said ealier, you have to actually call the unlammo() function somewhere...

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

lawl. Seems like you are packing your .iwd's the wrong way...you have to choose .zip as archive format not .rar. (that's why you weren't getting syntax error in the first place)

Anyway, you will still get a syntax error as you are calling thread, which are non-existent. (self thread doAmmo();)

 

If you really want to start modding and not just copy pasting code snippets, you should read some tutorials first. (no offence intended)

Опубликовано:
  • Автор
lawl. Seems like you are packing your .iwd's the wrong way...you have to choose .zip as archive format not .rar. (that's why you weren't getting syntax error in the first place)

Anyway, you will still get a syntax error as you are calling thread, which are non-existent. (self thread doAmmo();)

 

If really want to start modding and not just copy pasting code snippets, you should read some tutorials first. (no offence intended)

I didn't copy anything except for the Infinite ammo...

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

I didn't copy anything except for the Infinite ammo...

 

Well, it looked like that because of the threads you called onplayerspawned();, which werent even existent in your _rank.gsc.

Anyway, do you get the syntax error now? (You either have to create a doAmmo() function, or insert your unlAmmo() function back in and rename it to doAmmo() to fix the error)

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

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