16.05.2010, 21:16
Hello, I have created a filterscript in which is a /teleports command which creates a menu dialog. However, when I run the filterscript the command does not work. Also, no errors are experienced when I compile the FS

public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(teleports, 9,cmdtext);
return 1;
}
dcmd_teleports(playerid, params[])
{
new teleports;
if(sscanf(params,"t", teleports)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE : /teleports");
ShowPlayerDialog(playerid, TELEPORTS, DIALOG_STYLE_LIST, "Teleports", " Las Venturas\nLos Santos\nSan Fierro\nLiberty City\nBistro\nArch\nLoco Low\nTransfender\nJizzy's\nDonut Shop\nMeat Processing Plant\nTallest Building\nPirate Ship\nLS Airport\nSF Airport\nLV Airport\nGrove Street", "Teleport", "Cancel");
return 1;
}
|
Originally Posted by wiki
Returns Returning 0 in this callback will pass the command to another script or display 'SERVER: Unknown command' if there are no scripts to pass it on to
|