03.01.2012, 23:08
1) You're checking if the player's admin level is equal to or over ZERO (0)
2) You aren't sending message to anybody but yourself
3) You're getting the name of player1 for some reason
4) You have a variable called player1 and level for some reason
5) Holy crap this is so wrong
Sorry, but you need to read EVERYTHING in https://sampwiki.blast.hk/
2) You aren't sending message to anybody but yourself
3) You're getting the name of player1 for some reason
4) You have a variable called player1 and level for some reason
5) Holy crap this is so wrong
Sorry, but you need to read EVERYTHING in https://sampwiki.blast.hk/
pawn Код:
if(strcmp(cmd, "/a", true) == 0)
{
if(pInfo[playerid][Admin] < 1) return 0;
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /a [text]");
GetPlayerName(playerid, adminname, sizeof(adminname));
for(new i,ii = GetMaxPlayers(); i < ii; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][Admin] >= 1)
{
format(string,sizeof(string),"Adminchat (%s): %s", playername, tmp);
SendClientMessage(i, purple, string);
}
}
}
return 1;
}

