SA-MP Forums Archive
ZCMD commands? - 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: ZCMD commands? (/showthread.php?tid=400853)



ZCMD commands? - NicholasA - 20.12.2012

Hey im new to ZCMD and my question is: how do i make commands?

This is how i set it up:
Код:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("         VehCommands by phantomcraft    ");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

COMMAND:whatsup(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
  SendClientMessage(playerid, 0xF70C6BFF, "WHATSUP");
  return 1;
}

COMMAND:nigger(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
  SendClientMessage(playerid, 0xF70C6BFF, "nigger");
  return 1;
}



Re: ZCMD commands? - ReneG - 20.12.2012

as long as you include the zcmd file, then your code is fine.


Re: ZCMD commands? - NicholasA - 20.12.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
as long as you include the zcmd file, then your code is fine.
Thanks i forgot including it