27.11.2013, 10:26
Hello all, it's been long since I've scripted so i'm having some problems getting this command fixed
errors
pawn Код:
new Muted[MAX_PLAYERS];
CMD:mute(playerid, params[])
{
if(pInfo[playerid][Admin] >= 1)
{
new id,msg1[128],msg2[128];
if(!sscanf(params, "uS[40]", id))
{
if(playerid == id)
{
if(IsPlayerConnected(id))
{
if(isnull(msg1,msg2))
{
new string[200];
new string2[200];
format(string,sizeof(string)," You have been Muted by Admin ( %s ) Reason: No reason specified.",pInfo[playerid][playername]);
format(string2,sizeof(string2),"You have muted Player ( %s ) Reason: No reason specified.",pInfo[id][playername]);
SendClientMessage(id,COLOR_ADMIN,string);
SendClientMessage(playerid,COLOR_ADMIN,string2);
Muted[id] = 1;
} else {
new string[200];
new string2[200]
format(string,sizeof(string),"AdminCMD: You have been Muted by Admin ( %s ) Reason: %s.",pInfo[playerid][playername],msg1);
format(string2,sizeof(string2),"AdminCMD: You have Muted Player ( %s ) Reason: %s.",pInfo[id][playername],msg2);
SendClientMessage(id,COLOR_ADMIN,string);
SendClientMessage(playerid,COLOR_ADMIN,string2);
Muted[id] = 1;
}
} else SendError(playerid, "This player is not Connected!");
} else SendError(playerid, "You can't mute yourself!");
} else SendError(playerid," Syntax: /Mute <playerid> [reason]");
} else SendError(playerid," You don't have enough priviliges");
return 1;
}
Код:
admin.pwn(57) : error 001: expected token: ";", but found "-identifier-" admin.pwn(77) : error 033: array must be indexed (variable "Muted")