- 0
Ajutatma va rog problema /hc
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
BaD_bOy_MD
Playeri simpli pot scri pe /hc dar ei nu vad iar admini/helperi vad ca ei scriu...
if(strcmp(cmd, "/hc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "Nu poti scrie in chat deoarece ai primit mute!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
result[0] = toupper(result[0]);
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_SERVER, "USAGE:{FFFFFF} /hc [text]");
return 1;
}
new arank[256];
if(PlayerInfo[playerid][pAdmin] == 1) arank = "Trial Admin";
else if(PlayerInfo[playerid][pAdmin] == 2) arank = "Junior Admin";
else if(PlayerInfo[playerid][pAdmin] == 3) arank = "Moderator";
else if(PlayerInfo[playerid][pAdmin] == 4) arank = "Global Moderator";
else if(PlayerInfo[playerid][pAdmin] == 5) arank = "Administrator";
else if(PlayerInfo[playerid][pAdmin] == 6) arank = "Co-Owner";
else if(PlayerInfo[playerid][pAdmin] == 7) arank = "Owner";
if(PlayerInfo[playerid][pHelper] >= 1)
{
format(string, sizeof(string), "[Helper %d] %s: %s", PlayerInfo[playerid][pHelper], sendername, result);
HBroadCast(COLOR_YELLOW, string);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[pAdmin] >= 6)
{
format(string, 256, "(/hc): Helper %s: %s", GetName(playerid), (result));
SCM(i, COLOR_YELLOW, string);
}
}
}
return 1;
}
5 answers to this question
Recommended Posts