[Tutorial] ZCMD: How to make 'forcecmd' command.
#3

Seems a legit tutorial although this guy have found some errors maybe but still good job and it might be useful in the future I guess.

Quote:
Originally Posted by kvann
View Post
Doesn't the command get executed twice?

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");
You could do it like this:

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.");
Otherwise nice work.
Reply


Messages In This Thread
ZCMD: How to make 'forcecmd' command. - by bgedition - 13.06.2015, 20:29
Re: ZCMD: How to make 'forcecmd' command. - by kristo - 13.06.2015, 20:52
Re: ZCMD: How to make 'forcecmd' command. - by Konverse - 13.06.2015, 20:55
Re: ZCMD: How to make 'forcecmd' command. - by bgedition - 13.06.2015, 20:55
Re: ZCMD: How to make 'forcecmd' command. - by kristo - 13.06.2015, 20:57
Re: ZCMD: How to make 'forcecmd' command. - by bgedition - 13.06.2015, 21:17
Re: ZCMD: How to make 'forcecmd' command. - by JaydenJason - 14.06.2015, 14:05
Re : ZCMD: How to make 'forcecmd' command. - by Dutheil - 15.06.2015, 12:30
Re: ZCMD: How to make 'forcecmd' command. - by Alpay0098 - 15.06.2015, 17:38
Re: ZCMD: How to make 'forcecmd' command. - by gurmani11 - 19.07.2015, 17:30

Forum Jump:


Users browsing this thread: 3 Guest(s)