#1

When regular member without a degree (admin) I'm write name + text. .. ' Ex: Quix [0]: Hello. And when I do I set no longer appears adminu, neither name nor text.

Код:
public OnPlayerText(playerid, text[])
{
if(stringContainsIP(text))
{
   format(strg, sizeof(strg), ""STEELBLUE"- AS - {%06x}%s(%d) "STEELBLUE"has been automatically kicked for advertising.", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid);
   SendClientMessageToAll(-1, strg);
   SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Your message has been blocked because it contains an IP. You have been kicked for advertising.");
SetTimerEx("KickPlayer", 100, false, "i", playerid);
return 0;
}
 
//----------------------
// Admin Chat
//----------------------
new str[128];
if(text[0] == '.' && PlayerInfo[playerid][Admin] >= 1)
{
format( str, sizeof(str), ""GREY"["ORANGE"AdminChat"GREY"] {%06x}%s(%d): "STEELBLUE"%s", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, text[1] );
for ( new i = 0; i < MAX_PLAYERS; i++ )
{
   if (IsPlayerConnected(i))
   {
if (PlayerInfo[i][Admin] >= 1)
{
SendClientMessage( i, -1, str );
}
}
}
return 0;
}
//-------------------
// Mute System
//-------------------
if ( PlayerInfo[ playerid ][ Muted ] >= 1 )
{
new str1[60];
format( str1, sizeof(str1), ""RED"ERROR: "GREY"You are still muted for %d seconds!", PlayerInfo[ playerid ][ Muted ] );
SendClientMessage( playerid, -1, str1 );
return 0;
}
//===============================================
new string[500];
switch (PlayerInfo[playerid][Admin])
{
   case 0: format(string, sizeof(string), "%s(%d): "WHITE"%s", GetName(playerid), playerid, text);
   case 1: format(string, sizeof(string), "%s "GREY"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text);
   case 2: format(string, sizeof(string), "%s "GREY"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text);
case 3: format(string, sizeof(string), "%s "TELEPORTBLUE"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text);
case 4: format(string, sizeof(string), "%s "RED"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text);
}
if (PlayerInfo[playerid][VIP] >= 1 && PlayerInfo[playerid][Admin] == 0)
{
   format(string, sizeof(string), "%s "PREMIUM"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text);
}
SendClientMessageToAll(GetPlayerColor(playerid), string);
SetPlayerChatBubble(playerid, text, 0xFFFFFFFF, 35.0,7000);
return 0;
}
Reply
#2

try this:
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;
}
 
//----------------------
// Admin Chat
//----------------------
new str[128];
if(
text[0] == '.' && PlayerInfo[playerid][Admin] >= 1)
{
formatstrsizeof(str), ""GREY"["ORANGE"AdminChat"GREY"] {%06x}%s(%d): "STEELBLUE"%s", (GetPlayerColor(playerid) >>> 8), GetNameplayerid ), playeridtext[1] );
for ( new 
0MAX_PLAYERSi++ )
{
   if (
IsPlayerConnected(i))
   {
if (
PlayerInfo[i][Admin] >= 1)
{
SendClientMessagei, -1str );
}
}
}
return 
0;
}
//-------------------
// Mute System
//-------------------
if ( PlayerInfoplayerid ][ Muted ] >= )
{
new 
str1[60];
formatstr1sizeof(str1), ""RED"ERROR: "GREY"You are still muted for %d seconds!"PlayerInfoplayerid ][ Muted ] );
SendClientMessageplayerid, -1str1 );
return 
0;
}
//===============================================
new string[500];
switch (
PlayerInfo[playerid][Admin])
{
   case 
0format(stringsizeof(string), "%s(%d): "WHITE"%s"GetName(playerid), playeridtext);
   case 
1format(stringsizeof(string), "%s "GREY"[%d]: {ABBBCB}%s"GetName(playerid), playeridtext);
   case 
2format(stringsizeof(string), "%s "GREY"[%d]: {ABBBCB}%s"GetName(playerid), playeridtext);
case 
3format(stringsizeof(string), "%s "TELEPORTBLUE"[%d]: {ABBBCB}%s"GetName(playerid), playeridtext);
case 
4format(stringsizeof(string), "%s "RED"[%d]: {ABBBCB}%s"GetName(playerid), playeridtext);
}
if (
PlayerInfo[playerid][VIP] >= && PlayerInfo[playerid][Admin] == 0)
{
format(stringsizeof(string), "%s "PREMIUM"[%d]: {ABBBCB}%s"GetName(playerid), playeridtext);
SendClientMessageToAll(GetPlayerColor(playerid), string);
SetPlayerChatBubble(playeridtext0xFFFFFFFF35.0,7000);
return 
0;
}
return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)