Jail command Time (from seconds to minutes)
#1

Hello dear friends,so here is the deal.I have this command,it jails in seconds i need it to jail in minutes.Can anyone help me out with this? Rep+1

PHP код:
// Jail a player 
COMMAND:zatvori(playeridparams[]) 

    new 
PlayerToJailJailTimeReason[128], Msg[128], Name[24], AdminName[24]; 
    
// Send the command to all admins so they can see it 
    
SendAdminText(playerid"/zatvori"params); 
    
// Check if the player has logged in 
    
if (APlayerData[playerid][LoggedIn] == true
    { 
        
// Check if the player's admin-level is at least 1 
        
if (APlayerData[playerid][PlayerLevel] >= 1
        { 
            if (
sscanf(params"uis[128]"PlayerToJailJailTimeReason)) SendClientMessage(playerid0xFF0000AA"Komanda: \"/Zatvori <Igrac> <Vrijeme> <Razlog>\""); 
            else 
                if (
IsPlayerConnected(PlayerToJail)) // If the player is a valid playerid (he's connected) 
                

                    
// Jail the player 
                    
Police_JailPlayer(PlayerToJailJailTime); 
                    
// Get the name of the player who jailed the player 
                    
GetPlayerName(playeridAdminNamesizeof(AdminName)); 
                    
// Get the name of the player who's being sent to jail 
                    
GetPlayerName(PlayerToJailNamesizeof(Name)); 
                    
// Send the jailed player a Message who jailed him, why he's been jailed and how long 
                    
format(Msg128"Zatvoren si od %s %s na %i sekundi"AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminNameJailTime); 
                    
SendClientMessage(PlayerToJail0xFF0000FFMsg); 
                    
format(Msg128"Razlog: %s"Reason); 
                    
SendClientMessage(PlayerToJail0xFF0000FFMsg); 
                    
format(Msg128"{00FF00}Zatvorio si {FFFF00}%s{00FF00} za {FFFF00}%i{00FF00} sekundi"NameJailTime); 
                    
SendClientMessage(playerid0xFFFFFFFFMsg); 
                    
format(Msg128"{FF9933}Igrac %s je zatvoren od %s %s na %i sekundi. Razlog: %s"NameAdminLevelName[APlayerData[playerid][PlayerLevel]], AdminNameJailTimeReason); 
                    
SendClientMessageToAll(0xFFFFFFFFMsg); 
                } 
                else 
                    
SendClientMessage(playerid0xFF0000FF"Taj igrac nije online"); 
        } 
        else 
            return 
0
    } 
    else 
        return 
0
    
// Let the server know that this was a valid command 
    
return 1

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)