11.04.2014, 22:59
Iam creating my jail system, and i have encountered a problem...
I cant set a jail time on the player that i jailed, i can teleport him to the jail and set the variable to jail him or to stop policeman of jailing again, but cant create something that counts time and unjails...
I really apreciate all the help that the comunity is providing!
all i have done is:
And i cant seem to find a way for the player to do a Command like /checktime, and checking the remaining time.. i also need help on that...
Please, any advice on how i program and how to improve are always welcome!
Best Regards Sagoza
I cant set a jail time on the player that i jailed, i can teleport him to the jail and set the variable to jail him or to stop policeman of jailing again, but cant create something that counts time and unjails...
I really apreciate all the help that the comunity is providing!
all i have done is:
Код:
forward jailtime(playerid); CMD:arrest(playerid, params[]) { if(isnull(params)) { SendClientMessage(playerid, -1, "[{0000FF}PSP{FFFFFF}]: /cuff [ID]"); } else { if ((GetPVarInt(playerid, "pJail")) == 0) { new player; new agente[128]; player = strval(params); new playername[128]; new Float:XX1, Float:YY1, Float:ZZ1; GetPlayerPos(player, XX1, YY1, ZZ1); if (IsPlayerInRangeOfPoint(playerid, 6.0, XX1, YY1, ZZ1)) { if ((GetPVarInt(player, "pCuffed")) == 1) { new vehid = (GetPlayerVehicleID(player)); if (GetVehicleModel(vehid) == 596) { SetPlayerInterior(player, 6); SetPlayerPos(player, 263.7470,77.5717,1001.0391); GetPlayerName(player, playername, sizeof(playername)); GetPlayerName(playerid, agente, sizeof(agente)); format(playername, sizeof(playername), "[{0000FF}PSP{FFFFFF}]: You have arrested {99FF00}%s{FFFFFF} ", playername); SendClientMessage(playerid, -1, playername); format(agente, sizeof(agente), "[{0000FF}PSP{FFFFFF}]: The Police officer {0000FF}%s{FFFFFF} Arrested you for 3 minutes", agente); SendClientMessage(player, -1, agente); SetTimerEx("jailtime", 60000, "i", player); } else { SendClientMessage(playerid, -1, "ASDASD"); } } else { SendClientMessage(playerid, -1, "[{0000FF}PSP{FFFFFF}]: You cant arrest someone that is not cuffed Do /cuff [ID]"); } } else { SendClientMessage(playerid, -1, "[{0000FF}PSP{FFFFFF}]: You are not close enough from the player to arrest him!"); } } else { SendClientMessage(playerid, -1, "[{0000FF}PSP{FFFFFF}]: O {99FF00}%s{FFFFFF} Has already been jailed!"); } } return 1; } public jailtime(playerid) { SendClientMessage(player, -1, "Yo Out!!"); return 1; }
Please, any advice on how i program and how to improve are always welcome!
Best Regards Sagoza