21.03.2014, 16:10
help ,,
i have problem with command /mute
can you help me?
please
get errors
i have problem with command /mute
can you help me?

pawn Код:
CMD:mute(playerid,params[]) {
if(pInfo[playerid][pVIP] == 1) || pInfo[playerid][pAdmin] < 1) // << I guess, this is the error
{
new id,time,reason[256],PlayerName[MAX_PLAYER_NAME], GPlayerName[MAX_PLAYER_NAME];
if(sscanf(params,"dds",id,time,reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /mute <playerid> <time> <reason>");
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected.");
if(PlayerInfo[id][AdminLevel] > PlayerInfo[playerid][AdminLevel])return SendClientMessage(playerid,COLOR_RED,"ERROR: He/She is a greater level than your level.");
if(Muted[id] == 1)return SendClientMessage(playerid,COLOR_RED,"ERROR: Player is already muted.");
GetPlayerName(id, PlayerName, sizeof(PlayerName));
GetPlayerName(playerid, GPlayerName, sizeof(GPlayerName));
format(szString, sizeof(szString), "-X Admin-: %s (ID:%d) has been muted for %d minutes; Reason: %s", PlayerName, id, time, reason);
SendClientMessageToAll(COLOR_RED, szString);
format(szString, sizeof(szString), "Admin %s, Command Used 'MUTE' Taregt: %s (ID:%d)", GPlayerName, PlayerName, id);
SendClientMessageToAdmins(szString);
Muted[id] = 1;
MuteTimer[id] = SetTimerEx("Unmute",time*60000, false, "i", id);
}
else {
return 0;
}
return 1;
}
pawn Код:
C:\Users\Mas O\Documents\SanDrifter\filterscripts\carcolor.pwn(277) : error 029: invalid expression, assumed zero
C:\Users\Mas O\Documents\SanDrifter\filterscripts\carcolor.pwn(277) : warning 215: expression has no effect
C:\Users\Mas O\Documents\SanDrifter\filterscripts\carcolor.pwn(277) : error 001: expected token: ";", but found ")"
C:\Users\Mas O\Documents\SanDrifter\filterscripts\carcolor.pwn(277) : error 029: invalid expression, assumed zero
C:\Users\Mas O\Documents\SanDrifter\filterscripts\carcolor.pwn(277) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.