#3

After reading your post three times, i came to a conclusion that you want a command that can jail wanted persons.

So, this is easy and can be done by sscanf

Command :
pawn Код:
CMD:jail ( playerid , params [] )
{
    if ( !IsPlayerAdmin ( playerid ) ) return SendClientMessage ( playerid , -1 , "Your not admin! Dumbass" ) ;
    new TargetID , Reason[128];
    if ( sscanf ( params , "us[128]" , TargetID , Reason ) ) return SendClientMessage ( playerid , -1 , "Usage : /jail [ID] [REASON]" ) ;
    if( !IsPlayerConnected ( TargetID ) ) return SendClientMessage ( playerid , -1 , "Invalid ID" ) ;
    if ( TargetID == playerid ) return SendClientMessage ( playerid , -1 , "You cannot jail yourself" ) ;
    else
    {
    //SetPlayerPos(player , Float:x , Float:y , Float:z ) ;
    new pName[MAX_PLAYER_NAME] , IDName[MAX_PLAYER_NAME];
    GetPlayerName ( playerid , pName , MAX_PLAYER_NAME ) ;
    GetPlayerName ( TargetID , IDName , MAX_PLAYER_NAME ) ;
    new str[128];
    format ( str , 128 , "%s Has been Jailed by Administrator %s. [Reason : %s ]" , IDName , pName , Reason  ) ;
    SendClientMessageToAll ( -1 , str ) ;
    new str2[128];
    format ( str2 , 128 , "You have been Jailed by Administrator %s. [Reason : %s ]" , pName , Reason  ) ;
    SendClientMessage ( TargetID , -1 , str2 ) ;
    }
    return 1;
}
Reply


Messages In This Thread
Jail - by davve95 - 16.03.2012, 07:57
Re: Jail - by T0pAz - 16.03.2012, 08:31
Re: Jail - by Ronaldo_raul™ - 16.03.2012, 09:13
Re: Jail - by Outlaaw - 16.03.2012, 09:22
Re: Jail - by davve95 - 16.03.2012, 10:33
Re: Jail - by Cameltoe - 16.03.2012, 11:08
Re: Jail - by davve95 - 16.03.2012, 15:09
Re: Jail - by davve95 - 16.03.2012, 19:43
Re: Jail - by Cameltoe - 17.03.2012, 11:15
Re: Jail - by davve95 - 17.03.2012, 15:42

Forum Jump:


Users browsing this thread: 2 Guest(s)