Sql & PVars
#2

Uh, try creating the function this way...

SetCharName(playerid, firstname, lastname)
{
put your save code in here and use firstname to save the first name and lastname to save the last name.

}

And then after you save both variables just call the function this way
SetCharName(playerid, firstnamevar, lastnamevar);


Like.. lets say that you use first dialog for firstname
save what the player entered in a variable

PHP код:
new name[2];
name[0] = "Jack"
and then show the second dialog, save what he entered in another variable, or use a 2d

PHP код:
name[1] = "Rickman" 
And when you call the function

PHP код:
SetCharName(playeridname[0], name[1]); 
the code that is under that function will run, you will probably put the save code there.

So if you've made the function this way
PHP код:
SetCharName(playeridfirstnamelastname
then you will use firstname to save name[0] which is jack, and lastname to save name[1] which is Rickman


and to combine them just use

PHP код:
format(stringsizeof(string), "%s_%s"firstnamelastname);
inside the function 
Reply


Messages In This Thread
Sql & PVars - by Lajko1 - 10.04.2017, 19:28
Re: Sql & PVars - by AndreiWow - 10.04.2017, 19:54
Re: Sql & PVars - by Lajko1 - 10.04.2017, 19:58
Re: Sql & PVars - by AndreiWow - 10.04.2017, 20:00
Re: Sql & PVars - by Lajko1 - 10.04.2017, 20:08
Re: Sql & PVars - by AndreiWow - 10.04.2017, 20:26
Re: Sql & PVars - by Lajko1 - 11.04.2017, 04:54

Forum Jump:


Users browsing this thread: 2 Guest(s)