Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <YSI/y_scripting>
- #include < a_samp >
- #include < sscanf >
- #include < zcmd >
- #include < vip >
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_RED 0xEB000FFF
- #define green 0x33FF33AA
- #define blue 0x375FFFFF
- #define red 0xFF0000AA
- #define Cmd_Dialog // Pune 2 // in fata daca nu vrei sa fie comanda /vcmds
- #define Max_Ammo // Pune 2 // in fata daca nu vrei sa fie comanda /maxammo
- #define Vip_Club // Pune 2 // in fata daca nu vrei sa fie comanda /vipclub
- #define Spawn_Me // Pune 2 // in fata daca nu vrei sa fie comanda /spawnme
- #define Vip_Goto // Pune 2 // in fata daca nu vrei sa fie comanda /vipgoto
- #define Vip_Car // Pune 2 // in fata daca nu vrei sa fie comanda /vcar
- #define Vips // Pune 2 // in fata daca nu vrei sa fie comanda /vips
- public OnFilterScriptInit( ) { printf("Comenzi Vip: %d",VipCommands()); print( " Vip System a pornit cu succes " ) ; return 1 ; }
- public OnPlayerConnect( playerid ) { LoadPlayerVip( playerid ) ; return 1 ; }
- public OnPlayerDisconnect( playerid , reason ) { SavePlayerVip( playerid ) ;return 1 ; }
- public OnPlayerText( playerid , text[ ] ) {
- if( text [ 0 ] == '!' && PlayerVip[ playerid ] == 1 ) {
- new string[ 128 ]; GetPlayerName( playerid , string , sizeof( string ) ) ;
- format( string , sizeof( string ) , " Vip Chat: {FC0303}%s{FFFFFF}: {00CEFC}%s" , string , text[ 1 ] ) ; MessageToVip( green , string ) ;
- return 0 ; } return 1 ; }
- forward MessageToVip( color , const string[ ] ) ;
- public MessageToVip( color , const string[ ] ) {
- for(new i = 0; i < MAX_PLAYERS; i++ ) {
- if(IsPlayerConnected( i ) == 1 ) if(PlayerVip[ i ] == 1) SendClientMessage( i , color , string ) ;}
- return 1; }
- CMD:setvip( playerid , params[ ] ) {
- new vippp;
- if(!IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid , COLOR_RED , " Trebuie sa fi admin pentru a folosi aceasta comanda " ) ;
- if(sscanf(params , "u" , vippp ) ) return SendClientMessage( playerid , 0xF60000AA , " Use /setvip [id] " ) ;
- if(IsPlayerConnected( vippp ) ) {
- SetPlayerVip( vippp ) ;
- SendClientMessage( playerid , 0xF60000AA , " Player-ul a primit V.I.P " ) ;
- SendClientMessage( vippp , 0xF60000AA , " De acum esti V.I.P. " ) ; return 1 ; } else {
- SendClientMessage( playerid , COLOR_RED , " Player-ul nu este conectat " ) ; return 1 ; } }
- CMD:getvip( playerid , params[ ] ) {
- new vippp;
- if(!IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid ,COLOR_RED , " Trebuie sa fi admin pentru a folosi aceasta comanda " ) ;
- if(sscanf(params, "u", vippp)) return SendClientMessage(playerid, 0xF60000AA, "Use /getvip [id]");
- if(IsPlayerConnected( vippp ) ) {
- GetPlayerVip( vippp ) ;
- SendClientMessage( playerid , 0xF60000AA , " Player-ul nu mai are V.I.P. " ) ;
- SendClientMessage( vippp , 0xF60000AA , " De acum nu mai esti V.I.P. " ) ; return 1 ; } else {
- SendClientMessage( playerid , COLOR_RED , " Player-ul nu este conectat " ) ; return 1 ; } }
- #if defined Vip_Goto
- CMD:vipgoto( playerid , params[ ] ) {
- if(PlayerVip[ playerid ] == 1) {
- if(!strlen( params ) ) return SendClientMessage( playerid , red , " USAGE: /vipgoto [playerid] " ) ;
- new player1 , string[128];
- if(!IsNumeric( params ) ) player1 = ReturnPlayerID( params ) ;
- else player1 = strval( params ) ;
- if(IsPlayerConnected( player1 ) && player1 != INVALID_PLAYER_ID && player1 != playerid ) {
- new Float:x, Float:y, Float:z; GetPlayerPos( player1 , x , y , z ) ; SetPlayerInterior( playerid , GetPlayerInterior( player1 ) ) ;
- SetPlayerVirtualWorld( playerid , GetPlayerVirtualWorld( player1 ) ) ;
- if(GetPlayerState( playerid ) == 2 ) {
- SetVehiclePos( GetPlayerVehicleID( playerid ) , x+3 , y , z ) ; LinkVehicleToInterior( GetPlayerVehicleID( playerid ),GetPlayerInterior( player1 ) ) ;
- SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
- } else SetPlayerPos( playerid , x+2 , y , z ) ;
- format( string , sizeof ( string ) , " Te-ai teleportat la \"%s\"" , pName( player1 ) ) ;
- return SendClientMessage( playerid , blue , string ) ;
- } else return SendClientMessage( playerid , red , " Player-ul nu este conectat sau ai folosit id-ul tau " ) ;
- } else return SendClientMessage(playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
- #endif
- #if defined Max_Ammo
- CMD:maxammo( playerid , params[ ] ) {
- #pragma unused params
- if(PlayerVip[ playerid ] == 1 ) {
- MaxAmmo( playerid ) ;
- return 1 ;
- } else return SendClientMessage( playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
- #endif
- #if defined Spawn_Me
- CMD:spawnme( playerid , params[ ] ) {
- if(PlayerVip[ playerid ] == 1 ) {
- SpawnPlayer( playerid ) ;
- return 1;} else return SendClientMessage( playerid , red , " EEROARE: Nu esti membru V.I.P. " ) ; }
- #endif
- #if defined Vips
- CMD:vips( playerid , params[ ] ) {
- #pragma unused params
- new string[ 128 ];
- if(IsPlayerConnected( playerid ) ) {
- for (new i = 0; i < MAX_PLAYERS; i++ ){
- if(IsPlayerConnected( i ) ) {
- if(PlayerVip[ playerid ] == 1 ) {
- format( string , sizeof( string ) , " Vips {FC0303}: {00CEFC}%s {FFFFFF}({FC0303}%d{FFFFFF}) " , PlayerName2( i ) , i ) ;
- SendClientMessage( playerid , green , string ) ; } } } } return 1 ; }
- #endif
- #if defined Vip_Club
- CMD:vclub( playerid , params[ ] ) {
- if(PlayerVip[ playerid ] == 1 ) {
- SetPlayerPos( playerid , -2637.69,1404.24,906.46 ) ;
- SetPlayerInterior( playerid , 3 ) ;
- RemovePlayerFromVehicle( playerid ) ;
- return 1 ;
- } else return SendClientMessage( playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
- #endif
- #if defined Vip_Car
- CMD:vcar( playerid , params[ ] ) {
- if(PlayerVip[ playerid ] == 1 ) {
- CarSpawner( playerid , 409 ) ;
- return 1 ;
- } else return SendClientMessage( playerid , red , " EROARE: Nu esti membru V.I.P. " ) ; }
- #endif
- #if defined Cmd_Dialog
- CMD:vcmds( playerid , params[ ] ) {
- ShowPlayerDialog( playerid, 9046, DIALOG_STYLE_MSGBOX , " {00FF19}Comenzi Vip " , VCommands( ) , "Ok" , "Close" ) ;
- return 1; }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement