CallRemoteFunction Crashing. - 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 Crashing. (
/showthread.php?tid=519003)
CallRemoteFunction Crashing. -
CharlieSanchez - 12.06.2014
Hi, im trying to do the following.
In the Gamemode there is a command in zcmd format.
ex:
Код:
CMD:toys(playerid,params[])
{
if(pInfo[playerid][Toys] > 0)
{
CallRemoteFunction("cmd_o", "is", playerid, "");
}
else
{
if(pInfo[playerid][Toys] < 1) return SendClientMessage(playerid, 0xFF4500AA, "You need to Buy access first to use this item, buy it from /shop for 500 Credits.");
if(pInfo[playerid][pLevel] < 1) return ShowMessage(playerid, red, 1);
}
return 1;
}
Right second, so in the filterscript there is the second command that im trying to call..
Код:
CMD:o(playerid,params[])
{
new string[128];
new dialog[500];
for(new x;x<MAX_OSLOTS;x++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, x))
{ format(string, sizeof(string), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n", x); }
else format(string, sizeof(string), ""COL_WHITE"Slot:%d\n", x);
strcat(dialog,string);
}
ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
return 1;
}
So this is crashing the server, i have tried forwards but im doing something wrong guys..
So the hole idea here is that the Cmd:toys in the gm, calls the cmd

in the filterscript, can anywone please show me how to forward this and if there is something else that needs doing ? i have been for 4 hours banging my head on this... Help is needed thanks you for reading and i hope there is someone that can help me on this thanks.
Edit - PS: where do the forwards go ? on gm ? or fs ?
Re: CallRemoteFunction Crashing. -
Djole1337 - 12.06.2014
pawn Код:
CallRemoteFunction("cmd_o", "is", playerid, "\1");
Re: CallRemoteFunction Crashing. -
CharlieSanchez - 12.06.2014
Quote:
Originally Posted by Djole1337
pawn Код:
CallRemoteFunction("cmd_o", "is", playerid, "\1");
|
Thanks dude it worked, i was not adding anything after playerid like you mentione "\1" i was only adding " " so that is the bugger hehe

thanks dude rep+1 you for help me so fast !