Raised This Month: $32 Target: $400
 8% 

The plugin informs you that there is no gamedata


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
szogun
Senior Member
Join Date: Apr 2016
Old 09-27-2019 , 11:24   The plugin informs you that there is no gamedata
Reply With Quote #1

Hey, I have a small problem I decided to embrace the work of the plugin for VIP people

I have slightly modified the code

Original Code

PHP Code:
public Action Command_Menu(int clientint args)
{
    if (!
IsValidClient(client))
        return 
Plugin_Handled;

    if (!
IsPlayerAlive(client))
    {
        
ReplyToCommand(client"[Fortnite Emotes] You must be alive to use this!");
        return 
Plugin_Handled;
    }

    
Menu_Dance(client);

    return 
Plugin_Handled;

After changes

Code:
public Action Command_Menu(int client, int args)
{
	if(!IsPlayerVIP(client))
	{
		PrintToChat(client, "\x07╔══════════════════════════════════╗");
		PrintToChat(client, "\x04[Dance] \x01Ta Komenda jest tylko dla VIP'a.");
		PrintToChat(client, "\x07╚══════════════════════════════════╝");
		return Plugin_Handled;
	}

	if (!IsValidClient(client))
		return Plugin_Handled;

	if (!IsPlayerAlive(client))
	{
		ReplyToCommand(client, "[Dance] Musisz być żywy, aby z tego skorzystać!");
		return Plugin_Handled;
	}

	Menu_Dance(client);

	return Plugin_Handled;
}


Somewhere at the bottom

stock bool IsPlayerVIP(int client, bool nobots = true)
{
	if(GetUserFlagBits(client) & ADMFLAG_CUSTOM1) return true;
	if(GetUserFlagBits(client) & ADMFLAG_ROOT) return true;

	return false;
}
If you try to start the plugin, it crashes
HTML Code:
Plugin fortnite_emotes_demo.smx failed to load: Native "GameData.GameData" was not found.

And what a funny thing the unchanged plugin code works fine, which it adds to the attachment
Attached Files
File Type: sp Get Plugin or Get Source (fortnite_emotes_demo.sp - 100 views - 24.6 KB)

Last edited by szogun; 09-27-2019 at 11:25.
szogun is online now
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 09-27-2019 , 15:04   Re: The plugin informs you that there is no gamedata
Reply With Quote #2

The edits you have posted have nothing todo with your error, beside that you should use CheckCommandAccess and you should check for valid client before you check for VIP status. Oh... and nobots has no usage here.
__________________
zipcore is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-28-2019 , 08:41   Re: The plugin informs you that there is no gamedata
Reply With Quote #3

Code:
public Action Command_Menu(int client, int args)
{
	if (!IsValidClient(client))
		return Plugin_Handled;

	if (!IsPlayerAlive(client))
	{
		ReplyToCommand(client, "[Dance] Musisz być żywy, aby z tego skorzystać!");
		return Plugin_Handled;
	}

        if(!IsPlayerVIP(client))
	{
		PrintToChat(client, "\x07╔══════════════════════════════════╗");
		PrintToChat(client, "\x04[Dance] \x01Ta Komenda jest tylko dla VIP'a.");
		PrintToChat(client, "\x07╚══════════════════════════════════╝");
		return Plugin_Handled;
	}

	Menu_Dance(client);

	return Plugin_Handled;
}

stock bool IsPlayerVIP(int client)
{
	if(CheckCommandAccess(client, "", ADMFLAG_CUSTOM1))
            return true;
        return false;
}
Thanks to zipcore
__________________
Taking paid private requests! Contact me

Last edited by Cruze; 09-28-2019 at 08:43.
Cruze is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 09-28-2019 , 09:52   Re: The plugin informs you that there is no gamedata
Reply With Quote #4

The solution for the problem is in your other thread.
xerox8521 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 21:16.


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