15.12.2014, 04:57
try this one now it will work ! if player is admin then it will send msg like " Admin Kalkor: hey" and if player is not admin then " Kalkor: hey"
pawn Код:
command(b, playerid, params[])
{
new Message[128], string[128];
if(Player[playerid][AdminLevel] >= 1)
{
if(sscanf(params, "z", Message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /b [message]");
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), ""adminOrange"%s: "chatColor"((%s)) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
}
else
{
if(strlen(Message) < 1 || !IsPlayerConnectedEx(playerid))
{
return 1;
}
else
{
if(Player[playerid][PrisonID] == 1)
{
SendClientMessage(playerid, WHITE, "You may not use this channel right now.");
}
else
{
format(string, sizeof(string), "%s: "chatColor"((%s)) ", GetName(playerid), Message);
NearByMessage(playerid, WHITE, string);
}
}
}
return 1;
}