
04-05-2010, 12:27 AM
|
|
o.o
|
 |
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
|
|
Quote:
Originally Posted by LoneAngelIbesu
Please use the PHP code tags, rather than the NPC code ones.
Your script doesn't have any kind of countdown mechanism. Here's some pseudo-code, just that I'm not doing everything for you.
PHP Code:
function onActionServerside(cmd, pl) {
switch(temp.cmd) {
case "jailplayer":
store jail time for player
switch to jail level
break;
case "countdown":
subtract 1 from jail time
break;
case "unjailplayer":
switch level
break;
}
}
//#CLIENTSIDE
function onPlayerEnters() { // There's probably a better way to do this
if player.level.name == jail level
set timer to 1
}
function onTimeout() {
if jail time is > 0
convert second to hh:mm:ss format and display
set timer to 1
else
set timer to 0
trigger "unjailplayer" serverside command
}
|
Everything should be serverside for a jail system (except the GP tools). |
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
|
|
|
|