need help with onplayerconnect... - 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)
+--- Thread: need help with onplayerconnect... (
/showthread.php?tid=304147)
need help with onplayerconnect... -
niels44 - 17.12.2011
hey guys,
i want to make it that when a player joins the server it says this:
Код:
SendClientMessageToAll(playerid,"{FFFF00}Player {AA3333}i& {FFFF00}has Joined {AA3333}TDC");
but the i& isn't working... i want it that i& is the name of the person... so can anyone help me?
niels
Re: need help with onplayerconnect... -
0x80808000 - 17.12.2011
pawn Код:
public OnPlayerConnect(playerid){
new name[MAX_PLAYER_NAME], string[83];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, 83, "{FFFF00}Player {AA3333}%s {FFFF00}has Joined {AA3333}TDC", name);
SendClientMessageToAll(-1, string);
return 1;
}
Re: need help with onplayerconnect... -
Kostas' - 17.12.2011
Name isn't integer.
pawn Код:
public OnPlayerConnect(playerid)
{
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FFFF00}%s {AA3333}i& {FFFF00}has Joined {AA3333}TDC",pName);
SendClientMessageToAll(-1, string);
return 1;
}
Re: need help with onplayerconnect... -
niels44 - 17.12.2011
thnx guys it works
Re: need help with onplayerconnect... -
Kostas' - 17.12.2011
Your Welcome!
Re: need help with onplayerconnect... -
niels44 - 17.12.2011
btw kostas join my server XD it is only temporary online but join and see it XD: 86.88.158.170:7777 (ITS NOT HOSTED so it isnt online 24/7)