Big Problem
#1

Hello everyone I have a big problem shtot then began to write my name goes double here's the code I tried to do Prefix but since I write a sample test shows [owner] Rumen_Dimitrov: test and below Rumen_Dimitrov: test who can help me
I would be grateful if you help me

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
PlayerInfo[playerid][pAdmin] == 3)
    {
        new 
pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{FF3333}[Owner]";
        
GetPlayerName(playeridpName24);
        
format(Stringsizeof(String), "%s{AFAFAF}%s: %s"PrefixpNametext);
        
SendClientMessageToAll(-1,String);
        }
    if(
PlayerInfo[playerid][pAdmin] == 2)
    {
        new 
pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{33AA33}[Head-Admin]";
        
GetPlayerName(playeridpName24);
        
format(Stringsizeof(String), "%s{AFAFAF}%s: %s"PrefixpNametext);
        
SendClientMessageToAll(-1,String);
        }
    if(
PlayerInfo[playerid][pAdmin] == 1)
    {
        new 
pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{FF9900}[Moderator]";
        
GetPlayerName(playeridpName24);
        
format(Stringsizeof(String), "%s{AFAFAF}%s: %s"PrefixpNametext);
        
SendClientMessageToAll(-1,String);
        }
    if(
PlayerInfo[playerid][pAdmin] == 0)
    {
        new 
pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{E100E1}[Member]";
        
GetPlayerName(playeridpName24);
        
format(Stringsizeof(String), "%s{AFAFAF}%s: %s"PrefixpNametext);
        
SendClientMessageToAll(-1,String);
        }
    return 
1;

Translated by ****** Translator
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    switch(PlayerInfo[playerid][pAdmin])
    {
    case 3:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Owner]{AFAFAF}%s: %s", pName, text[0]);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    case 2:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Head-Admin]{AFAFAF}%s: %s", pName, text[0]);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    case 1:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Moderator]{AFAFAF}%s: %s", pName, text[0]);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    case 0:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Member]{AFAFAF}%s: %s", pName, text[0]);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    switch(PlayerInfo[playerid][pAdmin])
    {
    case 3:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Owner]{AFAFAF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    case 2:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Head-Admin]{AFAFAF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    case 1:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Moderator]{AFAFAF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    case 0:
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Member]{AFAFAF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    }
    return 1;
}
man you are this best tnx for help
Reply
#4

@Grand_Micha
how to give you rep ?
Reply
#5

Well, are you a proud owner of a "Captains Of Crush" No.3?
Reply
#6

you can't you must have at least 50+ post to give a rep.
you can but the rep will not count to the user (the one you give rep)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)