need help with onplayerconnect...
#1

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
Reply
#2

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;
}
Reply
#3

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;
}
Reply
#4

thnx guys it works
Reply
#5

Your Welcome!
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)