Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command(createsultan, playerid, params[])
- {
- new Float:X,Float:Y,Float:Z,Float:A;
- GetPlayerPos(playerid,X,Y,Z); // Get the players pos
- GetXYInFrontOfPlayer(playerid, X, Y, 2.0); // Get pos 2.0 metres in front of player
- GetPlayerFacingAngle(playerid,A); // get players angle
- new vehicleid = CreateVehicle(560, X, Y, Z, (A+90), 0, 0, -1); // Create the vehicle to attach to
- new object = CreateObject(1223, 0, 0, 0, 0.0, 0.0, 96.0); // Create the object to be attached
- AttachObjectToVehicle(object, vehicleid, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0); // Attach it to the vehicle
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement