Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/b", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /b [local ooc chat]");
- return 1;
- }
- if(Muted[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "You are currently muted.");
- return 1;
- }
- new str[128];
- if(strlen(result) > MAXLEN)
- {
- new pos = MAXLEN;
- //while(result[--pos] < ' ') {}
- if(pos < MAXLEN-1) pos = MAXLEN;
- format(str, sizeof(str), "(( [%d] %s: %.*s ... ))", playerid, PlayerName(playerid), pos, result);
- ProxDetector(25.0, playerid, str,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- format(str, sizeof(str), "(( [%d] %s: ... %s ))", playerid, PlayerName(playerid), result[pos]);
- ProxDetector(25.0, playerid, str,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- printf("%s", str);
- return 1;
- }
- else
- {
- format(str, sizeof(str), "(( [%d] %s: %s ))", playerid, PlayerName(playerid), result);
- ProxDetector(25.0, playerid, str,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- printf("%s", str);
- return 1;
- }
- else
- {
- if(AdminDuty[playerid] == 1)
- format(str, sizeof(str), "{FF6600}(( [%d] Administrator {FFFFFF}%s: %s ))", playerid, PlayerName(playerid), result);
- ProxDetector(25.0, playerid, str,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- printf("%s", str);
- return 1;
- }
- else
- {
- if(TesterDuty[playerid] == 1)
- format(str, sizeof(str), "{660000}(( [%d] Tester {FFFFFF}%s: %s ))", playerid, PlayerName(playerid), result);
- ProxDetector(25.0, playerid, str,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- printf("%s", str);
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment