Raised This Month: $51 Target: $400
 12% 

FF2 [Subplugin] Gravity (Updated 12.02.2023)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 02-02-2021 , 12:43   [Subplugin] Gravity (Updated 12.02.2023)
Reply With Quote #1

I have been creating FF2 bosses and sharing them publicly on AlliedModders. However, lately, I feel like my potential is being wasted, and as a result, I have made the decision to keep my creations private. I believe that people doesn't truly appreciate these quality creations. Whoever has the files before, can keep them, i don't mind. But i believe soon enough none of them will be exist to be found
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.

Last edited by J0BL3SS; 05-18-2023 at 16:39. Reason: Reason Above
J0BL3SS is offline
WhiteFalcon
Member
Join Date: Nov 2019
Old 02-02-2021 , 13:02   Re: [Subplugin] Gravity
Reply With Quote #2

You shouldn't pass raw index to timer since a client may leave/rejoin mid-rage and his index become invalid, use GetClientSerial/GetClientFromSerial or GetClientUserId/GetClientOfUserId
WhiteFalcon is offline
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 02-02-2021 , 13:45   Re: [Subplugin] Gravity
Reply With Quote #3

Quote:
Originally Posted by WhiteFalcon View Post
You shouldn't pass raw index to timer since a client may leave/rejoin mid-rage and his index become invalid, use GetClientSerial/GetClientFromSerial or GetClientUserId/GetClientOfUserId
I still don't understannd how timers work. Should have i use like that? Or should i check player is valid or not in the timer void?

Code:
CreateTimer(GRV_Duration[Num][bossClientIdx], SetGravity, GetClientUserId(iClient), TIMER_FLAG_NO_MAPCHANGE);

public Action SetGravity(Handle timer, int iClient)
{
	SetEntityGravity(iClient, 1.0);
}
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.

Last edited by J0BL3SS; 02-02-2021 at 13:50.
J0BL3SS is offline
WhiteFalcon
Member
Join Date: Nov 2019
Old 02-02-2021 , 14:03   Re: [Subplugin] Gravity
Reply With Quote #4

Check out the wiki for Timers
And also you might find this useful aswell
Code:
CreateTimer(GRV_Duration[Num][bossClientIdx], SomeCallback, GetClientUserId(iClient), TIMER_FLAG_NO_MAPCHANGE /* Invalidate the timer during level change */);

public Action SomeCallback(Handle timer, int userid)
{
	int client = GetClientOfUserId(userid);
	if (!client)
	{
		// GetClientFromSerial and GetClientOfUserId returns 0 if serial was invalid aka that client left, only checking if it's not 0 should be enough
		return Plugin_Continue;
	}
	
	SetEntityGravity(client, 1.0);
	return Plugin_Continue;
}
WhiteFalcon is offline
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 02-03-2021 , 05:51   Re: [Subplugin] Gravity (Updated 03.02.2021)
Reply With Quote #5

  • Ver 1.1.0
  • Added rage_shockwave
  • Now its compatible with ff2_summonaboss.ff2 (At least without AMS)
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.
J0BL3SS is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 02-03-2021 , 11:55   Re: [Subplugin] Gravity
Reply With Quote #6

Quote:
Originally Posted by WhiteFalcon View Post
Check out the wiki for Timers
And also you might find this useful aswell
Code:
CreateTimer(GRV_Duration[Num][bossClientIdx], SomeCallback, GetClientUserId(iClient), TIMER_FLAG_NO_MAPCHANGE /* Invalidate the timer during level change */);

public Action SomeCallback(Handle timer, int userid)
{
	int client = GetClientOfUserId(userid);
	if (!client)
	{
		// GetClientFromSerial and GetClientOfUserId returns 0 if serial was invalid aka that client left, only checking if it's not 0 should be enough
		return Plugin_Continue;
	}
	
	SetEntityGravity(client, 1.0);
	return Plugin_Continue;
}
That's not enough. GetClientOfUserId can return non-zero index of client that's not in game.
Check this thread, especially this post.
__________________
MAGNAT2645 is offline
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 02-10-2021 , 11:19   Re: [Subplugin] Gravity (Updated 10.02.2021)
Reply With Quote #7

  • Ver 1.2.0
  • Added New Rage "rage_sigma"
  • Fixed issue with "rage_shockwave" dealts damage to friendly buildings
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.
J0BL3SS is offline
Maple Syrup
Junior Member
Join Date: Jan 2020
Old 03-09-2021 , 15:30   Re: [Subplugin] Gravity (Updated 10.02.2021)
Reply With Quote #8

Sorry for asking but, I have an issue as I keep getting this error in the console when the plugin is on my test server.
Spoiler

It happens whenever the round starts no matter what boss it is.

The ability works great but this error keeps showing and, I don't know if it's a problem with the server or if it's the plugin. (I don't really have much experience when it comes to plugins .-.)

The ability I am using is rage_sigma. I would love to use this ability for my boss but, I can't seem to work around this issue.
Maple Syrup is offline
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 03-10-2021 , 00:26   Re: [Subplugin] Gravity (Updated 10.02.2021)
Reply With Quote #9

Quote:
Originally Posted by Maple Syrup View Post
Sorry for asking but, I have an issue as I keep getting this error in the console when the plugin is on my test server.
Spoiler

It happens whenever the round starts no matter what boss it is.

The ability works great but this error keeps showing and, I don't know if it's a problem with the server or if it's the plugin. (I don't really have much experience when it comes to plugins .-.)

The ability I am using is rage_sigma. I would love to use this ability for my boss but, I can't seem to work around this issue.
Its not an error, its telling you the respawned player has no boss index, which is a way to make compatible ff2_summonaboss. Im hooking abilities when a player respawns, not when round starts, the normal players will cause this message so that means youre testing plugins with 6-12 bot . You can ignore that message. I gotta remove that message soon i update the plugin
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.

Last edited by J0BL3SS; 03-10-2021 at 00:28.
J0BL3SS is offline
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 03-10-2021 , 07:14   Re: [Subplugin] Gravity (Updated 10.03.2021)
Reply With Quote #10

  • Ver 1.2.1
  • Now PrintToServer() Functions only writes the name of the player who has the ability ex:
  • Sound section name in "rage_sigma" changed "rage_sigma" to "sound_sigma"
  • Damage to player can be defined now in "rage_sigma" on arg8
  • Now Particle Applied to enemy can be selected in "rage_sigma" on arg9 and arg10
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.

Last edited by J0BL3SS; 03-10-2021 at 07:16.
J0BL3SS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode