20.01.2009, 03:09
pawn Код:
new FALSE = false;
#define PrintEx(%1,%2) do{ new strz[256]; valstr(strz, %2); format(strz, sizeof(strz), (%1),strz); print(strz); }while(FALSE)
#define SendRconCommandX(%1,%2) do{ new st[256]; format(st, sizeof(st), (%1), %2); SendRconCommand(st); }while(FALSE)
#define SendRconCommandEx(%1,%2) do{ new st[256]; valstr(st, (%2)); format(st, sizeof(st), (%1), st); SendRconCommand(st); }while(FALSE)
pawn Код:
PrintEx(format[], {Float,_}:...);
SendRconCommandX(format[], {Float,_}:...);
SendRconCommandEX(format[], {Float,_}:...);
pawn Код:
public OnPlayerConnect(playerid)
{
PrintEx("Player %s: Has joined the server!", GetName(playerid));
SendRconCommandX("banip %s", GetIp(playerid));
SendRconCommandEx("rcon_password %s", 123);
return 1;
}