View Single Post
  #1  
Old 10-22-2011, 03:32 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Jail Script Help

Hello, I am working on a jail system, Iv'e made the staff bit where you chose who, the reason, the hours, the minutes and the seconds it works as this.
PHP Code:
client.reason = "whatever the staff member chooses";
client.hours = "whatever the staff member chooses";
client.minutes = "whatever the staff member chooses";
client.seconds = "whatever the staff member chooses"; 
And now comes the daunting task of making the time decrease properly.
I am pretty much stuck on this bit, each way I attempt to have a crack at it, it just screws up/doesn't function properly.
This is all I have got so far but i am pretty sure if more than one person is jailed the server side this.whatevers will change and screw it all up.
PHP Code:
function onActionServerSide(){
if(
params[0] == "jailcheck"){
if(
client.hours > 0 || client.minutes > 0 || client.seconds > 0){
client.jailed = 1;
}else{
client.jailed = 0;
}
this.hours = params[1];
this.minutes = params[2];
this.seconds = params[3];
}
}
//#CLIENTSIDE
function onCreated(){
onTimeout();
}
function 
onTimeout(){
triggerserver("weapon", this.name, "jailcheck", client.hours, client.minutes, client.seconds);
settimer(1);
} 
PS Its in a weapon added to all players.
Any suggestions are welcome
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote