SA-MP Forums Archive
Define cmdtext in 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Define cmdtext in zcmd? (/showthread.php?tid=223947)



Define cmdtext in zcmd? - XoX - 10.02.2011

I made a simple /me command with zcmd
BTW: Sry for wrong section i missed the right one -.-

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
<?
	CMD:me(playerid, params[])
	{
        new memsg[256];
        GetPlayerName(playerid, memsg, sizeof(memsg));
        format(memsg, sizeof(memsg), "* %s %s", memsg, cmdtext[]);  //Line 7481
        SendClientMessageToAll(COLOR_RED, memsg);
	return 1;
	}
?>
Код:
C:\Dokumente und Einstellungen\Administrator\Desktop\03cSvr\gamemodes\Mode.pwn(7481) : error 017: undefined symbol "cmdtext"
How to define cmdtext?


Re: Define cmdtext in zcmd? - IstuntmanI - 10.02.2011

Don't type
Код:
CMD:me(playerid, params[])
	{
        new memsg[256];
        GetPlayerName(playerid, memsg, sizeof(memsg));
        format(memsg, sizeof(memsg), "* %s %s", memsg, cmdtext[]);  //Line 7481
        SendClientMessageToAll(COLOR_RED, memsg);
	return 1;
	}
in OnPlayerCommandPerformed, put it after a callback ... and that's correct:
Код:
CMD:me(playerid, params[])
{
        new memsg[256];
        GetPlayerName(playerid, memsg, sizeof(memsg));
        format(memsg, sizeof(memsg), "* %s %s", memsg, params);  //Line 7481
        SendClientMessageToAll(COLOR_RED, memsg);
	return 1;
}



Re: Define cmdtext in zcmd? - XoX - 10.02.2011

Thanks working^^


Re: Define cmdtext in zcmd? - kross1996 - 19.02.2011

were can i get zcmd


Re: Define cmdtext in zcmd? - Mean - 19.02.2011

Search.