Chat help - 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: Chat help (
/showthread.php?tid=324718)
Chat help -
[XS]Scarface - 10.03.2012
hey guys i got a gm that doesn't allow long chat... i mean like if a player types a lot it gets divided to 2 lines ...
so i need to expand the chat at first
2nd : is there any way to make player id before the ":" like "scarface (0) : text"
so please if you help me it would be great!
Re: Chat help -
Calgon - 10.03.2012
You can only type 128 characters per line in SA-MP, it is the maximum limit.
As for your second question,
this should be appropriate, but your chat lines will not split automatically.
Re: Chat help -
[XS]Scarface - 10.03.2012
yes thanx for the 2nd
but how to make it all in 1line? i saw a server has only 1 long line
Re: Chat help -
thimo - 10.03.2012
Well i dont know where you saw that then but... Anyway you can use strlen i think to get the lenght and if its bigger then a certain amount you can use a second line
Re: Chat help -
[XS]Scarface - 10.03.2012
hmm okay :/ can u help me with this please?
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 0)
{
new bool:First2 = false;
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][Level] > 0)
Count++;
if(Count == 0)
return SendClientMessage(playerid,red, "No admins online.");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][Level] > 0)
{
if(AccInfo[i][Level] > 0)
{
switch(AccInfo[i][Level])
{
case 1: AccType = "Tester";
case 2: AccType = "Mod";
case 3: AccType = "Admin";
case 4: AccType = "{05BDFA}Leader{FF0000}";
case 5: AccType = "{05BDFA}Manager/Owner{FF0000}";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "{05BDFA}Online admins:{FF0000} %s [%s]", PlayerName2(i),AccType);
First2 = true;
}
else format(string,sizeof(string),"%s, %s [%s]",string, PlayerName2(i),AccType);
}
return SendClientMessage(playerid,red,string);
}
else return ErrorMessages(playerid, 1);
}
please i want when more than 2admins online the others look on other line is it possible?