Jump to content

/papeles


Arsilex

Recommended Posts

Hola miren tengo este script

addCommandHandler( "setvehiclefaction", 
    function( player, commandName, other, faction ) 
        local faction = tonumber( faction ) 
        if other and faction and ( faction == 0 or exports.factions:getFactionName( faction ) ) then 
            local other, name = exports.players:getFromName( player, other ) 
            if other then 
                local vehicle = getPedOccupiedVehicle( other ) 
                if vehicle then 
                    local data = vehicles[ vehicle ] 
                    if data then 
                        if data.vehicleID > 0 then 
                            if data.characterID <= 0 then 
                                if exports.sql:query_free( "UPDATE vehicles SET characterID = " .. -faction .. " WHERE vehicleID = " .. data.vehicleID ) then 
                                    data.characterID = -faction 
                                    outputChatBox( name .. "'s " .. getVehicleName( vehicle ) .. " does now belong to " .. ( faction == 0 and "no faction" or exports.factions:getFactionName( faction ) ) .. ".", player, 0, 255, 153 ) 
                                else 
                                    outputChatBox( "MySQL Query failed.", player, 255, 0, 0 ) 
                                end 
                            else 
                                outputChatBox( "This is no civilian/faction vehicle.", player, 255, 0, 0 ) 
                            end 
                        end 
                    else 
                        outputChatBox( "Vehicle Error.", player, 255, 0, 0 ) 
                    end 
                else 
                    outputChatBox( name .. " isn't driving a vehicle.", player, 255, 0, 0 ) 
                end 
            end 
        else 
            outputChatBox( "Syntax: /" .. commandName .. " [player] [faction or 0 for no faction]", player, 255, 255, 255 ) 
        end 
    end, 
    true 
) 

y lo que yo quiero es que se guarde no el ID de la faccion si no que de el palayer osea y pongo /darapapeles estando en el coche los papele del coche se cambien de mi nombre al nombre de el PJ que tendira que modificar alli? SS::S:S

Link to comment
  • Recently Browsing   0 members

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