Jump to content

[HELP] Did i do something wrong?


Imposter

Recommended Posts

if getElementID(cari)  =  getPlayerAccount (source), "cari") then 
    --some code-- 
else 
outputChatBox ( "This car is not yours!" , source) 
setElementHealth (getElementData (source, "hiscari"), 0) 
destroyElement(cari) 
removeElementData (source, "hiscari") 
end 

what am i doing wrong, im getting an error saying that 'then' isnt there but it is...

Link to comment
  
local account = getPlayerAccount (source) 
if getElementID(cari)  ==  getAccountData (account, "cari") then 
    --some code-- 
else 
outputChatBox ( "This car is not yours!" , source) 
setElementHealth (getElementData (source, "hiscari"), 0) 
destroyElement(cari) 
removeElementData (source, "hiscari") 
end 

But you should show the full code because I don't know what are you checking in that line which is obviously wrong:

if getElementID(cari)  =  getPlayerAccount (source), "cari") then -- WRONG! 

Link to comment
  
local account = getPlayerAccount (source) 
if getElementID(cari)  ==  getAccountData (account, "cari") then 
    --some code-- 
else 
outputChatBox ( "This car is not yours!" , source) 
setElementHealth (getElementData (source, "hiscari"), 0) 
destroyElement(cari) 
removeElementData (source, "hiscari") 
end 

But you should show the full code because I don't know what are you checking in that line which is obviously wrong:

if getElementID(cari)  =  getPlayerAccount (source), "cari") then -- WRONG! 

thanks to you, i successfully got my car system finished :D AMARANT FTW!

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