problems with getplayername - 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: problems with getplayername (
/showthread.php?tid=251263)
nvmm -
bogdan.trial - 26.04.2011
nvmm
Re: problems with getplayername -
sebacol - 26.04.2011
new name[64];
new text[1042];
GetPlayerName(playerid, name, sizeof(name));
format(text, sizeof(text), "Welcome to Bogdan's Stunt server. \n\n{FBFF00}Name: %s{FFFFFF}\n\nPlease enter your password below in order to register: \n", name);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register an account", text, "Register", "Close");
that's 1 example
Re: problems with getplayername -
Alby Fire - 26.04.2011
Quote:
Originally Posted by sebacol
new text[1042];
|
What the hell is that?
1042 cells for a format where 100 or 120 cells are more than enaugh?
You should really read this thread...
Why you shouldn't make your strings 256 cells big
@bogdan.trial use his code but instead of this
pawn Код:
new name[64];
new text[1042];
Use this
Re: problems with getplayername -
bogdan.trial - 26.04.2011
d:\Games\ROCKST~1\GTASAN~2\Server\GAMEMO~1\Registe r.pwn(106) : warning 204: symbol is assigned a value that is never used: "Name"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
i got this warning
Re: problems with getplayername -
DeadAhead - 26.04.2011
Change the name variable to namez or something.
new
namez[24],
text[120];
Код:
GetPlayerName(playerid, namez, sizeof(namez));
format(text, sizeof(text), "Welcome to Bogdan's Stunt server. \n\n{FBFF00}Name: %s{FFFFFF}\n\nPlease enter your password below in order to register: \n", namez);
Edit: Info, that warrning says there is already a name varaible in your script
Re: problems with getplayername -
bogdan.trial - 26.04.2011
nvmm
Re: problems with getplayername -
HyperZ - 26.04.2011
Check this:
https://sampwiki.blast.hk/wiki/GetPlayerName