Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Az _ SHIP
- // BY azula
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #include <zcmd>
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- main()
- {return 1;
- }
- #define @error SendClientMessage(playerid,-1," {FF2EE1} [Az-Ship] : {FC0B0B}Error");
- enum AzInfo
- {
- bool:ID,
- AZVEH,
- Text3D:Text
- }
- new AzShip[MAX_PLAYERS][AzInfo];
- new AZOBJ[MAX_PLAYERS][8];
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- public OnFilterScriptInit()
- {
- print("\n-----------Azula 2015 scripting------------------------");
- print(" Az _ SHIP By Azula");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- CMD:azship(playerid, params[]) {
- if( AzShip[playerid] [ ID ] != false ) return @error
- new Float:AZPOS[3];
- GetPlayerPos(playerid,AZPOS[0],AZPOS[1],AZPOS[2]);
- AZOBJ[playerid][0] = CreateObject(10231, 0.44450, 0.79290, 7.93500, 0.00000, 0.00000, -90.00000);
- AZOBJ[playerid][1] = CreateObject(10230, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000);
- AZOBJ[playerid][2] = CreateObject(0, -3.44911, -125.35394, 72.00260, 3.14160, 0.00000, 1.99840);
- AZOBJ[playerid][3] = CreateObject(1506, 1.71283, -47.22900, 14.18948, 0.00000, 0.00000, 0.00000);
- AzShip[playerid] [ AZVEH ] = AddStaticVehicle(493, -34.4456, -2.4899, -10.9782, 90.0000, -1, -1);
- AttachObjectToVehicle(AZOBJ[playerid][0], AzShip[playerid] [ AZVEH ], 0.44450, 0.79290, 8.93500, 0.00000, 0.00000, -90.00000);
- AttachObjectToVehicle(AZOBJ[playerid][1], AzShip[playerid] [ AZVEH ], 1.91470, 0.01930, 12.08500, 0.00000, 0.00000, -90.00000);
- AttachObjectToVehicle(AZOBJ[playerid][2], AzShip[playerid] [ AZVEH ], -3.44911, -125.35394, 72.00260, 3.14160, 0.00000, 1.99840);
- // addon v0.1
- AttachObjectToVehicle(AZOBJ[playerid][3], AzShip[playerid] [ AZVEH ], 1.71283, -47.22900, 14.18948, 0.00000, 0.00000, 0.00000);
- SetObjectMaterial(AZOBJ[playerid][0], 0, 10140, "frieghter2sfe", "sf_ship_steps", 0xFFFFFFFF);
- PutPlayerInVehicle(playerid, AzShip[playerid] [ AZVEH ], 0);
- SetVehiclePos(AzShip[playerid] [ AZVEH ] ,AZPOS[0],AZPOS[1],AZPOS[2] + 5 );
- AttachCameraToObject(playerid, AZOBJ[playerid][2]);
- AzShip[playerid] [ ID ] = true;
- return 1;
- }
- CMD:horn(playerid, params[]) {
- if( AzShip[playerid] [ ID ] == false ) return @error
- new Float:AZPOS[3];
- GetPlayerPos(playerid,AZPOS[0],AZPOS[1],AZPOS[2]);
- for(new i = 0; i< MAX_PLAYERS;i++) {
- if(!IsPlayerInRangeOfPoint(i, 15.0, AZPOS[0],AZPOS[1],AZPOS[2] )) continue;
- PlayAudioStreamForPlayer(playerid, "http://www.soundsnap.com/files/tmp-stream/1431442020/89/transcode/tug-boat-horn.mp3");
- }
- return true;
- }
- CMD:dship(playerid, params[]) {
- if( AzShip[playerid] [ ID ] == false ) return @error
- for(new i = 0; i!=8;i++) { DestroyObject(AZOBJ[playerid][i]); }
- DestroyVehicle(AzShip[playerid] [ AZVEH ]);
- SetCameraBehindPlayer(playerid);
- AzShip[playerid] [ ID ] = false;
- return true;
- }
- CMD:drive(playerid, params[]) {
- if( AzShip[playerid] [ ID ] == false ) return @error
- PutPlayerInVehicle(playerid, AzShip[playerid] [ AZVEH ], 0);
- AttachCameraToObject(playerid, AZOBJ[playerid][2]);
- return true;
- }
- CMD:navigate(playerid, params[]) {
- if( AzShip[playerid] [ ID ] == false ) return @error
- new Float:AZPOS[3];
- GetPlayerPos(playerid,AZPOS[0],AZPOS[1],AZPOS[2]);
- SetPlayerPos(playerid,AZPOS[0]+1.91470 ,AZPOS[1]+ 0.01930 ,AZPOS[2]+14.08500);
- SetCameraBehindPlayer(playerid);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement