Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.58 KB | None | 0 0
  1. command(createsultan, playerid, params[])
  2. {
  3.     new Float:X,Float:Y,Float:Z,Float:A;
  4.     GetPlayerPos(playerid,X,Y,Z); // Get the players pos
  5.     GetXYInFrontOfPlayer(playerid, X, Y, 2.0); // Get pos 2.0 metres in front of player
  6.     GetPlayerFacingAngle(playerid,A); // get players angle
  7.     new vehicleid = CreateVehicle(560, X, Y, Z, (A+90), 0, 0, -1); // Create the vehicle to attach to
  8.     new object = CreateObject(1223, 0, 0, 0, 0.0, 0.0, 96.0); // Create the object to be attached
  9.     AttachObjectToVehicle(object, vehicleid, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0); // Attach it to the vehicle
  10.     return 1;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement