SA-MP Forums Archive
Big Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Big Problem (/showthread.php?tid=353976)



Big Problem - rumen98 - 25.06.2012

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


Re: Big Problem - Grand_Micha - 25.06.2012

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;
}



Re: Big Problem - rumen98 - 25.06.2012

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


Re: Big Problem - rumen98 - 25.06.2012

@Grand_Micha
how to give you rep ?


Re: Big Problem - Grand_Micha - 25.06.2012

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


Re: Big Problem - JaKe Elite - 25.06.2012

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)