Jump to content

onVehicleDamage


Fury

Recommended Posts

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?

Link to comment
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) 

Link to comment
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.

Link to comment
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....

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

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