View Single Post
  #6  
Old 04-04-2010, 07:13 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to 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(cmdpl) {
  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

__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote