Jump to content

Get name from source of event


Recommended Posts

I want to get the Name of the pickup which I have entered ?

This isnt the full code but all variables are in the full script defined!

Serversite:

addEventHandler ("onPickupHit", _G["austellungscar"..tostring (ausstellungsvehid)], function (player) 
        if not (isPedInVehicle(player)) then 
            if (getElementData (player, "isWangCarsInfoShowed") == false) or (getElementData (player, "isWangCarsInfoShowed") == nil) then 
                local preis = getElementData (source, "Preis"..source)      -- here i must have the name of the pickup 
                local Name = getElementData (source, "Namek"..source) 
                setElementData (player, "isWangCarsInfoShowed", true) 
                    if (fileExists ("/data/cars/"..Name..".jpg")== true) then 
                        triggerClientEvent (player, "showWangCarsGui", player, player, Name, tonumber (preis), true) 
                    else 
                        triggerClientEvent (player, "showWangCarsGui", player, player, Name, tonumber (preis), false) 
                    end 
                end 
            end 
    end) 

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