offline jail didnt work
#7

Gotta use AccountExist instead of !AccountExist

PHP код:
COMMAND:ojail(playeridparams[]) 

    if(!
PlayerInfo[playerid][power]) return SendClientError(playeridCANT_USE_CMD); 
    new 
iPlayer40 ], iTimeiReason128 ], string164 ]; 
    if( 
sscanf params"s[40]ds"iPlayer,iTime,iReason)) return SCP(playerid"[Exact_Name] [jailtime (MINUTES)] [reason]"); 
    
//if(GetPlayerId(iPlayer) != INVALID_PLAYER_ID) return SendClientError(playerid, "That player is connected! Use /ajail!"); 
    
iTime = (iTime 60); 
    if(
AccountExist(iPlayer)) 
    { 
        new 
iQuery[228]; 
        
mysql_format(sqldbiQuerysizeof(iQuery), "UPDATE `PlayerInfo` SET `Jail` = 1, `JailTime` = %d, `bail` = 777, JailReason = '%e' WHERE `PlayerName` = '%e'"iTimeiReasoniPlayer); 
        
mysql_tquery(sqldbiQuery); 

        
format(string,sizeof(string),"[Admin] %s has jailed %s for %d minutes: %s",RPName(playerid),iPlayer,iTime,iReason); 
        
SendMessageToAll(COLOR_RED,string); 
    } 
    else 
SendClientError(playerid"Account not found!"); 
    return 
1

Reply


Messages In This Thread
offline jail didnt work - by ServerFiles - 20.08.2018, 05:18
Re: offline jail didnt work - by Shockey HD - 20.08.2018, 05:32
Re: offline jail didnt work - by jlalt - 20.08.2018, 05:35
Re: offline jail didnt work - by ServerFiles - 20.08.2018, 06:10
Re: offline jail didnt work - by jlalt - 20.08.2018, 06:26
Re: offline jail didnt work - by ServerFiles - 20.08.2018, 06:29
Re: offline jail didnt work - by jlalt - 20.08.2018, 06:32
Re: offline jail didnt work - by ServerFiles - 20.08.2018, 06:53
Re: offline jail didnt work - by jlalt - 20.08.2018, 07:04
Re: offline jail didnt work - by ServerFiles - 20.08.2018, 07:05

Forum Jump:


Users browsing this thread: 4 Guest(s)