View Single Post
  #7  
Old 03-24-2011, 11:34 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Astram View Post
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.
__________________
Reply With Quote