Unkown Commad of /jail
#1

Ever time i use dis it say Unkown. command but it still work.
PHP код:
COMMAND:jail(playeridparams[])
{
    new 
PlayerToJailJailTimeReason[128], Msg[128], Name[24], AdminName[24];
    
// Send the command to all admins so they can see it
    
SendAdminText(playerid"/jail"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"Usage: \"/jail <PlayerToJail> <JailTime> <Reason>\"");
            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"You have been jailed by %s %s for %i seconds"AdminLevelName[APlayerData[playerid][PlayerLevel]], AdminNameJailTime);
                    
SendClientMessage(PlayerToJail0xFF0000FFMsg);
                    
format(Msg128"Reason: %s"Reason);
                    
SendClientMessage(PlayerToJail0xFF0000FFMsg);
                    
format(Msg128"{00FF00}You have jailed {FFFF00}%s{00FF00} for {FFFF00}%i{00FF00} seconds"NameJailTime);
                    
SendClientMessage(playerid0xFFFFFFFFMsg);
                }
                else
                    
SendClientMessage(playerid0xFF0000FF"That player isn't online");
        }
        else
            return 
0;
    }
    else
        return 
0;
    
// Let the server know that this was a valid command
    
return 1;

Reply


Messages In This Thread
Unkown Commad of /jail - by DerickClark - 04.05.2013, 03:32
Re: Unkown Commad of /jail - by LukisHard - 04.05.2013, 05:30
Re: Unkown Commad of /jail - by DerickClark - 04.05.2013, 05:35
Re: Unkown Commad of /jail - by LukisHard - 04.05.2013, 05:55
Re: Unkown Commad of /jail - by Yashas - 04.05.2013, 07:31
Re: Unkown Commad of /jail - by DerickClark - 04.05.2013, 15:26
Re: Unkown Commad of /jail - by Onfroi - 04.05.2013, 15:31
Re: Unkown Commad of /jail - by Pettersen - 04.05.2013, 15:39

Forum Jump:


Users browsing this thread: 1 Guest(s)