Jump to content

warp bot


manawydan

Recommended Posts

function pet(thePlayer) 
local skinpet = { "43", "44", "45", "46" }     
local x,y,z = getElementPosition(thePlayer) 
local rot= 90 
local skin=skinpet[ math.random( 1,#skinpet ) ] 
local interior=inter 
local dimension=dimen 
local team=getPlayerTeam ( thePlayer ) 
local weapon=0 
local mode= "following" 
local modesubject=thePlayer 
animal = call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) 
end  
addCommandHandler( "pet", pet)  
  
function petvehicle(seat, jacked, thevehicle) 
    if getElementData(source, "leader", true) then 
warpPedIntoVehicle  (  animal, thevehicle, 1) end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), petvehicle ) 

Link to comment
[color=#FFBF00]function warpPedIntoVehicle ( )[/color][color=#FF0000] -- Sets the function.[/color] 
[color=#0000FF]local Ped[/color] [color=#FF0000]= createPed[/color] [color=#0000FF]( 252, 0, 0, 5 )[/color]  [color=#FF0000]-- Creates A Ped at the Coordinates "0, 0, 5".[/color] 
[color=#0000FF]local Vehicle[/color] = [color=#FF0000]createVehicle[/color] [color=#80FF00]( 411, 10, 10, 5 )[/color]   [color=#FF00CC]-- Creates A Vehicle at the Coordinates "10, 10, 5". [/color]      
[color=#0000FF]warpPedIntoVehicle[/color] ( [color=#FF00CC]Ped[/color][color=#00FF00], Vehicle[/color] )     [color=#FF0000] -- Warps the Ped created with "createPed" into The Vehicle that was created with "createVehicle".[/color] 
[color=#4080FF]end[/color] 
[color=#FF0000]addCommandHandler[/color] ([color=#00FFFF] "pedwarp"[/color], [color=#0040FF]warpPedIntoVehicle[/color] )    [color=#FF0000]-- Creates a command that will Warp the Ped into the Vehicle when the Player types "/pedwarp".[/color] 

Edited by Guest
Link to comment
[color=#FFBF00]function warpPedIntoVehicle ( )[/color][color=#FF0000] -- Sets the function.[/color] 
[color=#0000FF]local Ped[/color] [color=#FF0000]= createPed[/color] [color=#0000FF]( 252, 0, 0, 5 )[/color]  [color=#FF0000]-- Creates A Ped at the Coordinates "0, 0, 5".[/color] 
[color=#0000FF]local Vehicle[/color] = [color=#FF0000]createVehicle[/color] [color=#80FF00]( 411, 10, 10, 5 )[/color]   [color=#FF00CC]-- Creates A Vehicle at the Coordinates "10, 10, 5". [/color]      
[color=#0000FF]warpPedIntoVehicle[/color] ( [color=#FF00CC]Ped[/color][color=#00FF00], Vehicle[/color] )     [color=#FF0000] -- Warps the Ped created with "createPed" into The Vehicle that was created with "createVehicle".[/color] 
[color=#4080FF]end[/color] 
[color=#FF0000]addCommandHandler[/color] ([color=#00FFFF] "pedwarp"[/color], [color=#0040FF]warpPedIntoVehicle[/color] )    [color=#FF0000]-- Creates a command that will Warp the Ped into the Vehicle when the Player types "/pedwarp".[/color] 

lol ?? what are you doing, Just use [ lua ] Text [ /lua ]

Without spaces

Link to comment
function petvehicle ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and getElementData ( thePlayer, "leader", true ) ) then 
        warpPedIntoVehicle ( animal, source, 1 ) 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), petvehicle ) 

Link to comment

he not exit

function petvehiclexit ( ) 
    if ( getElementType ( thePlayer ) == "player" and getElementData ( thePlayer, "leader", true ) ) then 
        x, y, z = getElementPosition(thePlayer) 
    setElementPosition( animal, x+1, y+2, z) 
    setElementInterior ( animal, 0 ) 
    setElementRotacion ( animal, 90 )  
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), petvehiclexit ) 

sorry

Link to comment
function pet(thePlayer) 
local skinpet = { "43", "44", "45", "46" }     
local x,y,z = getElementPosition(thePlayer) 
local rot= 90 
local skin=skinpet[ math.random( 1,#skinpet ) ] 
local interior=inter 
local dimension=dimen 
local team=getPlayerTeam ( thePlayer ) 
local weapon=0 
local mode= "following" 
local modesubject=thePlayer 
animal = call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) 
end 
addCommandHandler( "pet", pet) 
  
function petvehicle ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and getElementData ( thePlayer, "leader", true ) ) then 
        warpPedIntoVehicle ( animal, source, 1 ) 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), petvehicle ) 
  
  
function petvehiclexit ( thePlayer) 
if ( getElementType ( thePlayer ) == "player" and getElementData ( thePlayer, "leader", true ) ) then 
removePedFromVehicle ( animal )   
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), petvehiclexit ) 

lol

the bot no enter in vehicle

Link to comment
function pet(thePlayer) 
local skinpet = { "43", "44", "45", "46" }     
local x,y,z = getElementPosition(thePlayer) 
local rot= 90 
local skin=skinpet[ math.random( 1,#skinpet ) ] 
local interior=inter 
local dimension=dimen 
local team=getPlayerTeam ( thePlayer ) 
local weapon=0 
local mode= "following" 
local modesubject=thePlayer 
animal = call (getResourceFromName("slothbot"), "spawnBot", x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) 
setElementData ( thePlayer, "leader", true ) 
end 
addCommandHandler( "pet", pet) 
  
function petvehicle ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" and getElementData ( thePlayer, "leader", true ) ) then 
        warpPedIntoVehicle ( animal, source, 1 ) 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), petvehicle ) 
  
  
function petvehiclexit ( thePlayer) 
    if ( getElementType ( thePlayer ) == "player" and getElementData ( thePlayer, "leader", true ) ) then 
        removePedFromVehicle ( animal )   
    end 
end 
addEventHandler ( "onVehicleExit", getRootElement(), petvehiclexit ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...