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

[help] forward`s problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wyd3x
Senior Member
Join Date: Sep 2012
Old 01-09-2016 , 11:55   [help] forward`s problem
Reply With Quote #1

Hey,
I have problem with my forwards (i don`t know why).

On my main plugin:
Code:
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
	gH_OnMapLoaded = CreateGlobalForward("OnMapLoaded", ET_Ignore);
	PrintToServer("late");
	return APLRes_Success;
}
I got the "late" message fine.

In my include file, added:
Code:
forward void OnMapLoaded();
And second plugin:
Code:
public void OnMapLoaded()
{
	for (int i = 1; i < 10; i++)
		PrintToServer("yehaaaaaaa");
}
But its not printing for me the "yehaaaa". No errors.
Someone please?


SM1.7.2-5286
__________________
my plugins:
deleter v2.1 || [Store] Chat Color (1.2) - csgo || [Store] Award winner team
need a private plugin?
contact with me: PM, EMAIL: [email protected], discord: wyd3x #2096
private plugins: Hunger Games, [Store] Lottery, [Store] Gamble, VIP
wyd3x is offline
Godis
Senior Member
Join Date: Jan 2014
Old 01-09-2016 , 12:00   Re: [help] forward`s problem
Reply With Quote #2

Forwards can be created in OnPluginStart, and i actually think they should (only natives are registered in AskPluginLoad2). And also, are you actually starting your forward somewhere in your first plugin?
Godis is offline
wyd3x
Senior Member
Join Date: Sep 2012
Old 01-09-2016 , 12:02   Re: [help] forward`s problem
Reply With Quote #3

Quote:
Originally Posted by Godis View Post
Forwards can be created in OnPluginStart, and i actually think they should (only natives are registered in AskPluginLoad2). And also, are you actually starting your forward somewhere in your first plugin?
Yes, i do..
Code:
public void OnMapStart()
{
	*** all my stuff loading here
	*** blablabla
	Call_StartForward(gH_OnMapLoaded);
	Call_Finish();
}

*** edit

Oh nevermind,
i`m confused.. That forward work fine.
But other 1 not work.

If i calling Forward from OnPluginStart,
its not calling, but if i`m making a timer with 0.1 interval, and calling it there its work awesome. WTF?

WHY 0.0
__________________
my plugins:
deleter v2.1 || [Store] Chat Color (1.2) - csgo || [Store] Award winner team
need a private plugin?
contact with me: PM, EMAIL: [email protected], discord: wyd3x #2096
private plugins: Hunger Games, [Store] Lottery, [Store] Gamble, VIP

Last edited by wyd3x; 01-09-2016 at 12:15.
wyd3x 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 09:06.


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