09.06.2011, 17:40
pawn Код:
command(mute, playerid, params[])
{
new string[128]
new ID; //Error Line
new pname[24]
new aname[24]// Error line
GetPlayerName(ID, pname, sizeof(pname));// Error line
GetPlayerName(playerid,aname,24);
if( PlayerInfo[playerid][Admin] >= 1)
{
if(sscanf(params, "i", ID))
{
SendClientMessage(playerid, COLOUR_ORANGE, "Hint: /mute (playerid)" );
return 1;
}
if(!IsPlayerConnected(ID))
{
SendClientMessage(playerid, COLOUR_ORANGE, "Hint: Invalid Player ID");
return 1;
}
format(string, sizeof(string), "%s(%d) has been muted by Admin %s", pname, ID, aname);
SendToAdmins(ADMIN_WARNING, string);
PlayerInfo[ID][Muted] = 1;
SendClientMessage(ID, COLOUR_ORANGE, "You have been muted. To request to be unmuted use /muterequest" );
}
return 1;
}
pawn Код:
(1464) : error 001: expected token: ";", but found "new"
(1466) : error 001: expected token: ";", but found "new"
(1467) : error 001: expected token: ";", but found "-identifier-"