Перейти к содержимому
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.

Featured Replies

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

I'm not sure if it's a bug of InfinityScript but I noticed that if you use something like this:

                       entity.OnNotify("reload", ent =>
                           {
                               Log.Write(LogLevel.Info, "reloaded");
                           });

to catch when entity is reloading it randomly stops working, it just doesn't trigger anymore (mainly noticed when using akimbo pistols).

  • Ответы 53
  • Просмотры 2k
  • Created
  • Последний ответ

Top Posters In This Topic

Опубликовано:
Ok, tried the original dll and the rotation restarted. My bad.

 

The issue here is that every time you do any kind of restart (map_restart, fast_restart, or even just map changes) it reloads the mod. This causes issues because there is no way to store persistent data so you have no idea where you were in the rotation when you go to the next map. Try using some method of storage (external file, registry key, etc.) to store the numerical value in the rotation so you can pick up where you left off when the mod is reloaded.

*note* this reloading occurs on round starts (in SnD) as well.

Exactely. Only then I noticed that it also happens on multiple round based games aswell.

Although there might be some tricky workarounds to do this, I think the proper way would be to have InfinityScript definitions for these events, so that any scripts could read them. That would be the begining of scripts using persistent data (with the option of skipping reload on selected events). Then in this script example, the script could skip the playlist update on such events.

 

Maybe include something for the Old Rotation Plugin to work? Works for Drop Zone, but not TDM or INF.

Keep in mind, I know jack about code therefore I could be wrong, I just know what others more knowledgeable than I say. :D

Опубликовано:
Maybe include something for the Old Rotation Plugin to work? Works for Drop Zone, but not TDM or INF.

Keep in mind, I know jack about code therefore I could be wrong, I just know what others more knowledgeable than I say. :D

Well, those issues should be fixed already -> viewtopic.php?f=40&t=19300#p153298

Опубликовано:
$t0rm":iwcy2x9c]Temp fix for "Unhandled exception: A null value was found where an object instance was required."

um.... write better code?

 

It happens to all of the r28 users because of non english characters?

Опубликовано:
$t0rm":2mnetwj6]Temp fix for "Unhandled exception: A null value was found where an object instance was required."

um.... write better code?

 

It happens to all of the r28 users because of non english characters?

That's a client issue and unrelated to InfinityScript. When he asked here I thought he meant he was writing a script with that error.

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

 

yeah that's already possible and not an infinityscript request....

 

I would still like to see some more mappings for gsc functions.

setheadicon(); for example, couldn't find it in infinityscript.

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

Yes there are some functions missing but not SetHeadIcon because that's a custom one:

setHeadIcon( showTo, icon, offset, width, height, archived, delay, constantSize, pinToScreenEdge, fadeOutPinnedIcon, is3D )
{
if ( !isDefined( self.entityHeadIcons ) )
	self.entityHeadIcons = [];

if( !IsDefined( archived ) )
	archived = true;

if( !IsDefined( delay ) )
	delay = 0.066;

if( !IsDefined( constantSize ) )
	constantSize = true;

if( !IsDefined( pinToScreenEdge ) )
	pinToScreenEdge = true;

if( !IsDefined( fadeOutPinnedIcon ) )
	fadeOutPinnedIcon = false;

if( !IsDefined( is3D ) )
	is3D = true;

if ( !isPlayer( showTo ) && showTo == "none" )
{
	foreach ( key, headIcon in self.entityHeadIcons )
	{
		// TODO: remove and fix properly after ship
		if ( isDefined( headIcon ) )
			headIcon destroy();

		self.entityHeadIcons[ key ] = undefined;
	}

	return;
}

if ( isPlayer( showTo ) )
{
	if ( isDefined( self.entityHeadIcons[ showTo.guid ] ) )
	{		
		self.entityHeadIcons[ showTo.guid ] destroy();
		self.entityHeadIcons[ showTo.guid ] = undefined;
	}

	if ( icon == "" )
		return;

	// remove from team or we'd have two icons
	if ( isDefined( self.entityHeadIcons[ showTo.team ] ) )
	{
		self.entityHeadIcons[ showTo.team ] destroy();
		self.entityHeadIcons[ showTo.team ] = undefined;
	}

	headIcon = newClientHudElem( showTo );
	self.entityHeadIcons[ showTo.guid ] = headIcon;
}
else
{
	assert( showTo == "axis" || showTo == "allies" );
	assert( level.teamBased );

	if ( isDefined( self.entityHeadIcons[ showTo ] ) )
	{
		self.entityHeadIcons[ showTo ] destroy();
		self.entityHeadIcons[ showTo ] = undefined;
	}

	if ( icon == "" )
		return;

	foreach ( key, hudIcon in self.entityHeadIcons )
	{
		if ( key == "axis" || key == "allies" )
			continue;

		player = getPlayerForGuid( key );
		if ( player.team == showTo )
		{
			self.entityHeadIcons[ key ] destroy();
			self.entityHeadIcons[ key ] = undefined;
		}
	}

	headIcon = newTeamHudElem( showTo );
	self.entityHeadIcons[ showTo ] = headIcon;
}

if ( !isDefined( width ) || !isDefined( height ) )
{
	width = 10;
	height = 10;
}

headIcon.archived = archived;
headIcon.x = self.origin[0] + offset[0];
headIcon.y = self.origin[1] + offset[1];
headIcon.z = self.origin[2] + offset[2];
headIcon.alpha = 0.85;
headIcon setShader( icon, width, height );
headIcon setWaypoint( constantSize, pinToScreenEdge, fadeOutPinnedIcon, is3D );

headIcon thread keepPositioned( self, offset, delay );
self thread destroyIconsOnDeath();
if ( isPlayer( showTo ) )
	headIcon thread destroyOnOwnerDisconnect( showTo );
if ( isPlayer( self ) )
	headIcon thread destroyOnOwnerDisconnect( self );

return headIcon;
}

 

