SHARE
TWEET

Navio Pirata - HomeHots

a guest Jun 7th, 2014 236 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Este Crédito foi Adicionado por ThuuGLif3...
  2.    Criador: TonyII
  3.    Tradutor: ThuuGLif3
  4. */
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. new PirateObject,
  9.     PirateFence,
  10.     PirateRopes,
  11.     PirateShip;
  12. new Camera;
  13. new ControllingShip[MAX_PLAYERS];
  14.  
  15. public OnFilterScriptInit()
  16. {
  17.     print("\n--------------------------------------");
  18.     print("Návio Pirata por Tony II ligado :) Faça bom proveito");
  19.     print("--------------------------------------\n");
  20.     PirateObject = CreateObject(8493,0,0,-100,0,0,0);
  21.     PirateFence = CreateObject(9159,0,0,-100,0,0,0);
  22.     PirateRopes = CreateObject(8981,0,0,-100,0,0,0);
  23.     PirateShip = AddStaticVehicleEx(454, 723.6520, -1890.7867, -0.0164, 180.0000, -1, -1, -1);
  24.     AttachObjectToVehicle(PirateObject, PirateShip, 0.809999, 1.439998, 16.650209, 0.000000, 0.000000, 0.000000);
  25.     AttachObjectToVehicle(PirateRopes, PirateShip, 0.294999, -4.665059, 16.250276, 0.000000, 0.000000, 0.000000);
  26.     AttachObjectToVehicle(PirateFence, PirateShip, 0.784999, 1.439998, 16.655208, 0.000000, 0.000000, 0.000000);
  27.     return 1;
  28. }
  29.  
  30. public OnFilterScriptExit()
  31. {
  32.     return 1;
  33. }
  34.  
  35. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  36. {
  37.     if (newkeys & KEY_SECONDARY_ATTACK)
  38.     {
  39.         if(ControllingShip[playerid] == 1)
  40.         {
  41.         ControllingShip[playerid] = 0;
  42.         new Float:X,Float:Y,Float:Z;
  43.         GetPlayerPos(playerid, X,Y,Z);
  44.         SetPlayerPos(playerid, X,Y+2,Z+6);
  45.         SetCameraBehindPlayer(playerid);
  46.         DestroyObject(Camera);
  47.         }
  48.     }
  49.     return 1;
  50. }
  51.  
  52. CMD:comandosnavio(playerid, params[])
  53. {
  54.     for(new i = 0; i < MAX_PLAYERS; i++)
  55.     {
  56.     if(ControllingShip[i] == 1) return SendClientMessage(playerid, -1,"[ x ] O navio está sendo mantido no comando por outra pessoa.");
  57.     }
  58.     Camera = CreateObject(0, 0,0,0,0,0,0);
  59.     AttachObjectToVehicle(Camera, PirateShip,0,-35,23,0.000000,0.000000,0.0);
  60.     PutPlayerInVehicle(playerid, PirateShip, 0);
  61.     AttachCameraToObject(playerid, Camera);
  62.     ControllingShip[playerid] = 1;
  63.     SendClientMessage(playerid, -1,"[ > ] /SairNavio ou pressione 'F' se você quiser parar de comandar este navio.");
  64.     return 1;
  65. }
  66.  
  67. CMD:sairnavio(playerid, params[]) //Qualquer erro, Troque o CMD...
  68. {
  69.     if(ControllingShip[playerid] == 0) return SendClientMessage(playerid, -1,"[ x ]Você não comandar o navio.");
  70.     ControllingShip[playerid] = 0;
  71.     new Float:X,Float:Y,Float:Z;
  72.     GetPlayerPos(playerid, X,Y,Z);
  73.     SetPlayerPos(playerid, X,Y+2,Z+6);
  74.     SetCameraBehindPlayer(playerid);
  75.     DestroyObject(Camera);
  76.     return 1;
  77. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top