Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.31 KB | None | 0 0
  1. new pveh[MAX_PLAYERS], Float:SpawnPointX[MAX_PLAYERS],Float:SpawnPointY[MAX_PLAYERS],Float:SpawnPointZ[MAX_PLAYERS],Float:SpawnPointA[MAX_PLAYERS],SpawnPointVeh[MAX_PLAYERS],SpawnPointUsed[MAX_PLAYERS];
  2.  
  3. new vDim[MAX_VEHICLES];
  4. new vInt[MAX_VEHICLES];
  5.  
  6.  
  7. stock CreateVehicleEx(model, Float:pox, Float:poy, Float:poz, Float:poa, dimension, interior, c1, c2, spawn_d) {
  8.     new vehid = CreateVehicle(model, pox, poy, poz, poa, c1, c2, spawn_d);
  9.     LinkVehicleToInterior(vehid, interior);
  10.     SetVehicleVirtualWorld(vehid, dimension);
  11.     return vehid;
  12. }
  13.  
  14. stock SpawnInVehicle(playerid, model, Float:pox, Float:poy, Float:poz, Float:poa, dimension, interior, c1, c2, spawn_d) {
  15.         if(model==0||pox==0||poy==0){
  16.                 pox = SpawnPointX[0];
  17.                 poy = SpawnPointY[0];
  18.                 poz += 2;
  19.         }
  20.         if(pveh[playerid]>0) DestroyVehicle(pveh[playerid]);
  21.     pveh[playerid] = CreateVehicle(model, pox, poy, poz, poa, c1, c2, spawn_d);
  22.         LinkVehicleToInterior(pveh[playerid], interior);
  23.     SetVehicleVirtualWorld(pveh[playerid], dimension);
  24.     SetPlayerVirtualWorld(playerid, dimension);
  25.     SetPlayerInterior(playerid, interior);
  26.     PutPlayerInVehicle(playerid, pveh[playerid], 0);
  27.     vDim[pveh[playerid]] = dimension;
  28.     vInt[pveh[playerid]] = interior;
  29.     return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement