Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Admin Broadcast
- if(strcmp(cmd, "/ao", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " 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[80];
- 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: /ao");
- return 1;
- }
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- format(string, sizeof(string), "(( ** Administrator ** %s: %s ))", sendername, result);
- OOCOff(COLOR_LIGHTRED,string); //
- printf("%s", string);
- }
- }
- return 1;
- }
- // Head Admin Broadcast
- if(strcmp(cmd, "/hoc", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " 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[80];
- 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: /hoc");
- return 1;
- }
- if (PlayerInfo[playerid][pAdmin] == 2009 || PlayerInfo[playerid][pAdmin] == 2009) // a
- {
- format(string, sizeof(string), "(( ** Head Administrator ** %s: %s ))", sendername, result);
- OOCOff(COLOR_RED,string); //
- printf("%s", string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment