View Commands - ZCMD
#1

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

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

by "View Commands" you mean why someone types the command?

ZCMD has
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    return 1;
}
Reply
#4

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)