Posts: 561
Threads: 27
Joined: Sep 2012
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
?
Posts: 449
Threads: 125
Joined: Apr 2013
Reputation:
0
Paste all your onplayertext here please.
Posts: 561
Threads: 27
Joined: Sep 2012
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;
}
Posts: 561
Threads: 27
Joined: Sep 2012
//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
Posts: 561
Threads: 27
Joined: Sep 2012
Worked, with Brackets.
Thanks, +Rep !
Posts: 152
Threads: 24
Joined: Jan 2014
Reputation:
0
Hello KillerDVX, the problem wasn't the brackets. The problem is that you don't writed return 0.