Jump to content
  • 0

pomoc Jail


Kvostyc

Dotaz

Zdravíčko,

 

Mám problém keď dám "/jail 0 1 Test" Tak ma to dá na poziciu aj všetko, ale ten timer vynasobí čas*60000 a keď tam dám 1 tak by sa to malo vynasobiť 60000 a to je 1 minuta, ale problém je vtom, že ked tam dám tu 1 minutu tak ma to za tu 1minutu neprepustí

 

Kod:

 

CMD:jail(playerid,params[])
{
new cas, dovod;
if(pInfo[playerid][pAdminLevel] < 0)return 0;
if(!IsPlayerConnected(JailID))return SendClientMessage(playerid,CERVENA,"[ ! ]{f0f0f0}Hráč so zadaným ID nieje online");
if(sscanf(params,"udz",JailID,cas,dovod))return SendClientMessage(playerid,CERVENA,"[ ! ]Použi: {f0f0f0}/Jail [iD] [Minuty] [Dovod]");
if(Jailed[JailID] == 1)return SendClientMessage(playerid,CERVENA,"[ ! ]{f0f0f0}Hráč už je zatknutý");
 
Jailed[JailID] = 1;
SetPlayerVirtualWorld(JailID,51);
SetPlayerPos(JailID,214.2509,1873.2167,17.6406);
JailTimer[JailID] = SetTimerEx("prepustit",60000*cas,0,"i",JailID);
 
new str[128];
format(str,sizeof(str),"Administátor %s zatkol hráča %s na %f minút [Dovod: %s]",PlayerName(playerid),PlayerName(JailID),cas,dovod);
SendClientMessageToAll(CERVENA,str);
return 1;
}
 
 
ten public:
 
public prepustit(playerid)
{
if(Jailed[JailID] == 1)
{
SetPlayerVirtualWorld(JailID,0);
SetPlayerHealth(JailID,100);
SetPlayerPos(JailID,0,0,0);
Jailed[JailID] = 0;
SetPlayerInterior(JailID, 0);
}
return 1;
}

 

 

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0

public prepustit(playerid)
{
if(Jailed[playerid] == 1)
{
SetPlayerVirtualWorld(playerid,0);
SetPlayerHealth(playerid,100);
SetPlayerPos(playerid,0,0,0);
Jailed[playerid] = 0;
SetPlayerInterior(playerid, 0);
}
return 1;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...