ReadMyTextQ Not showing ID? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ReadMyTextQ Not showing ID? (
/showthread.php?tid=130130)
ReadMyTextQ Not showing ID? -
Torran - 25.02.2010
pawn Код:
stock ReadMyTextQ(playerid,color,format2[],output[])
{
for(new i=0; i<GetMaxPlayers(); i++)
if(IsPlayerAdmin(i))
{
new string[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s ** %s (%s): %s", format2, name, playerid, output);
SendClientMessage(i, color, string);
SendClientMessage(playerid, color, "Your question has been sent to all online admins");
}
}
Ingame it appears
Server Question ** Torran (): Test question
Which it should, But the players id is missing, Why is this?
Re: ReadMyTextQ Not showing ID? -
smeti - 25.02.2010
delete No comment.
Re: ReadMyTextQ Not showing ID? -
Torran - 25.02.2010
Quote:
Originally Posted by Phento
What do you want to bring out from him?
|
What do you mean by that?
Re: ReadMyTextQ Not showing ID? -
Correlli - 25.02.2010
Quote:
Originally Posted by Torran
pawn Код:
format(string, sizeof(string), "%s ** %s (%s): %s", format2, name, playerid, output);
|
playerid is an integer, not string, so use
%i or
%d
Re: ReadMyTextQ Not showing ID? -
Torran - 25.02.2010
Lol i forgot about that :P yeah ty
Re: ReadMyTextQ Not showing ID? -
smeti - 25.02.2010
delete
Re: ReadMyTextQ Not showing ID? -
Torran - 25.02.2010
Quote:
Originally Posted by Phento
Quote:
Originally Posted by Torran
pawn Код:
stock ReadMyTextQ(playerid,color,format2[],output[]) { for(new i=0; i<GetMaxPlayers(); i++) if(IsPlayerAdmin(i)) { new string[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s ** %s (%s): %s", format2, name, playerid, output); SendClientMessage(i, color, string); SendClientMessage(playerid, color, "Your question has been sent to all online admins"); }
|
5 Online rcon admin
5 *
pawn Код:
SendClientMessage(playerid, color, "Your question has been sent to all online admins");
10 online rcon admin
10 *
pawn Код:
SendClientMessage(playerid, color, "Your question has been sent to all online admins");
|
What are you on about? Anyway i fixed this