Variable
#1

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];
Reply
#2

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..
Reply
#3

hmm realy thank you but i need some info more... will this save the variable if it's 1 or 0??
Reply
#4

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
Reply
#5

and where do i paste this?
Reply
#6

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..
Reply
#7

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.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)