A lot of space beetwen my texts? -
KillerDVX - 10.06.2015
Hi guys i just did that script :
PHP код:
new string[128];
if(AdminLevel[playerid] == 1)
{
format(string,sizeof(string),"%s {8B0000}[Administrateur]{FFFFFF}: %s",pname,text);
SendClientMessageToAll(COLOR_WHITE,string);
return 0;
}
Under the OnPlayerText,
But i leaves a lot of space when i send a text in Game :
What should i do

?
Re: A lot of space beetwen my texts? -
buburuzu19 - 10.06.2015
Paste all your onplayertext here please.
Re : A lot of space beetwen my texts? -
KillerDVX - 10.06.2015
PHP код:
PUBLIC:OnPlayerText(playerid, text[])
{
new pname[24];
GetPlayerName(playerid,pname,sizeof(pname));
//Le chat Bubble
if(AdminLevel[playerid] < 1)
{
SetPlayerChatBubble(playerid, text, 0xFF0000AA, 100.0, 10000);
return 1;
}
//Le test du reaction
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false))
{
new
string[128],
pName[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "« \%s[%d]\" a rйussi au test du rйaction. »", pName,playerid);
SendClientMessageToAll(GREEN, string);
format(string, sizeof(string), "« Vous recevez $%d + %d score et points pour rйussir au test du rйaction. »", xCash, xScore);
SendClientMessage(playerid, GREEN, string);
GivePlayerMoney(playerid, xCash);
SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
xTestBusy = false;
}
}
}
//Tchat Message
new string2[1024];
if(AdminLevel[playerid] < 1)
format(string2,sizeof(string2),"{%06x}%s[%d]: {FFFFFF}%s",GetPlayerColor(playerid) >>> 8,pname,playerid,text);
SendSplitMessageChat(COLOR_WHITE,string2);
//Faction des Administrateurs
new string[128];
if(AdminLevel[playerid] == 1)
{
format(string,sizeof(string),"%s {8B0000}[Administrateur]{FFFFFF}: %s",pname,text);
SendClientMessageToAll(COLOR_WHITE,string);
return 0;
}
return 0;
}
Re: A lot of space beetwen my texts? -
Konstantinos - 10.06.2015
pawn Код:
if(AdminLevel[playerid] < 1)
format(string2,sizeof(string2),"{%06x}%s[%d]: {FFFFFF}%s",GetPlayerColor(playerid) >>> 8,pname,playerid,text);
SendSplitMessageChat(COLOR_WHITE,string2);
If the level is >= 1, it won't format the text so basically "string2" is empty. The SendSplitMessageChat might not check about 0 length and send an empty message. For more than 1 function in a statement, use brackets {}.
Re : A lot of space beetwen my texts? -
KillerDVX - 10.06.2015
//Faction des Administrateurs
new string[128];
if(AdminLevel[playerid] == 1)
{
format(string,sizeof(string),"%s {8B0000}[Administrateur]{FFFFFF}: %s",pname,text);
SendClientMessageToAll(COLOR_WHITE,string);
return 0;
}
This is the code for Administrator xD
Here where's the problem
Re : A lot of space beetwen my texts? -
KillerDVX - 10.06.2015
Worked, with Brackets.
Thanks, +Rep !
Re: A lot of space beetwen my texts? -
DarkLouis - 10.06.2015
Hello KillerDVX, the problem wasn't the brackets. The problem is that you don't writed return 0.