SA-MP Forums Archive
Tool: Convert from strcmp to zcmd? - 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: Tool: Convert from strcmp to zcmd? (/showthread.php?tid=608830)



Tool: Convert from strcmp to zcmd? - blanic - 05.06.2016

Is there any tool who allows me to convert all strcmp commands to zcmd ones? Instead of using replacer of Pawn editor because it might be whitespace among if(strcmp(cmdtext,"/
Or there is anyway to convert commands with few clicks?


Re: Tool: Convert from strcmp to zcmd? - IFilip - 05.06.2016

no, there are no tools that allow the conversion of the commands.
however, both within half an hour you should be able to convert any gamemode by strcmp in zcmd, just put a return every function, replace the "prefix" strcmp in ZCMD obviously also outside dell'OnPlayerCommandText, and delete it completely.
correct syntax for a command in zcmd:
pawn Код:
CMD: command (playerid, params [])
{
//code here
return 1;
}



Re: Tool: Convert from strcmp to zcmd? - Rockefeller - 08.06.2016

There is not any tool to convert strcmp to ZCMD , you have to change that by yourself and that dont take much time and its peaty easy , here you have example if you need it.

Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/kickme", cmdtext, true, 6) == 0)
	{
		Kick(playerid);
		return 1;
	}
	return 0;
}
Код:
#include <a_samp>
#include <ZCMD>

CMD:kickme(playerid, params[])
{
        Kick(playerid);
	return 1;
}