onPlayerConnect
#1

on Player Connect in PPC_Trucking
it says
format(NewPlayerMsg, 128, TXT_PlayerJoinedServer, Name, playerid);
SendClientMessageToAll(0xFFFFFFFF, NewPlayerMsg);
But When I delete That And I put
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
I get Errors Any Help?
PS: I want it To Say Playname Has Join Trucking City!
Reply
#2

what's the error ?
Reply
#3

pawn Код:
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
//to
format(string,sizeof(string),"%s has joined the server. Welcome!",pName);
Reply
#4

pawn Код:
public OnPlayerConnect(playerid)
{
    new plrname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plrname, sizeof(plrname));
    new string[64];
    format(string, sizeof(string), "%s has joined the server!", plrname);
    SendClientMessageToAll(0xFFFFFFAA, string);
    return 1;
}
Reply
#5

pawn Код:
public OnPlayerConnect(playerid)
{
    new string[256], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string, sizeof string,"Player {FF0000}%s {FFFFFF}has joined the server!", pName);
    SendClientMessageToAll(0xFFFFFFFF, string);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)