Advertisement
MartisK

/jail komanda su priežastimi ir laiku.

Jan 3rd, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. CMD:jail( playerid, params[] )
  2. {
  3. new
  4. String [ 150 ],
  5. Priezastis [ 31 ],
  6. pName [ 34 ],
  7. aName [ 34 ],
  8. id,
  9. laikas;
  10.  
  11. if( pInfo[ playerid ][ Admin ] < 2 ) return SendClientMessage( playerid, -1, "Komanda nerasta. Visos komandos: /pagalba" );
  12. if( sscanf( params, "uis", id, laikas, Priezastis ) ) return SendClientMessage( playerid, -1, "Komandos naudojimas: /jail [ V_P ] [ laikas ] [ prieþastis ]" );
  13. else
  14. {
  15.  
  16. if( !IsPlayerConnected( id ) ) return SendClientMessage( playerid, -1, "Tokio þaidëjo nëra." );
  17. if( laikas < 1 ) return SendClientMessage( playerid, -1, "Neteisingai nurodytas laikas." );
  18. if( strlen( Priezastis ) < 5 ) return SendClientMessage( playerid, -1, "Prieþastis per trumpa." );
  19. if( strlen( Priezastis ) > 30 ) return SendClientMessage( playerid, -1, "Prieþastis per ilga." );
  20.  
  21. GetPlayerName( playerid, aName, 34 );
  22. GetPlayerName( id, pName, 34 );
  23.  
  24. format( String, sizeof( String ), "%s buvo ákalintas administratoriaus %s ( %i ) uþ %s.", pName, aName, laikas, Priezastis );
  25. SendClientMessageToAll( -1, String );
  26. format( String, sizeof( String ), "Jus ákalino administratorius %s.", aName );
  27. SendClientMessage( id, -1, String );
  28. JailPlayer( id, laikas );
  29. return true;
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement