How do I add this for admins!
#1

I would like to add the following admin features.

If an admin level 1+ comments, it will appear as this in the chatbox "Admin [Admin Name]: [Admin Comment]
Example: "Admin Rafik: Ehhhhh"

The second thing I want is, if a player is admin level 1+, then his player blip will be pink.

Thanks for your help
Reply
#2

Not tested because I don't have pawno with me right now.
PHP код:
    if(IsPlayerConnected(playerid))
    {
        if(
pInfo[playerid][Admin] >= 1//Change this to your admin variable
        
{
            new 
str[128],name[24];
            
GetPlayerName(playerid,name,24);
            
format(str,sizeof(str),"Admin %s(%d): {FFFFFF}%s",name,playerid,text[1]);
            
SendClientMessageToAll(GetPlayerColor(playerid), str); 
            return 
0;
        }
    } 
Reply
#3

I get 4 errors when i enter that in my gamemode.
Reply
#4

Paste them here!
Reply
#5

PHP код:
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(1485) : warning 219local variable "name" shadows a variable at a preceding level
C
:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(1565) : warning 219local variable "name" shadows a variable at a preceding level
C
:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2233) : error 010invalid function or declaration
C
:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2235) : error 010invalid function or declaration
C
:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2238) : error 021symbol already defined"GetPlayerName"
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2241) : error 010invalid function or declaration
C
:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2244) : warning 203symbol is never used"name"
C:\Users\Administration\Documents\Red Faction Seals\gamemodes\MyScript.pwn(2244) : warning 203symbol is never used"str" 
Reply
#6

Show me your OnPlayerText.
Reply
#7

Код:
public OnPlayerText(playerid, text[])
{
    if(muted[playerid] == 1) return 0;
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)