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

Solved Give Flags VIP when under Top3


Post New Thread Reply   
 
Thread Tools Display Modes
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 05-05-2020 , 10:44   Re: Give Flags VIP when under Top3
Reply With Quote #21

Quote:
Originally Posted by OciXCrom View Post
I fail to understand what that plugin is supposed to do.

Code:
#include <amxmodx> #include <cromchat> #include <csstats> #if !defined STATSX_MAX_STATS     const STATSX_MAX_STATS = 8     const MAX_BODYHITS = 8 #endif const TOP_RANK = 3 const Float:DELAY_ON_CONNECT = 3.0 const REQUIRED_FLAGS = ADMIN_ADMIN|ADMIN_USER const FLAGS_TO_GET = ADMIN_RESERVATION|ADMIN_CHAT|ADMIN_LEVEL_F|ADMIN_LEVEL_H public plugin_init() {     register_plugin("Top3 Flags", "1.0", "OciXCrom") } public client_putinserver(id) {     set_task(DELAY_ON_CONNECT, "check_player_stats", id) } public check_player_stats(id) {     if(!is_user_connected(id) || !(get_user_flags(id) & REQUIRED_FLAGS))     {         return     }     new iStats[STATSX_MAX_STATS], iHits[MAX_BODYHITS]     if(get_user_stats(id, iStats, iHits) <= TOP_RANK)     {         set_user_flags(id, FLAGS_TO_GET)         CC_SendMessage(id, "* You received VIP flags for being in the &x04Top %i&x01!", TOP_RANK)     } }

This Plugin dont work. I get the Message "you recived VIP" but it remove after this complete the Flags. Now i dont have no flag.



Quote:
#include <amxmodx>
#include <amxmisc>
#include <csx>

new vip_player[3][45]

public plugin_init() {
register_plugin("TOP3 FREE VIP", "1.1", "MrAbdo")
new stats[8],bodyhits[8],name[32];
for(new i; i <= 3; i++)
get_stats(i,stats,bodyhits,name,31,vip_player[i],44)

}

public client_putinserver(id)
{
new name[32]
get_user_name(id,name[id],31)

for(new i; i <= 3; i++)
if(equal(name[id], vip_player[i]))
{
set_user_flags(id,read_flags("birt"))
}
return;

}
This here dont work correct. It should remove the flag Y . Now the player have flag BIRTY but it should be "birt" then. And no access to vipmenu or vip guns.

Last edited by Godofwar; 05-05-2020 at 10:49.
Godofwar is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 05-05-2020 , 11:42   Re: Give Flags VIP when under Top3
Reply With Quote #22

https://forums.alliedmods.net/showthread.php?t=310322
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 05-06-2020 , 13:12   Re: Give Flags VIP when under Top3
Reply With Quote #23

Quote:
Originally Posted by iceeedr View Post
Thx i will check this then next days.


So when no one have another idea then yeah.
Godofwar is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 05-10-2020 , 13:10   Re: Give Flags VIP when under Top3
Reply With Quote #24

The Plugin still dont work. First round u have flag "BIRTY" or about some seconds but when you got respawned after dead u have flag / So no Flag. Flags are removed. Any idea???

Code:
#include <amxmodx>
#include <cromchat>
#include <csstats>

const IGNORE_FLAG = ADMIN_BAN
const Float:DELAY_ON_CONNECT = 0.3
const Float:DELAY_ON_MESSAGE = 5.0

enum _:Flags
{
	Rank,
	Flag[6]
}

new const g_eFlags[][Flags] =
{
	{ 3, "birt" }
}

new g_iFlag[33]

public plugin_init()
{
	register_plugin("Top Awards", "1.0", "OciXCrom")
	register_dictionary("topawards.txt")
	CC_SetPrefix("&x04[Top Awards]")
}

public client_putinserver(id)
{
	g_iFlag[id] = 0
	set_task(DELAY_ON_CONNECT, "check_flags", id)
}

public check_flags(id)
{
	if(!is_user_connected(id) || get_user_flags(id) & IGNORE_FLAG)
		return

	new iStats[8], iHits[8]
	get_user_stats(id, iStats, iHits)

	new iRank = iStats[7]

	for(new i; i < sizeof(g_eFlags); i++)
	{
		if(iRank <= g_eFlags[i][Rank])
		{
			g_iFlag[id] = i
			set_user_flags(id, read_flags(g_eFlags[i][Flag]))
			set_task(DELAY_ON_MESSAGE, "send_message", id)
			break
		}
	}
}

public send_message(id)
{
	if(!is_user_connected(id))
		return

	CC_SendMessage(id, "%L", id, "TOPAWARD_GET", g_eFlags[g_iFlag[id]][Flag], g_eFlags[g_iFlag[id]][Rank])
}

Last edited by Godofwar; 05-10-2020 at 13:10.
Godofwar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-10-2020 , 13:52   Re: Give Flags VIP when under Top3
Reply With Quote #25

Sounds like some other plugin is removing them. This one doesn't do that. It only sets them when you enter the server.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 05-11-2020 , 04:18   Re: Give Flags VIP when under Top3
Reply With Quote #26

Yes Oxi you are right, it was an happy hour time plugin who did the problem. Now its working.
Godofwar 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 06:07.


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