29.06.2012, 04:45
Entгo tente compilar este script criado com seu macro.
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define comando(%0,%1) cmd_%0(%1,params)
CMD:message(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, -1, "/message <texto>");
new str[128 char];
new name[24 char];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "%s: %s", name, params);
SendClientMessageToAll(-1, str);
return 1;
}
CMD:fakecmd(playerid, params[])
{
new id, cmd[32 char];
if(sscanf(params, "us[32]", id, cmd))
return SendClientMessage(playerid, -1, "/fakecmd [id/nome] [comando]");
comando(cmd, id);
return 1;
}
public OnPlayerConnect(playerid)
{
comando(message, playerid);
return 1;
}