15.04.2019, 21:25
Ola boa noite gostaria de saber oq esta de errado? deu varios warnning e nao funciono!
pawn Code:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, pois foi calado");
return 1;
}
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[250];
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, "USE: (/a)dmin [admin chat]");
return 1;
}
if(TentouDivulgar(result))
{
if(cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, 128, "|ATENЗГO|: [%d]%s tentou divulgar: %s.",playerid,playername,result);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return 1;
}
if (PlayerInfo[playerid][pAdmin] = 1)
{
format(string, sizeof(string), "Admin Nivel 1: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 2)
{
format(string, sizeof(string), "Admin Nivel 2: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 3)
{
format(string, sizeof(string), "*Admin Nivel 3: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 4)
{
format(string, sizeof(string), "Admin Nivel 4: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 1337)
{
format(string, sizeof(string), "Admin Master: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 1339)
{
format(string, sizeof(string), "Admin Master+: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 1340)
{
format(string, sizeof(string), "Sub-Dono: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
if (PlayerInfo[playerid][pAdmin] = 1342)
{
format(string, sizeof(string), "Dono: %s", PlayerInfo[playerid][pAdmin], PlayerName(playerid), result);
ABroadCast(COLOR_LIGHTBLUE, string, 1);
}
format(string, sizeof(string), "[%d/%d/%d] [%d:%d:%d] |%d Admin %s: %s", v[2], v[1], v[0], v[3], v[4], v[5] , PlayerInfo[playerid][pAdmin], sendername, result);
AChatLog(string);
}
return 1;
}