Ajail script bug
#9

try this

PHP код:
new playertimer[MAX_PLAYERS];
public 
OnPlayerDisconnect(playeridreason)
{
    
KillTimer(playertimer[playerid]);
    return 
1;
}
forward AjailCount(playerid);
public 
AjailCount(playerid)
{
    if(
pInfo[playerid][pJailTime] != 0)
    {
            
pInfo[playerid][pJailTime]--;
        if(
pInfo[playerid][pJailTime] == 0)
        {
            new 
randSpawn random(sizeof(randomSpawns_DayZSA_Part1));
            
SetPlayerPos_Allow(playerid,randomSpawns_DayZSA_Part1[randSpawn][0],randomSpawns_DayZSA_Part1[randSpawn][1],randomSpawns_DayZSA_Part1[randSpawn][2]);
            
SetPlayerInterior(playerid0);//You can change interior
            
SetPlayerVirtualWorld(playerid0); //You can change virtual world
        
}
    }
    return 
1;
}
CMD:ajail(playeridparams[])
{
  new 
targetidtimereason[64];
  new 
string[128], adminname[64], targetname[64];
  if(
pInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playeridCOLOR_RED"ERROR: You are not Admin");
  if(
sscanf(params"uis[64]"targetidtimereason)) return SendClientMessage(playerid, -1"USAGE: /ajail <playerid> <time> <reason>");
  if(
time == 0) return SendClientMessage(playeridCOLOR_RED"ERROR: Minimum 1 minute !");
  
GetPlayerName(targetidtargetnameMAX_PLAYER_NAME);
  
GetPlayerName(playeridadminnameMAX_PLAYER_NAME);
  
SetPlayerPos(targetid346.870025309.259033999.155700);
  
SetPlayerVirtualWorld(targetid2);
  
SetPlayerInterior(targetid,6);
  
pInfo[targetid][pJailTime] = time;
  
format(stringsizeof(string), "Administrator %s ajailed %s, reason: %s"adminnametargetnamereason);
  
SendClientMessageToAll(COLOR_REDstring);
  
playertimer[targetid] = SetTimerEx("AjailCount"10001"i"playerid);
  return 
1;

Reply


Messages In This Thread
Ajail script bug - by Zeus666 - 30.06.2016, 22:03
Re: Ajail script bug - by Shinja - 30.06.2016, 22:24
Re: Ajail script bug - by Shinja - 30.06.2016, 22:29
Re: Ajail script bug - by Zeus666 - 30.06.2016, 22:56
Re: Ajail script bug - by VVWVV - 01.07.2016, 00:32
Re: Ajail script bug - by Shinja - 01.07.2016, 00:44
Re: Ajail script bug - by Shinja - 01.07.2016, 00:48
Re: Ajail script bug - by Zeus666 - 01.07.2016, 05:22
Re: Ajail script bug - by IceBilizard - 01.07.2016, 05:49
Re: Ajail script bug - by Zeus666 - 01.07.2016, 05:58

Forum Jump:


Users browsing this thread: 3 Guest(s)