13.06.2015, 20:52
Doesn't the command get executed twice?
You could do it like this:
Otherwise nice work.
Edit:
pawn Code:
if(!CallLocalFunction(string, "ds", TargetID, "\1")) return SendClientMessage(playerid, -1, "{E03636}[ERROR]: {FFFFFF}This command is unknown.");
if(!isnull(Params)) return CallRemoteFunction(string, "ds", TargetID, Params);
else return CallRemoteFunction(string, "ds", TargetID, "\1");
pawn Code:
if(!isnull(Params))
{
if (!CallRemoteFunction(string, "ds", TargetID, Params)) return SendClientMessage(playerid, -1, "{E03636}[ERROR]: {FFFFFF}This command is unknown.");
}
else if (!CallRemoteFunction(string, "ds", TargetID, "\1")) return SendClientMessage(playerid, -1, "{E03636}[ERROR]: {FFFFFF}This command is unknown.");
Edit:
pawn Code:
if (!CallRemoteFunction(string, "ds", TargetID, isnull(Params) ? ("\1") : Params)) return SendClientMessage(playerid, -1, "{E03636}[ERROR]: {FFFFFF}This command is unknown.");