Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:jail( playerid, params[] )
- {
- new
- String [ 150 ],
- Priezastis [ 31 ],
- pName [ 34 ],
- aName [ 34 ],
- id,
- laikas;
- if( pInfo[ playerid ][ Admin ] < 2 ) return SendClientMessage( playerid, -1, "Komanda nerasta. Visos komandos: /pagalba" );
- if( sscanf( params, "uis", id, laikas, Priezastis ) ) return SendClientMessage( playerid, -1, "Komandos naudojimas: /jail [ V_P ] [ laikas ] [ prieþastis ]" );
- else
- {
- if( !IsPlayerConnected( id ) ) return SendClientMessage( playerid, -1, "Tokio þaidëjo nëra." );
- if( laikas < 1 ) return SendClientMessage( playerid, -1, "Neteisingai nurodytas laikas." );
- if( strlen( Priezastis ) < 5 ) return SendClientMessage( playerid, -1, "Prieþastis per trumpa." );
- if( strlen( Priezastis ) > 30 ) return SendClientMessage( playerid, -1, "Prieþastis per ilga." );
- GetPlayerName( playerid, aName, 34 );
- GetPlayerName( id, pName, 34 );
- format( String, sizeof( String ), "%s buvo ákalintas administratoriaus %s ( %i ) uþ %s.", pName, aName, laikas, Priezastis );
- SendClientMessageToAll( -1, String );
- format( String, sizeof( String ), "Jus ákalino administratorius %s.", aName );
- SendClientMessage( id, -1, String );
- JailPlayer( id, laikas );
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement