12.06.2014, 12:44
Hi, im trying to do the following.
In the Gamemode there is a command in zcmd format.
ex:
Right second, so in the filterscript there is the second command that im trying to call..
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 ?
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;
}
Код:
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 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 ?



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