Prefixes. - 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: Prefixes. (
/showthread.php?tid=664577)
Prefixes. -
Lixyde - 04.03.2019
I think i made everything right, but there is something NOT right.
I made so when i rcon log it will show:
[Rcon Admin] name[ID:0]: text
and when you are default
name[ID:0]: text
But it doesnt work.. It shows (name[ID:0] text) even if im Rcon logged.
Photo:
Click Here
Code:
Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{
new string[250];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{05FF00}%s{FFFFFF}[ID: %d]: %s", pName, playerid, text);
SendClientMessageToAll(0xFEFEFEFF, string);
return 0;
}
if(IsPlayerAdmin(playerid))
{
new string[250];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{00FF0A}[{FFFFFF}RCON Admin{00FF0A}]{FF0A00}%s{FFFFFF}[ID: %d]: %s", pName, playerid, text);
SendClientMessageToAll(0xFEFEFEFF, string);
return 0;
}
return 1;
}
Thanks.
Re: Prefixes. -
RoboN1X - 04.03.2019
Because you are still pAdmin >= 0 and you return the message there.
Put the RCON admin code before that.
Also please just use 144 for the string size,
ClientMessage output max is 144 characters and player text input max is 128 characters...