Quote:
Originally Posted by Astram
So
Astram.("Jailed_"@player.account@"time_"@params[1]);
would this work?
|
You need to go back to square one. A variable has a value.
Think of it like a variable in math.
PHP Code:
x = 5;
echo(x); // echoes 5, because x is 5
y = 2;
echo(x + y); // echoes 7, because x + y is the same as 5 + 2
x = 3;
echo(x); // now echoes 3, because x now equals y
My suggestion would be to use the player's account as the variable name and the time they will be released as the value.
PHP Code:
function jailPlayer(acc, timeToRelease) {
// use timevar2 for timeToRelease
Astram.jail.(@ acc) = timeToRelease;
}
I strongly recommend you go read one of
these tutorials or check out
this website.