PHP код:
CMD:b(playerid,params[])
{
if(gPlayerLogged{playerid} == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
return 1;
}
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /b [local ooc chat]");
new string[128];
if(strlen(params) > MAXLEN)
{
new pos = MAXLEN;
if(pos < MAXLEN-1) pos = MAXLEN;
format(string, sizeof(string), "(( %s (%d): %.*s ... ))", GetPlayerNameEx(playerid), playerid, pos, params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
format(string, sizeof(string), "(( %s (%d): ... %s ))",GetPlayerNameEx(playerid), playerid, params[pos]);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else if(aDuty[playerid] == 1)
{
format(string, sizeof(string), "(( %s {FFFFFF}(%d): %s ))", GetPlayerNameEx(playerid), playerid, params);
ProxDetector(20.0, playerid, string,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
}
else if(PlayerInfo[playerid][pMasked] == 1)
{
format(string, sizeof(string), "(( Stranger: %s ))", params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
format(string, sizeof(string), "(( %s (%d): %s ))", GetPlayerNameEx(playerid), playerid, params);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
return 1;
}