View Commands - 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: View Commands - ZCMD (
/showthread.php?tid=169381)
View Commands - ZCMD -
ScottCFR - 19.08.2010
I started using zcmd and sscanf last night. How would I set up a view cmds? I don't use 'OnPlayerCommandText' any more so I can't do it the way I was..
Re: View Commands - ZCMD -
Claude - 19.08.2010
pawn Код:
COMMAND:heal(playerid, params[])
{
new ID, Float:health;
if(sscanf(params, "uf", ID, health)) SendClientMessage(playerid, COLOR_PINK,"Use /heal [playerid]");
else
SetPlayerHealth(ID, health);
return 1;
}
An example
Re: View Commands - ZCMD - [L3th4l] - 19.08.2010
by "View Commands" you mean why someone types the command?
ZCMD has
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
return 1;
}
Re: View Commands - ZCMD -
ScottCFR - 19.08.2010
I guess I should read through the include. Does it cover bad commands also like someone /dm7000 and I only have /dm6999, or would I have to bring OnplayerCommandText back?
Re: View Commands - ZCMD -
ScottCFR - 19.08.2010
Quote:
Originally Posted by Claude
pawn Код:
COMMAND:heal(playerid, params[]) { new ID, Float:health; if(sscanf(params, "uf", ID, health)) SendClientMessage(playerid, COLOR_PINK,"Use /heal [playerid]"); else SetPlayerHealth(ID, health); return 1; }
An example
|
I know how to use it. I got a basic concept, I just was confused about when a player types a command.