Jump to content

fxl

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

fxl last won the day on October 24 2022

fxl had the most liked content!

Recent Profile Visitors

494 profile views

fxl's Achievements

Newbie

Newbie (4/54)

3

Reputation

  1. fxl

    WARNING

    addEvent ("tune.sync_objects", true); addEventHandler ("tune.sync_objects", root, function (veh, objects) local g = tune.gridlist[3]; local label_text = "none" ---- set it to none by default. if isPedInVehicle(localPlayer) then --if ped is in vehicle then set labeltext to vehname label_text = getVehicleName(getPedOccupiedVehicle(localPlayer)) end tune.label[5]:setText("Você deve estar em um veículo para usar este painel.\nVeículo atual: "..label_text) if not isPedInVehicle (localPlayer) then return end if not veh or not objects then return end guiGridListClear (g); for i=#objects, 1, -1 do local v = objects[i]; if isElement (v) then local row = guiGridListAddRow (g); guiGridListSetItemText (g, row, 1, veh, false, false); guiGridListSetItemText (g, row, 2, getElementModel (v), false, false); guiGridListSetItemData (g, row, 1, v); end end guiGridListSetSelectedItem (g, 0, 1); end ); This code should work without errors.
  2. fxl

    [HELP]

    https://wiki.multitheftauto.com/wiki/Call This function is used to call a function from another resource (which must be running). You can replace it with another function like: outputServerLog outputDebugString outputChatBox
  3. setAccountData(account, "ID", randomID) ?
  4. db = dbConnect( "sqlite", "db.db" ) function checkFraction(player) local acc = getPlayerAccount(player) local playerName = getAccountName(acc) local result = dbPoll(dbQuery(db,"SELECT * FROM `fraction` WHERE login = ?",playerName),-1) if #result > 0 then for i,v in ipairs(result) do outputChatBox('This fraction : '..v.fractionId,player) end else outputChatBox("Error",player) end end checkFraction() -- you need to add player argument for example for _,plrs in ipairs(getElementsByType("player")) do -- get all players on server checkFraction(plrs) --check their fraction end
  5. https://wiki.multitheftauto.com/wiki/SetVehiclePlateText https://wiki.multitheftauto.com/wiki/GetVehiclePlateText
  6. fxl

    WARNING

    make sure your script is in right ACL Group, with rights to function.fetchRemote
  7. infoMarker = createMarker(2808.621094,-2430.112305,12.62857, "cylinder", 2.0, 255, 0, 0, 150) function MarkerHit(player) outputChatBox("Hello",255,0,0,true) end addEventHandler("onMarkerHit",infoMarker,MarkerHit) Also you have to change script type in meta.xml
  8. https://wiki.multitheftauto.com/wiki/EngineSetModelLODDistance should work
  9. function cdamage(attacker, weapon, bodypart, loss) if getElementHealth(source)-loss <= 20 then -- if player health reaches 20 or below after damage cancelEvent() -- cancels dmg setElementHealth(source, 20) -- bring u back to 20hp end end addEventHandler("onClientPlayerDamage", localPlayer, cdamage)
×
×
  • Create New...