Other player's 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: Other player's id (
/showthread.php?tid=84374)
Other player's id -
Marc_307 - 30.06.2009
Hi, I wanted to ask how to send a message to all other players except to yourself.
pawn Код:
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "*** %s has joined the server.", pName);
SendClientMessageToAll(GREY, string);//not for all, only for all the others
return 1;
}
How can I do this?
Is there something like "playerid" e.g. "otherids"?
Or another trick?
Re: Other player's id -
dice7 - 30.06.2009
Something like this
pawn Код:
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "*** %s has joined the server.", pName);
for (new a = 0 ; a < MAX_PLAYERS ; a++)
{
if (a != playerid)
{
SendClientMessage(a,GREY, string);//not for all, only for all the others
}
}
return 1;
}
Re: Other player's id -
Marc_307 - 11.07.2009
Thank's it works.