Need Help please.
#1

Hello i need a little bit help.
This is the code.
public OnPlayerText
PHP код:
            if(team[playerid] == TEAM_HUMAN)
            {
            
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playeridtext);
              
SendPlayerMessageToAll(playerid,stringbig);
              }
            if(
team[playerid] == TEAM_ZOMBIE)
            {
            
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playeridtext);
              
SendPlayerMessageToAll(playerid,stringbig); 
I make this but when chat he show : arlindi [GAME](0): bla bla bla
I want to make it to :[GAME]arlidni(0): bla bla bla
Please help mee.
Reply
#2

AnyOne?
Reply
#3

Bump. Anyone ?
Reply
#4

Try this
PHP код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME]%s(%d): {FFFFFF}%s",pName,playeridtext); SendPlayerMessageToAll(playerid,stringbig); 
Reply
#5

But he show meee

Arlindi:[GAME]Arlindi(0): bla bla bla
I want to remove name in first
Reply
#6

Public OnPlayerText(playerid);
{
//your code
}
show me Your OnPlayerText All Code
Reply
#7

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
GetPVarInt(playerid"SPS Muted") == 0)
    {
        
SetPVarInt(playerid"SPS Messages Sent"GetPVarInt(playerid"SPS Messages Sent") + 1);
        
SetTimerEx("SPS_Remove_Messages_Limit"15000"i"playerid);

        if(
GetPVarInt(playerid"SPS Messages Sent") >= 4)
        {
            if(!(((
GetPVarInt(playerid"SPS Spam Warnings") + 2) == 3)))
            {
                
SendClientMessage(playerid, -1""chat""COL_LIGHTBLUE" Please, do not spam.");
            }
            
SetPVarInt(playerid"SPS Spam Warnings"GetPVarInt(playerid"SPS Spam Warnings") + 1);
        }

        if(
pInfo[playerid][pLogged] == 1)
        {
            new 
stringbig[356];
            if(
pInfo[playerid][IsPlayerMuted] == 1) {
                
SendClientMessage(playerid,-1,""chat" You are muted");
                return 
0;
            }
            if(
team[playerid] == TEAM_HUMAN)
            {
            
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playeridtext);
              
SendPlayerMessageToAll(playerid,stringbig);
              }
            if(
team[playerid] == TEAM_ZOMBIE)
            {
            
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playeridtext);
              
SendPlayerMessageToAll(playerid,stringbig);
              }
            {
                
SetPlayerChatBubble(playeridtext0xFF0000FF100.010000);
            }
        }
    }
    else
    {
        
SendClientMessage(playerid, -1""chat""COL_LIGHTBLUE" You are muted, you can't talk.");
        return 
0;
    }
    return 
0;

Reply
#8

._.

Use SendClientMessageToAll

pawn Код:
new pName[24];
GetPlayerName(playerid, pName, sizeof (pName));
if(team[playerid] == TEAM_HUMAN)
{  
    format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME]%s(%d): {FFFFFF}%s", pName, playerid, text);
    SendClientMessageToAll(playerid, -1, stringbig);
}
if(team[playerid] == TEAM_ZOMBIE)
{
    format(stringbig, sizeof(stringbig), ""COL_WHITE"[GAME]%s(%d): {FFFFFF}%s", pName, playerid, text);
    SendClientMessageToAll(playerid, -1, stringbig);
}
Reply
#9

pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);          
if(team[playerid] == TEAM_HUMAN)
            {
              format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME]%s(%d): {FFFFFF}%s",pName,playerid, text);
              SendPlayerMessageToAll(playerid,stringbig);
              return 0;
              }
 if(team[playerid] == TEAM_ZOMBIE)
            {
              format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME]%s(%d): {FFFFFF}%s",pName,playerid, text);
              SendPlayerMessageToAll(playerid,stringbig);
              return 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)