Advertisement
Guest User

Untitled

a guest
Feb 10th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. #include <YSI/y_scripting>
  2. #include < a_samp >
  3. #include < sscanf >
  4. #include < zcmd >
  5. #include < vip >
  6.  
  7. #define COLOR_WHITE 0xFFFFFFAA
  8.  
  9. #define COLOR_RED 0xEB000FFF
  10.  
  11. #define green 0x33FF33AA
  12.  
  13. #define blue 0x375FFFFF
  14.  
  15. #define red 0xFF0000AA
  16.  
  17. #define Cmd_Dialog // Pune 2 // in fata daca nu vrei sa fie comanda /vcmds
  18.  
  19. #define Max_Ammo // Pune 2 // in fata daca nu vrei sa fie comanda /maxammo
  20.  
  21. #define Vip_Club // Pune 2 // in fata daca nu vrei sa fie comanda /vipclub
  22.  
  23. #define Spawn_Me // Pune 2 // in fata daca nu vrei sa fie comanda /spawnme
  24.  
  25. #define Vip_Goto // Pune 2 // in fata daca nu vrei sa fie comanda /vipgoto
  26.  
  27. #define Vip_Car // Pune 2 // in fata daca nu vrei sa fie comanda /vcar
  28.  
  29. #define Vips // Pune 2 // in fata daca nu vrei sa fie comanda /vips
  30.  
  31.  
  32. public OnFilterScriptInit( ) { printf("Comenzi Vip: %d",VipCommands()); print( " Vip System a pornit cu succes " ) ; return 1 ; }
  33.  
  34. public OnPlayerConnect( playerid ) { LoadPlayerVip( playerid ) ; return 1 ; }
  35.  
  36. public OnPlayerDisconnect( playerid , reason ) { SavePlayerVip( playerid ) ;return 1 ; }
  37.  
  38. public OnPlayerText( playerid , text[ ] ) {
  39. if( text [ 0 ] == '!' && PlayerVip[ playerid ] == 1 ) {
  40. new string[ 128 ]; GetPlayerName( playerid , string , sizeof( string ) ) ;
  41. format( string , sizeof( string ) , " Vip Chat: {FC0303}%s{FFFFFF}: {00CEFC}%s" , string , text[ 1 ] ) ; MessageToVip( green , string ) ;
  42. return 0 ; } return 1 ; }
  43.  
  44. forward MessageToVip( color , const string[ ] ) ;
  45. public MessageToVip( color , const string[ ] ) {
  46. for(new i = 0; i < MAX_PLAYERS; i++ ) {
  47. if(IsPlayerConnected( i ) == 1 ) if(PlayerVip[ i ] == 1) SendClientMessage( i , color , string ) ;}
  48. return 1; }
  49.  
  50. CMD:setvip( playerid , params[ ] ) {
  51. new vippp;
  52. if(!IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid , COLOR_RED , " Trebuie sa fi admin pentru a folosi aceasta comanda " ) ;
  53. if(sscanf(params , "u" , vippp ) ) return SendClientMessage( playerid , 0xF60000AA , " Use /setvip [id] " ) ;
  54. if(IsPlayerConnected( vippp ) ) {
  55. SetPlayerVip( vippp ) ;
  56. SendClientMessage( playerid , 0xF60000AA , " Player-ul a primit V.I.P " ) ;
  57. SendClientMessage( vippp , 0xF60000AA , " De acum esti V.I.P. " ) ; return 1 ; } else {
  58. SendClientMessage( playerid , COLOR_RED , " Player-ul nu este conectat " ) ; return 1 ; } }
  59.  
  60. CMD:getvip( playerid , params[ ] ) {
  61. new vippp;
  62. if(!IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid ,COLOR_RED , " Trebuie sa fi admin pentru a folosi aceasta comanda " ) ;
  63. if(sscanf(params, "u", vippp)) return SendClientMessage(playerid, 0xF60000AA, "Use /getvip [id]");
  64. if(IsPlayerConnected( vippp ) ) {
  65. GetPlayerVip( vippp ) ;
  66. SendClientMessage( playerid , 0xF60000AA , " Player-ul nu mai are V.I.P. " ) ;
  67. SendClientMessage( vippp , 0xF60000AA , " De acum nu mai esti V.I.P. " ) ; return 1 ; } else {
  68. SendClientMessage( playerid , COLOR_RED , " Player-ul nu este conectat " ) ; return 1 ; } }
  69.  
  70. #if defined Vip_Goto
  71. CMD:vipgoto( playerid , params[ ] ) {
  72. if(PlayerVip[ playerid ] == 1) {
  73. if(!strlen( params ) ) return SendClientMessage( playerid , red , " USAGE: /vipgoto [playerid] " ) ;
  74. new player1 , string[128];
  75. if(!IsNumeric( params ) ) player1 = ReturnPlayerID( params ) ;
  76. else player1 = strval( params ) ;
  77. if(IsPlayerConnected( player1 ) && player1 != INVALID_PLAYER_ID && player1 != playerid ) {
  78. new Float:x, Float:y, Float:z; GetPlayerPos( player1 , x , y , z ) ; SetPlayerInterior( playerid , GetPlayerInterior( player1 ) ) ;
  79. SetPlayerVirtualWorld( playerid , GetPlayerVirtualWorld( player1 ) ) ;
  80. if(GetPlayerState( playerid ) == 2 ) {
  81. SetVehiclePos( GetPlayerVehicleID( playerid ) , x+3 , y , z ) ; LinkVehicleToInterior( GetPlayerVehicleID( playerid ),GetPlayerInterior( player1 ) ) ;
  82. SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
  83. } else SetPlayerPos( playerid , x+2 , y , z ) ;
  84. format( string , sizeof ( string ) , " Te-ai teleportat la \"%s\"" , pName( player1 ) ) ;
  85. return SendClientMessage( playerid , blue , string ) ;
  86. } else return SendClientMessage( playerid , red , " Player-ul nu este conectat sau ai folosit id-ul tau " ) ;
  87. } else return SendClientMessage(playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
  88. #endif
  89.  
  90. #if defined Max_Ammo
  91. CMD:maxammo( playerid , params[ ] ) {
  92. #pragma unused params
  93. if(PlayerVip[ playerid ] == 1 ) {
  94. MaxAmmo( playerid ) ;
  95. return 1 ;
  96. } else return SendClientMessage( playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
  97. #endif
  98.  
  99. #if defined Spawn_Me
  100. CMD:spawnme( playerid , params[ ] ) {
  101. if(PlayerVip[ playerid ] == 1 ) {
  102. SpawnPlayer( playerid ) ;
  103. return 1;} else return SendClientMessage( playerid , red , " EEROARE: Nu esti membru V.I.P. " ) ; }
  104. #endif
  105.  
  106. #if defined Vips
  107. CMD:vips( playerid , params[ ] ) {
  108. #pragma unused params
  109. new string[ 128 ];
  110. if(IsPlayerConnected( playerid ) ) {
  111. for (new i = 0; i < MAX_PLAYERS; i++ ){
  112. if(IsPlayerConnected( i ) ) {
  113. if(PlayerVip[ playerid ] == 1 ) {
  114. format( string , sizeof( string ) , " Vips {FC0303}: {00CEFC}%s {FFFFFF}({FC0303}%d{FFFFFF}) " , PlayerName2( i ) , i ) ;
  115. SendClientMessage( playerid , green , string ) ; } } } } return 1 ; }
  116. #endif
  117.  
  118. #if defined Vip_Club
  119. CMD:vclub( playerid , params[ ] ) {
  120. if(PlayerVip[ playerid ] == 1 ) {
  121. SetPlayerPos( playerid , -2637.69,1404.24,906.46 ) ;
  122. SetPlayerInterior( playerid , 3 ) ;
  123. RemovePlayerFromVehicle( playerid ) ;
  124. return 1 ;
  125. } else return SendClientMessage( playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
  126. #endif
  127.  
  128. #if defined Vip_Car
  129. CMD:vcar( playerid , params[ ] ) {
  130. if(PlayerVip[ playerid ] == 1 ) {
  131. CarSpawner( playerid , 409 ) ;
  132. return 1 ;
  133. } else return SendClientMessage( playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
  134. #endif
  135.  
  136. #if defined Cmd_Dialog
  137. CMD:vcmds( playerid , params[ ] ) {
  138. ShowPlayerDialog( playerid, 9046, DIALOG_STYLE_MSGBOX , " {00FF19}Comenzi Vip " , VCommands( ) , "Ok" , "Close" ) ;
  139. return 1; }
  140. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement