02.03.2009, 00:47
(
Последний раз редактировалось Daren_Jacobson; 09.08.2010 в 04:49.
)
the define:
the usage:
the usage:
if you call it by using /rcon cmdnamenoslash then any prints in the code will print to your in-game screen.
pawn Код:
#define rcmd(%1,%2,%3) if (!strcmp((%3)[0], #%1, true, (%2)) && ((((%3)[(%2)] == '\0') && (rcmd_%1(""))) || (((%3)[(%2)] == ' ') && (rcmd_%1((%3)[(%2) + 1]))))) return 1
pawn Код:
public OnRconCommand(cmd[])
{
rcmd(cmdnamenoslash, 14, cmd); //14 is the length, cmd is the param passed by OnRconCommand
return 1;
}
pawn Код:
rcmd_cmdnamenoslash(params[])
{
new Float:x, Float:y;
if (sscanf(params, "ff", x, y)) print("USAGE: /cmdnamenoslash [x] [y]");
else
{
printf("%f", AngleToPoint(0.0, 0.0, x, y));
}
return 1;
}