OnPlayerText
#1

Hi All,
i have Question How to fix Onplayertext bcz not full OnPlayertext Work Only in the top Help me to fix it
Code pawno
PHP код:
public OnPlayerText(playeridtext[])
{
    if(
stringContainsIP(text))
    {
        
format(strgsizeof(strg), ""STEELBLUE"- AS - {%06x}%s(%d) "STEELBLUE"has been automatically kicked for advertising.", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid);
        
SendClientMessageToAll(-1strg);
        
SendClientMessage(playerid, -1""RED"ERROR: "GREY"Your message has been blocked because it contains an IP. You have been kicked for advertising.");
        
SetTimerEx("KickPlayer"100false"i"playerid);
        return 
0;
    }
    if ( 
PlayerInfo playerid ] [Admin ] == 0)
    {
        new 
String[128];
        
format(Stringsizeof(String), "{%06x}%s: {FFFFFF}(%d): %s", (GetPlayerColor(playerid) >>> 8),GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
        return 
0;
    }
    if ( 
PlayerInfo playerid ] [Admin ] == 1)
    {
        new 
String[128];
        
format(Stringsizeof(String), "{996666}[ADMIN] {25A5A8}%s(%d): {FFFFFF}%s",GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
        return 
0;
    }
    if ( 
PlayerInfo playerid ] [Admin ] == 2)
    {
        new 
String[128];
        
format(Stringsizeof(String), "{996666}[ADMIN] {25A5A8}%s(%d): {FFFFFF}%s",GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
        return 
0;
    }
    if ( 
PlayerInfo playerid ] [Admin ] == 3)
    {
        new 
String[128];
        
format(Stringsizeof(String), "{996666}[ADMIN] {25A5A8}%s(%d): {FFFFFF}%s",GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
        return 
0;
    }
    if ( 
PlayerInfo playerid ] [Admin ] == 4)
    {
      new 
String[128];
      if(
hide[playerid] == 0// Put it here.. less confusing.
      
{
        
format(Stringsizeof(String), "{996666}[MOD] {25A5A8}%s(%d): {FFFFFF}%s",GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
      }
      else
      {
      
format(Stringsizeof(String), "{%06x}%s: {FFFFFF}(%d): %s", (GetPlayerColor(playerid) >>> 8),GetName(playerid), playeridtext);
      
SendClientMessageToAll(-1,String);
      }
      return 
0;
    }
    if ( 
PlayerInfo playerid ] [Admin ] == 5)
    {
      new 
String[128];
      if(
hide[playerid] == 0// Put it here.. less confusing.
      
{
        
format(Stringsizeof(String), "{996666}[LEADER] {25A5A8}%s(%d): {FFFFFF}%s",GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
      }
      else
      {
      
format(Stringsizeof(String), "{%06x}%s: {FFFFFF}(%d): %s", (GetPlayerColor(playerid) >>> 8),GetName(playerid), playeridtext);
      
SendClientMessageToAll(-1,String);
      }
      return 
0;
    }
    if ( 
PlayerInfo[playerid][VIP] >= 1)
    {
        new 
String[128];
        
format(Stringsizeof(String), "{ff7109}[DONATOR] {7c459e}%s(%d): {FFFFFF}%s",GetName(playerid), playeridtext);
        
SendClientMessageToAll(-1,String);
        return 
0;
    }
    if ( 
PlayerInfoplayerid ][ Muted ] >= )
    {
        new 
str1[60];
        
formatstr1sizeof(str1), ""RED"ERROR: "GREY"You are still muted for %d seconds!"PlayerInfoplayerid ][ Muted ] );
        
SendClientMessageplayerid, -1str1 );
        return 
0;
    }
    
SetPlayerChatBubble(playeridtext0xFFFFFFFF35.0,7000);
    if(
text[0] == '#' && PlayerInfo[playerid][Admin] >= 1)
    {
        new 
string[256];
        
format(string,sizeof(string),"[ADMIN] %s(%d): %s",GetName(playerid),playerid,text[1]);
        
MessageToAdmins(COLOR_GREY,string);
        return 
0;
    }
    if(
text[0] == '!' && PlayerInfo[playerid][VIP] >= 1)
    {
        new 
string[256];
        
format(string,sizeof(string),"[DONATOR] %s(%d): %s",GetName(playerid),playerid,text[1]);
        
MessageToVips(green,string);
        return 
0;
    }
    return 
0;
 } 
+rep if you help me
Reply


Messages In This Thread
OnPlayerText - by anassmaroc - 23.09.2015, 18:09
Re: OnPlayerText - by thefirestate - 23.09.2015, 18:15
Re : OnPlayerText - by anassmaroc - 23.09.2015, 18:20
Re: OnPlayerText - by thefirestate - 23.09.2015, 18:23
Re : Re: OnPlayerText - by anassmaroc - 23.09.2015, 18:30
Re: OnPlayerText - by thefirestate - 23.09.2015, 18:40
Re : Re: OnPlayerText - by anassmaroc - 23.09.2015, 18:43
Re : OnPlayerText - by anassmaroc - 26.09.2015, 09:51
Re: OnPlayerText - by jlalt - 26.09.2015, 10:20
Re : Re: OnPlayerText - by anassmaroc - 26.09.2015, 10:27

Forum Jump:


Users browsing this thread: 2 Guest(s)