Problem with name's - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with name's (
/showthread.php?tid=109961)
Problem with name's -
breakpaper - 23.11.2009
Код:
If i connect to my server there stands:
Player logged in (level: [level])
So there stands nothing after Player!
no name or something!
this is the Code:
[pawn]format(string, sizeof(string), "** Player %s has been logged in (level: %d) **", PlayerName[playerid], PlayerInfo[playerid][pLevel]);
the same with:
pawn Код:
format(string, sizeof(string), "** Welcome %s(%d) to: BadCrime - Streets of San Andreas **", PlayerName[playerid], playerid);
but the biggest problem is with the login/register system!
the filename is nothing!
Re: Problem with name's -
ExoSanty - 23.11.2009
where is this line:
[pawn]format(string, sizeof(string), "** Player %s has been logged in (level: %d) **", PlayerName[playerid], PlayerInfo[playerid][pLevel]);
probably somewhere where "playerid" isn't defined... ?
Re: Problem with name's -
Joe Staff - 23.11.2009
PlayerName[] has to be given a string for it to return a string.
under OnPlayerConnect, add
pawn Код:
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid,PlayerName[playerid],MAX_PLAYER_NAME);
//Your code here
}
Re: Problem with name's -
breakpaper - 23.11.2009
Thanks joe,
i forget to do that!
Re: Problem with name's -
patchkinson - 23.11.2009
hehe