30.03.2013, 00:19
I think everything is fine but there too many warnings:
Warning 202:
Line:
Warning 202:
pawn Код:
(3558) : warning 202: number of arguments does not match definition
pawn Код:
format(string, sizeof(string), "** Newbie %s: %s", GetPlayerName(playerid), params);
pawn Код:
CMD:newb(playerid, params[])
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(PlayerInfo[playerid][pTut] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
return 1;
}
if ((nonewbie) && PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_GRAD2, "The newbie chat channel has been disabled by an administrator!");
return 1;
}
if(PlayerInfo[playerid][Pmuted] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You are muted from the newbie chat channel.");
return 1;
}
new string[128];
if(NewbieTimer[playerid] > 0)
{
format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", NewbieTimer[playerid]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
if(gNewbie[playerid]==1)
{
SendClientMessage(playerid, COLOR_GREY, "You have the channel toggled, /tognewbie to re-enable!");
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/newb)ie [text]");
if(PlayerInfo[playerid][pManga]<1&&PlayerInfo[playerid][pAdmin] < 2)
{
NewbieTimer[playerid] = 50;
}
if(PlayerInfo[playerid][pAdmin] >= 2)
{
format(string, sizeof(string), "** Admin %s: %s", GetPlayerName(playerid), params);
}
foreach(Player, n)
{
if (gNewbie[n]==0)
{
SendClientMessage(n, COLOR_WHITENEWB, string);
}
}
return 1;
}