CallRemoteFunction
#1

Hello! I've a little problem.

I've got a gamemode, and I'm trying to call a public from the filterscript.

It's like this:

Код:
CMD:start(playerid, p[])
{
	CallRemoteFunction("timeToStart", "");
	return 1;
}
^ In my gamemode.

Код:
forward timeToStart();
public timeToStart()
{
	for(new i=0;i<MAX_PLAYERS;i++)
	{
		SetPlayerPos(i, 3436.7880859375, -1579.4970703125, 17.810886383057);
	}
	return 1;
}
^ In the filterscript. But it won't work. Thank you for help, regards.
Reply
#2

Usually if I used RemoteFunctionCall() i'll define it like this....

#define timeToStart() CallRemoteFunction("timeToStart", "")

Anyways that does not really explain why it's not being called, I recommend putting this into your function to see if it's even being called.

SendClientMessageToAll(0xFF00FFFF, "timeToStart()::Function Was Called");
Reply
#3

Did like u said, my Lord.

Код:
CMD:start(playerid, p[])
{
	timeToStart();
	return 1;
}

CMD:start2(playerid, p[])
{
	for(new i=0;i<MAX_PLAYERS;i++)
	{
		SetPlayerPos(i, 3436.7880859375, -1579.4970703125, 17.810886383057);
	}
	return 1;
}
Anyway, just tested function with no certain reason and it works. So there's something bad in my code, with I'm calling filterscript function.

Anybody may know, what is wrong in my code?

Regards.
Reply
#4

Edit: Already resolved!
Reply
#5

Don't think so. LOL.

Still got a problem.
Reply
#6

Well lets go through basic things firs then.

Common Mistake: Is the filterscript loaded?

I ask this as there are no errors with the code.
Reply
#7

= ,= Wanna screenshot from console "filterscript loaded"?

(It wasn't added in server.cfg filterscripts list)
Reply
#8

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)