[SOLVED]
#1

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.






Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)