It would be cool though to have somehow access to hud elements which are created by gsc, something like GetHudElemByNum. Also please fix the label property.

Опубликовано:
Yes there are some functions missing but not SetHeadIcon because that's a custom one:

setHeadIcon( showTo, icon, offset, width, height, archived, delay, constantSize, pinToScreenEdge, fadeOutPinnedIcon, is3D )
{
if ( !isDefined( self.entityHeadIcons ) )
	self.entityHeadIcons = [];

if( !IsDefined( archived ) )
	archived = true;

if( !IsDefined( delay ) )
	delay = 0.066;

if( !IsDefined( constantSize ) )
	constantSize = true;

if( !IsDefined( pinToScreenEdge ) )
	pinToScreenEdge = true;

if( !IsDefined( fadeOutPinnedIcon ) )
	fadeOutPinnedIcon = false;

if( !IsDefined( is3D ) )
	is3D = true;

if ( !isPlayer( showTo ) && showTo == "none" )
{
	foreach ( key, headIcon in self.entityHeadIcons )
	{
		// TODO: remove and fix properly after ship
		if ( isDefined( headIcon ) )
			headIcon destroy();

		self.entityHeadIcons[ key ] = undefined;
	}

	return;
}

if ( isPlayer( showTo ) )
{
	if ( isDefined( self.entityHeadIcons[ showTo.guid ] ) )
	{		
		self.entityHeadIcons[ showTo.guid ] destroy();
		self.entityHeadIcons[ showTo.guid ] = undefined;
	}

	if ( icon == "" )
		return;

	// remove from team or we'd have two icons
	if ( isDefined( self.entityHeadIcons[ showTo.team ] ) )
	{
		self.entityHeadIcons[ showTo.team ] destroy();
		self.entityHeadIcons[ showTo.team ] = undefined;
	}

	headIcon = newClientHudElem( showTo );
	self.entityHeadIcons[ showTo.guid ] = headIcon;
}
else
{
	assert( showTo == "axis" || showTo == "allies" );
	assert( level.teamBased );

	if ( isDefined( self.entityHeadIcons[ showTo ] ) )
	{
		self.entityHeadIcons[ showTo ] destroy();
		self.entityHeadIcons[ showTo ] = undefined;
	}

	if ( icon == "" )
		return;

	foreach ( key, hudIcon in self.entityHeadIcons )
	{
		if ( key == "axis" || key == "allies" )
			continue;

		player = getPlayerForGuid( key );
		if ( player.team == showTo )
		{
			self.entityHeadIcons[ key ] destroy();
			self.entityHeadIcons[ key ] = undefined;
		}
	}

	headIcon = newTeamHudElem( showTo );
	self.entityHeadIcons[ showTo ] = headIcon;
}

if ( !isDefined( width ) || !isDefined( height ) )
{
	width = 10;
	height = 10;
}

headIcon.archived = archived;
headIcon.x = self.origin[0] + offset[0];
headIcon.y = self.origin[1] + offset[1];
headIcon.z = self.origin[2] + offset[2];
headIcon.alpha = 0.85;
headIcon setShader( icon, width, height );
headIcon setWaypoint( constantSize, pinToScreenEdge, fadeOutPinnedIcon, is3D );

headIcon thread keepPositioned( self, offset, delay );
self thread destroyIconsOnDeath();
if ( isPlayer( showTo ) )
	headIcon thread destroyOnOwnerDisconnect( showTo );
if ( isPlayer( self ) )
	headIcon thread destroyOnOwnerDisconnect( self );

return headIcon;
}

 

It would be cool though to have somehow access to hud elements which are created by gsc, something like GetHudElemByNum. Also please fix the label property.

 

YES! Both of those would be very helpfull indeed!

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

Entity Array as return type for the Call function.

 

Example:

//remoteMissileSpawnArray = getEntArray( "remoteMissileSpawn" , "targetname" );
Entity[] remoteMissileSpawnArray = Call("getEntArray", "remoteMissileSpawn", "targetname");

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

hi everybody.

i want a code to when i type a message with ! dont show this

please help

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

please write a sample?!?! :?

Опубликовано:
please write a sample?!?! :?

public override onsay3(params bla bla bla)
{
if(message.length > 1 && message[0] == "!")
return eventeat.eatgame;
else
return eventeat.eatnone;
}

 

this ain't copyable pasta, so do it yourself

Опубликовано:
please write a sample?!?! :?

public override onsay3(params bla bla bla)
{
if(message.length > 1 && message[0] == "!")
return eventeat.eatgame;
else
return eventeat.eatnone;
}

 

this ain't copyable pasta, so do it yourself

 

thanks but its too late i make it :D

Опубликовано:
Someone already suggested .gsc override; I second the idea (if possible) :)

not possible -- would take v. long time

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.