Variable - 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: Variable (
/showthread.php?tid=119633)
Variable -
TouR - 08.01.2010
Can somene show me how to save a variable
? I have read the dracoblue tutorial but not fully understood... can somene give an example
e.g: new tour[MAX_PLAYERS];
Re: Variable -
SiJ - 08.01.2010
Quote:
Originally Posted by tour15
Can somene show me how to save a variable ? I have read the dracoblue tutorial but not fully understood... can somene give an example
e.g: new tour[MAX_PLAYERS];
|
dUserSetInt(
Player Name Here).("Tour",tour[playerid]);
Hope it's what u asked for..
Re: Variable -
TouR - 08.01.2010
hmm realy thank you but i need some info more... will this save the variable if it's 1 or 0??
Re: Variable -
SiJ - 09.01.2010
Quote:
Originally Posted by tour15
hmm realy thank you but i need some info more... will this save the variable if it's 1 or 0??
|
if tour[playerid] is 0, it will same it as 0.. if tour[playerid] is for example 56416 it will save it as 56416.. :P
Re: Variable -
TouR - 09.01.2010
and where do i paste this?
Re: Variable -
SiJ - 09.01.2010
Quote:
Originally Posted by tour15
and where do i paste this?
|
Where u want it to save tour[playerid] to the file..
If u use tour[playerid] for tutorial or something, add
dUserSetInt(Player Name Here).("Tour",1);
at the end of tutorial (that would mean that player has viewed tutorial), and at the start use:
pawn Код:
//at player spawn
tour[playerid] = dUserINT(Player Name Here).("Tour");
// at tutorial start
if(tour[playerid] = 0)
{
//start tutorial
}
else
{
//skip tutorial
}
Hope this helps..
Re: Variable -
Miguel - 09.01.2010
Quote:
Originally Posted by tour15
and where do i paste this?
|
I laughed a lot when I read this. Why don't you try making it yourself, you'll learn a lot, just more than just copying and pasting.
Re: Variable -
TouR - 10.01.2010
i dont know good english you laugh boy.... If you dont want to help just dont reply... Smart guy hahahaah i laughed with myself too it was hilarious.... BTW thank you sij it help me a lot... thank you for your time