10.11.2010, 01:28
Huh?
pawn Код:
#include <a_samp>
#include <sscanf2>
#define FILTERSCRIPT
#define COLOR_RED 0xFF0000AA
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
dcmd_idiot(playerid, params[])
{
new string[64], oName[MAX_PLAYER_NAME];
GetPlayerName( playerid, oName, sizeof(oName) );
if (!IsPlayerAdmin(playerid)) return 0;
if (sscanf(params, "u", playerid))
{
return SendClientMessage(playerid, COLOR_RED, "USAGE: /Idiot [id]");
}
GetPlayerName(playerid, oName, sizeof(oName));
format(string, sizeof(string), "**(IDIOT)** %s is an idiot", oName);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Idiot",cmdtext,true) == 0)
{
dcmd(idiot,5,cmdtext);
return 1;
}
pawn Код:
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\Idiot.pwn(32) : error 030: compound statement not closed at the end of file (started at line 27)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.