31.12.2009, 08:17
can someone tell me how to save a variable
? e.g new clan[MAX_PLAYERS];

Originally Posted by tour15
can someone tell me how to save a variable
![]() |
new clan[MAX_PLAYERS]; // Ontop of your script
// And when you wanna set the player to that, either with command or with a public function w/e;
clan[playerid] = 1; // Wherever you want to set the player to this
// And If you wanna check that, wherever, use this;
if((clan[playerid]==1)){
// do w/e
}else{
// do w/e if he's not
return 1;
}
Originally Posted by mavtias
Quote:
pawn Код:
|
Originally Posted by Don Correlli
Quote:
|
Originally Posted by mavtias
Well, my code does save It the way he asked for, not the way you suggested.
It's saved until he disconnects, in the variable without scriptfiles.... |
Originally Posted by Don Correlli
Quote:
|
Originally Posted by mavtias
Quote:
He showed us the way he'd like to use It, and I made an example how he can do It the way he asked for. |
Originally Posted by mavtias
Well, you don't save It in scriptfiles the way he showed us. Maybe he meant "store" temporarily, because I was just finishing his example, how to use it.
|
Originally Posted by Donny
Quote:
|
Originally Posted by tour15
hey guys the thing i meant is that i want to temporary save it... how can i make when a player disconect save the variable?
|
Originally Posted by tour15
i want to use this forever sorry for my bad english
![]() |