Strings
#5

Strings work like this:

Say that you want to make a DIALOG that says Welcome back to the server (Playername).

What you're going to do is:

Код:
new string[128], name[MAX_PLAYER_NAME];

GetPlayerName(playerid, name, sizeof(name));

format(string, sizeof(string), "Welcome back to the server, %s", name);

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Server Name", str, "Login", "Cancel");
Make sure you always use [128] as your string because using [256] or any long length is just waste of memory.
Reply


Messages In This Thread
Strings - by Bek_Loking - 18.06.2014, 14:35
Re: Strings - by Konstantinos - 18.06.2014, 14:40
Re: Strings - by Rittik - 18.06.2014, 14:44
Re: Strings - by Bek_Loking - 18.06.2014, 14:47
Re: Strings - by Chillstep - 18.06.2014, 14:54

Forum Jump:


Users browsing this thread: 1 Guest(s)