Jump to content

onVehicleDamage


Fury

Recommended Posts

Posted
function hasar(damage) 
local player = getVehicleOccupant(source) 
    if player then 
        if (isGuestAccount(getPlayerAccount(source)) == false) then 
            local account = getPlayerAccount( source ) 
            local map = getResourceName ( exports['mapmanager']:getRunningGamemodeMap ( ) ) 
            local ilkhasar = getAccountData( account, ""..map.."-damage" ) or 0   
            local hasar = math.floor(damage/1000) 
            setAccountData( account,""..map.."-damage",ilkhasar+hasar) 
        end 
    end 
end 
addEventHandler("onVehicleDamage", getRootElement(), hasar) 

error in line 5, 7 and 9.

d7wj7.png

can you please tell me what i am doing wrong?

Destruction Derby

Posted
function hasar(damage) 
local player = getVehicleOccupant(source) 
    if player then 
        if (isGuestAccount(getPlayerAccount(player)) == false) then 
            local account = getPlayerAccount( player ) 
            local map = getResourceName ( exports['mapmanager']:getRunningGamemodeMap ( ) ) 
            local ilkhasar = getAccountData( account, ""..map.."-damage" ) or 0   
            local hasar = math.floor(damage/1000) 
            setAccountData( account,""..map.."-damage",ilkhasar+hasar) 
        end 
    end 
end 
addEventHandler("onVehicleDamage", getRootElement(), hasar) 

Posted
function hasar(damage) 
local player = getVehicleOccupant(source) 
    if player then 
        if (isGuestAccount(getPlayerAccount(player)) == false) then 
            local account = getPlayerAccount( player ) 
            local map = getResourceName ( exports['mapmanager']:getRunningGamemodeMap ( ) ) 
            local ilkhasar = getAccountData( account, ""..map.."-damage" ) or 0   
            local hasar = math.floor(damage/1000) 
            setAccountData( account,""..map.."-damage",ilkhasar+hasar) 
        end 
    end 
end 
addEventHandler("onVehicleDamage", getRootElement(), hasar) 

not working.

Destruction Derby

Posted
won't to guys, who stole scripts

what ? i dont stole anything? what the fuck are you talking about? im just new at lua thats it..

Destruction Derby

Posted

saw debugscript image

you don't even bother to change the text in map info

just copy it from wtf server, with other color and image

357ac0078264.jpg

- Working on [php/HTML/Mysql/Lua/Java Scripts/Web Design/3D Modeling]

Posted
saw debugscript image

you don't even bother to change the text in map info

just copy it from wtf server, with other color and image

what the fuck are you talking about? i dont even know what "wtf" server uses. are you fucking idiot? how can you judge me when you dont know the codes are? omg....

Destruction Derby

Posted

I don't know if it's stolen or not, but since it's already solved, I'm locking the topic.

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.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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