CallRemoteFunction - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CallRemoteFunction (
/showthread.php?tid=440227)
CallRemoteFunction -
IgrexolonO - 28.05.2013
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.
Re: CallRemoteFunction -
Pottus - 28.05.2013
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");
Re: CallRemoteFunction -
IgrexolonO - 28.05.2013
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.
Re: CallRemoteFunction -
IceCube! - 28.05.2013
Edit: Already resolved!
Re: CallRemoteFunction -
IgrexolonO - 28.05.2013
Don't think so. LOL.
Still got a problem.
Re: CallRemoteFunction -
IceCube! - 28.05.2013
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.
Re: CallRemoteFunction -
IgrexolonO - 28.05.2013
= ,= Wanna screenshot from console "filterscript loaded"?
(It wasn't added in server.cfg filterscripts list)
Re: CallRemoteFunction -
IgrexolonO - 29.05.2013
bump