OnPlayerText (Small bug) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerText (Small bug) (
/showthread.php?tid=399189)
OnPlayerText (Small bug) -
Lz - 13.12.2012
my script:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[pAdmin][playerid] != 5)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "[DIRECTOR] %s(%i):%s", name,playerid,text);
SendPlayerMessageToAll(playerid, admintext);
return 0;
}
}
It should be sending
[DIRECTOR] Bamf(0): testing
but its sending
Bamf:[DIRECTOR] Bamf(0): testing
(Returned 0 to send custom text)
Re: OnPlayerText (Small bug) -
RajatPawar - 13.12.2012
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pAdmin] != 5)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "[DIRECTOR] %s (%i): %s", name,playerid,text);
SendPlayerMessageToAll(-1, admintext);
return 0;
}
}
Try this.
Re: OnPlayerText (Small bug) -
Lz - 13.12.2012
Quote:
Originally Posted by Rajat_Pawar
pawn Код:
public OnPlayerText(playerid, text[]) { if(PlayerInfo[playerid][pAdmin] != 5) { new admintext[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof (name)); format(admintext, sizeof (admintext), "[DIRECTOR] %s (%i): %s", name,playerid,text); SendPlayerMessageToAll(-1, admintext); return 0; } }
Try this.
|
This makes it just
Bamf: hi
Thanks though
Re: OnPlayerText (Small bug) -
[HK]Ryder[AN] - 13.12.2012
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[pAdmin][playerid] != 5)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "[DIRECTOR] %s(%i):%s", name,playerid,text);
SendClientMessageToAll(-1, admintext);
return 0;
}
}