03.07.2013, 22:42
I'm trying to set a players name as (just as an example)
So, for example, if I was to talk, it'd go like this:
I tried using
but it doesn't work in OnPlayerConnect() callback apparently. Or am I just not using it right?
Quote:
(1) iPoisonxL |
Quote:
(1) iPoisonxL: hi! |
Код:
SetPlayerName();
pawn Код:
new namelogon[100];
new newplayername[100];
public OnPlayerConnect(playerid)
{
new logonmsg[100];
GetPlayerName(playerid, namelogon, sizeof(namelogon));
format(newplayername, sizeof(newplayername), "(%d) %s", playerid, namelogon);
SetPlayerName(playerid, newplayername); //here i try to set the player name
format(logonmsg, sizeof(logonmsg), "(%d) %s has joined the server. Say hi!", playerid, namelogon);
SendClientMessageToAll(GREEN, logonmsg);
return 1;
}