02.08.2011, 11:46
pawn Код:
CMD:n(playerid, params[])
{
if(PlayerInfo[playerid][pNMuted] == 0)
{
new
Message[128];
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, ERROR, "SYNTAX: /n [message]");
}
else
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new
MsgStr[128];
format(MsgStr, sizeof(MsgStr), "Admin %s: %s", GetName(playerid), Message);
SendNewbieMessage(MsgStr);
}
else if(PlayerInfo[playerid][pHelper] == 1)
{
new
MsgStr[128];
format(MsgStr, sizeof(MsgStr), "Helper %s: %s", GetName(playerid), Message);
SendNewbieMessage(MsgStr);
}
else if(PlayerInfo[playerid][pHelper] == 2)
{
new
MsgStr[128];
format(MsgStr, sizeof(MsgStr), "Mod Helper %s: %s", GetName(playerid), Message);
SendNewbieMessage(MsgStr);
}
else if(PlayerInfo[playerid][pHelper] < 1 && PlayerInfo[playerid][pAdmin] < 1)
{
new
MsgStr[128];
format(MsgStr, sizeof(MsgStr), "Newbie %s: %s", GetName(playerid), Message);
SendNewbieMessage(MsgStr);
PlayerInfo[playerid][pNMuted] = 1;
SetTimerEx("NSpamTimer", 4000, false, "d", playerid);
}
}
}
else
{
SendClientMessage(playerid, ERROR, "You are muted from the newbie chat.");
}
return 1;
}
When i type /n it dosent show Usage: /n [message]
it shows the message to all that Admin/Helper/Helper Mod %s:
PLZ HELP ME