SA-MP Forums Archive
Again 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: Again problem (/showthread.php?tid=353987)



Again problem - rumen98 - 25.06.2012


now have problem with member here is code

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




Re: Again problem - JaKe Elite - 25.06.2012

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(PlayerInfo[playerid][pAdmin] == 4)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Owner]{33CCFF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{33AA33}[Head-Admin]{33CCFF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{0088FF}[Admin]{9ACD32}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 1)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF9900}[Moderator]{AFAFAF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 0)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{E100E1}[Member]%s{AFAFAF}:%s", pName, text);
        SendClientMessageToAll(-1,String);
    }
    return 0;
}
return 1; became return 0;


Re: Again problem - rumen98 - 25.06.2012

Quote:
Originally Posted by Romel
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(PlayerInfo[playerid][pAdmin] == 4)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF3333}[Owner]{33CCFF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{33AA33}[Head-Admin]{33CCFF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{0088FF}[Admin]{9ACD32}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 1)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{FF9900}[Moderator]{AFAFAF}%s: %s", pName, text);
        SendClientMessageToAll(-1,String);
        return 0;
    }
    else if(PlayerInfo[playerid][pAdmin] == 0)
    {
        new pName[MAX_PLAYER_NAME], String[128];
        GetPlayerName(playerid, pName, 24);
        format(String, sizeof(String), "{E100E1}[Member]%s{AFAFAF}:%s", pName, text);
        SendClientMessageToAll(-1,String);
    }
    return 0;
}
return 1; became return 0;
Oh here's the problem so thank you