open.mp forum
[Pawn] [SOLVED] How to get Zcmd to notify you when a command is wrong - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] [SOLVED] How to get Zcmd to notify you when a command is wrong (/showthread.php?tid=1960)



[SOLVED] How to get Zcmd to notify you when a command is wrong - PutuSuhartawan - 2021-04-28

Code:
// SOLUTION

public OnPlayerCommandPerformed(playerid, cmdtext[], success)

{

if(!success) return SendClientMessage(playerid, -1, "INVALID CMD.");



return 1;

}





For 6 months I was confused about how to notify someone that someone typed cmd. because since using include zmd, the function for warning notification of cmd input errors has been lost so far in my gamemode. please help sir.


RE: Help! How to get Zcmd to notify you when a command is wrong? - Snow - 2021-04-28

Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)

{

if(!success) return SendClientMessage(playerid, -1, "INVALID CMD.");



return 1;

}



RE: Help! How to get Zcmd to notify you when a command is wrong? - PutuSuhartawan - 2021-04-28

Thanks a lot sir.



error 021: symbol already defined: "OnPlayerCommandPerformed"?



is Zcmd have trouble sir?