Define cmdtext in zcmd?
#1

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?
Reply
#2

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;
}
Reply
#3

Thanks working^^
Reply
#4

were can i get zcmd
Reply
#5

Search.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)