Question And Error.. -
Buzzbomb - 24.02.2012
Okay So Far i Want the players name And Id to show in there text.. k Well it works It shows Buzzbomb(0): BLahh
But When i get More then 3 Players or More My name Turns into Buzzbomb: BLAHH
Here my Code
pawn Код:
if(ChatSystem == 1)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%d): %s",pName,playerid,text);
SendClientMessageToAll(WHITE,str);
return 0;
}
I have alot others and Ive done research and wiki and Im getting confused half the time i want to rip my eyes out...
Please help me before i lose My eye sight..
Re: Question And Error.. -
KreeDz - 24.02.2012
The code looks alright. Make sure there is no other chat system that interferes with this one.
Re: Question And Error.. -
Buzzbomb - 27.02.2012
I have These But Would they be causing problems
pawn Код:
public OnPlayerText(playerid, text[])
{
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(AdminOn == 0)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
SendClientMessageToAll(RED,str);
ChatSystem = 0;
return 0;
}
else if(PlayerInfo[playerid][pMechTeam] == 5)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
SendClientMessageToAll(BROWN,str);
ChatSystem = 0;
return 0;
}
else if(PlayerInfo[playerid][pMedicTeam] == 4)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
SendClientMessageToAll(PINK,str);
ChatSystem = 0;
return 0;
}
else if(PlayerInfo[playerid][pPoliceTeam] == 3)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
SendClientMessageToAll(LIGHTBLUE,str);
ChatSystem = 0;
return 0;
}
else if(PlayerInfo[playerid][pFireTeam] == 2)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%i):{FFFFFF} %s",pName,playerid,text);
SendClientMessageToAll(LIGHTRED,str);
ChatSystem = 0;
return 0;
}
}
if(ChatSystem == 1)
{
new pName[MAX_PLAYER_NAME],str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"%s(%i): %s",pName,playerid,text);
SendClientMessageToAll(WHITE,str);
return 0;
}
return 1;
}
Re: Question And Error.. -
Buzzbomb - 29.02.2012
It would be nice if Someone would respond..
Re: Question And Error.. -
Mike_Peterson - 29.02.2012
So uhhm, what exactly is the problem? the disappearing (0)?
Re: Question And Error.. -
Buzzbomb - 29.02.2012
Um yeah and other names..