Jump to content

what did i do wrong


triplesnake

Recommended Posts

Posted

{lua/code]local marker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 )

local blip = createBlip ( x, y, z, icon=33, int size=2, r=255, int g=15, b=75, a=255,

ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()]

local ped = createPed

local pname = getPlayerFromName("x-Racer")

i get an error on debug in second line it says ) expexted near "="

Posted (edited)

Firstly, try not to create two topics with the same question.

local marker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) 
local blip = createBlip ( x, y, z, 33, 2, 255, 15, 75, 255, 0, 99999.0, getRootElement()) 
local ped = createPed( skin, x, y, z ) 
local pname = getPlayerFromName("x-Racer") 

Edited by Guest

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No, to get a player name you do getPlayerName(playerElement). getPlayerFromName returns a player element from a player name.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Copy the code again, I forgot something.

P.S: What are you trying to achieve?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
addEventHandler("onMarkerHit",marker, 
function (hitElement, matchingDim) 
if isPedInVehicle(hitElement) then return end 
if not matchingDim then return end 
local vehicle = createVehicle(411, x, y, z) 
warpPedIntoVehicle(hitElement, vehicle) 
end) 

Change x, y, z to the position where you want the vehicle to be created.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
local marker = createMarker ( 0, 0, 2, "cylinder", 1.5, 255, 255, 0, 170 ) 
local blip = createBlip ( 0, 0, 7, 33, 2, 255, 15, 75, 255, 0, 99999.0, getRootElement()) 
local ped = createPed( 29, 4, 4, 7 ) 
local pname = getPlayerFromName("x-Racer") 
doorcreateObject(doorid, x, y, z not sure about rotation) 
addEventHandler("onMarkerHit",marker, 
function (hitElement, matchingDim) 
if isPedInVehicle(hitElement) then return end 
if not matchingDim then return end 
local vehicle = createVehicle(411, 2, 2, 14) 
warpPedIntoVehicle(hitElement, vehicle) 
setTimer (moveObject(door, x, y ,z),3000) 
end) 

thats supposed to make a door and make it move when a player hit the marker right or is it all messsed up

P.S:i know this is prob asking for too much but i like get lost in wiki pages so can u help me like send me a page or two link everyday in orded i need to learn it in pm or something like that it would be great help but i know u prob dont ahve time for that but i will really appreciate it

Posted
local marker = createMarker ( 0, 0, 2, "cylinder", 1.5, 255, 255, 0, 170 ) 
local blip = createBlip ( 0, 0, 7, 33, 2, 255, 15, 75, 255, 0, 99999.0, getRootElement()) 
local ped = createPed( 29, 4, 4, 7 ) 
--local door = createObject(doorid, x, y, z not sure about rotation) 
addEventHandler("onMarkerHit",marker, 
function (hitElement, matchingDim) 
if getElementType ( hitElement ) ~= "player" then return end 
if isPedInVehicle(hitElement) then return end 
if not matchingDim then return end 
local vehicle = createVehicle(411, 2, 2, 14) 
warpPedIntoVehicle(hitElement, vehicle) 
setTimer (moveObject , 3000 , 1 , door, x, y ,z) 
end) 

EDIT: don't double post, edit your post instead.

EDIT: where is doorid defined?

And createObject is fucked up, you are not commenting it.

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

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...