Jump to content

Mistake


tim260

Recommended Posts

please find whats wrong

function check ( player, seat, jacked ) 
if getElementData(source, "private") then 
if getElementData(source, "owner") == getAccountName(getPlayerAccount(player)) then 
else 
cancelEvent() 
outputChatBox("This is not your car!", player) 
end 
end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), check ) 
  
funtion settcar(player, cmd, who) 
local who = getPlayerFromName(who) 
local co = getPedOccupiedVehicle(who) 
setElementData(co, "private", true) 
setElementData(co, "owner", getPlayerName(who)) 
outputChatBox("Now this car owner is "..getPlayerName(who), player) 
end 
addCommandHandler("setowner", settcar) 

Link to comment
function check ( player, seat, jacked ) 
if getElementData(source, "private") then 
if getElementData(source, "owner") == getAccountName(getPlayerAccount(player)) then 
else 
cancelEvent() 
outputChatBox("This is not your car!", player) 
end 
end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), check ) 
  
function settcar(player, cmd, who) 
local who = getPlayerFromName(who) 
local co = getPedOccupiedVehicle(who) 
setElementData(co, "private", true) 
setElementData(co, "owner", getPlayerName(who)) 
outputChatBox("Now this car owner is "..getPlayerName(who), player) 
end 
addCommandHandler("setowner", settcar) 

Link to comment
function check ( player, seat, jacked ) 
if getElementData(source, "private") then 
if getElementData(source, "owner") == getAccountName(getPlayerAccount(player)) then 
else 
cancelEvent() 
outputChatBox("This is not your car!", player) 
end 
end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), check ) 
  
function settcar(player, cmd, who) 
local who = getPlayerFromName(who) 
local co = getPedOccupiedVehicle(who) 
setElementData(co, "private", true) 
setElementData(co, "owner", getPlayerName(who)) 
outputChatBox("Now this car owner is "..getPlayerName(who), player) 
end 
addCommandHandler("setowner", settcar) 

its the same..

Link to comment
What's the error?

/debugscript 3

= expected near setcar on line 12

edit :

[2012-01-07 16:00:42] SCRIPT ERROR: [gameplay]\setownercar\zabe.lua:12: '=' expected near 'settcar' 
[2012-01-07 16:00:42] WARNING: Loading script failed: [gameplay]\setownercar\zabe.lua:12: '=' expected near 'settcar' 

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