[Help]with a command - 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: [Help]with a command (
/showthread.php?tid=133506)
[Help]with a command -
Dragonshade - 12.03.2010
pawn Код:
if (strcmp(cmd, "/helpers", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_LAWNGREEN, "____________|Tw-Rp Helpers Online|____________");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Helper %d",PlayerInfo[i][pAdmin], sendername,i);
SendClientMessage(playerid, 0x99CCCCAA, string);
}
}
}
}
return 1;
}
How Do I Make It Show The Name After Helper
"format(string, 256, "Helper %d",PlayerInfo[i][pAdmin], sendername,i);"
Re: [Help]with a command -
Mike Garber - 12.03.2010
pawn Код:
format(string, 256, "Helper %s", sendername);
SendClientMessage(playerid, 0x99CCCCAA, string);
%d is only for numbers. %s is what you should use.
Re: [Help]with a command -
Dragonshade - 12.03.2010
Thank You Very Much!