Guest User

Untitled

a guest
Mar 28th, 2013
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. /*
  2.  
  3. Rob System By RoW
  4. Do Not Remove Credits !
  5. ________________________________________________________________________________
  6. _____________________________Include's________________________________________*/
  7.  
  8. #include " a_samp "
  9. #include " zcmd "
  10. #include " sscanf2 "
  11.  
  12. /*______________________________________________________________________________
  13. _____________________________OnFilterScriptInit_______________________________*/
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. print("\n--------------------------------------");
  18. print(" R.O.B system by RoW");
  19. print("--------------------------------------\n");
  20. return 1;
  21. }
  22.  
  23. /*______________________________________________________________________________
  24. _______________________________Command________________________________________*/
  25.  
  26. CMD:rob( playerid , params [ ] )
  27. {
  28. new player , Float:x , Float:y , Float:z , xRob = ( random( 1000 ) + 1000 ) , str[ 128 ];
  29. if( sscanf( params , "u" ,player ) )return SendClientMessage( playerid , -1 , "{FF0000}Use{FFFFFF}: {00FF00}/rob {FFFFFF}< {FF0000}playerid {FFFFFF}> ");
  30. GetPlayerPos( player , x , y , z );
  31. if( IsPlayerInRangeOfPoint( player , 3.0 , x , y , z ) )return SendClientMessage( playerid , -1 , " {FF0000}Error: Esti prea departe de tinta ! " );
  32. if( player == INVALID_PLAYER_ID )return SendClientMessage( playerid , -1 , "{FF0000}Error: Player neconectat ");
  33. if( player == playerid )return SendClientMessage( playerid , -1 , "{FF0000}Error: Nu te poti jefui pe tine !");
  34. if( GetPlayerMoney( player ) < xRob )return SendClientMessage( playerid , -1 , "{FF0000}Error: E prea sarac pentru a fi jefuit !");
  35. GivePlayerMoney( playerid , xRob );
  36. GivePlayerMoney( player , -xRob );
  37. format( str , sizeof( str ) , "{00FF00}%s {FFFFFF}a fost jefuit de {FF0000}%s {FFFFFF}!", GetName( player ) , GetName( playerid ) );
  38. SendClientMessageToAll( -1 , str );
  39. return 1;
  40. }
  41.  
  42. /*______________________________________________________________________________
  43. _______________________________Stock's________________________________________*/
  44.  
  45. stock GetName( playerid )
  46. {
  47. new name[ MAX_PLAYER_NAME ];
  48. GetPlayerName( playerid , name , sizeof( name ) );
  49. return name;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment