Hallo Liebes Breadfish also ich wollte fragen ob ich dieses befehle ändern könnte das auch ein user Hacker meld kann ?
if(strcmp(cmd, "/admin", true) == 0 strcmp(cmd, "/a", true) == 0)
{
if(IsPlayerConnected(playerid))
{
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;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: (/a)dmin [admin chat]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "*%d Admin %s[%d]: %s", PlayerInfo[playerid][pAdmin], sendername, playerid, result);
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
format(string, sizeof(string), "*%d Supporter %s[%d]: %s", PlayerInfo[playerid][pSupporter], sendername, playerid, result);
}
else if(PlayerInfo[playerid][pSupporter] == 6)
{
format(string, sizeof(string), "*%d Admin %s[%d]: %s", PlayerInfo[playerid][pSupporter], sendername, playerid, result);
}
else return 1;
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pSupporter] >= 1 PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i,COLOR_YELLOW,string);
}
}
}
Log("OA-Chat.txt",string);
}
return 1;
}