Need Help please. -
arlindi - 27.07.2014
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",playerid, text);
SendPlayerMessageToAll(playerid,stringbig);
}
if(team[playerid] == TEAM_ZOMBIE)
{
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playerid, text);
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.
Re: Need Help please. -
arlindi - 27.07.2014
AnyOne?
Re: Need Help please. -
arlindi - 27.07.2014
Bump. Anyone ?
Re: Need Help please. -
MBilal - 27.07.2014
Try this
PHP код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME]%s(%d): {FFFFFF}%s",pName,playerid, text); SendPlayerMessageToAll(playerid,stringbig);
Re: Need Help please. -
arlindi - 27.07.2014
But he show meee
Arlindi:[GAME]Arlindi(0): bla bla bla
I want to remove name in first
Re: Need Help please. -
MBilal - 27.07.2014
Public OnPlayerText(playerid);
{
//your code
}
show me Your OnPlayerText All Code
Re: Need Help please. -
arlindi - 28.07.2014
PHP код:
public OnPlayerText(playerid, text[])
{
if(GetPVarInt(playerid, "SPS Muted") == 0)
{
SetPVarInt(playerid, "SPS Messages Sent", GetPVarInt(playerid, "SPS Messages Sent") + 1);
SetTimerEx("SPS_Remove_Messages_Limit", 1500, 0, "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",playerid, text);
SendPlayerMessageToAll(playerid,stringbig);
}
if(team[playerid] == TEAM_ZOMBIE)
{
format(stringbig,sizeof(stringbig),""COL_WHITE"[GAME](%d): {FFFFFF}%s",playerid, text);
SendPlayerMessageToAll(playerid,stringbig);
}
{
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
}
}
}
else
{
SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" You are muted, you can't talk.");
return 0;
}
return 0;
}
Re: Need Help please. -
Stinged - 28.07.2014
._.
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);
}
Re: Need Help please. -
GShock - 28.07.2014
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;