[SOLVED] - 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: [SOLVED] (
/showthread.php?tid=149552)
[SOLVED] -
Jay. - 22.05.2010
Hi i've made some server connect messages with %d But theres a problem that i don't no how to fix
Heres my code
Код:
public OnPlayerConnect(playerid)
{
new string[64],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"***%s(%d) Has joined the server",pName);
SendClientMessageToAll(0xFFFF00FF,string);
GameTextForPlayer(playerid,"~W~The Definitive PGS",2000,3);
PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
return 1;
}
Right you see the (%d) Thats the players ID But
i tested it & This happends
Theres the problem you see it says ***Jay(265632) has connected to the server
Its ment to give the Players ID but it doesn't
If you no this problem please reply thanks.
Re: Connect Messages [problem] -
Jay. - 22.05.2010
Quote:
Originally Posted by Seif_
You're not putting the ID in your format. Use this:
format(string,sizeof string,"***%s(%d) Has joined the server",pName, playerid);
|
Ohhh dam, Wrong way round,
PS: Thanks seif.