Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. Dimos7

    Player name

    if understand corectly you want a player name be .3 characters then you need string.len setPlayerName
  2. Dimos7

    help

    you mean make costum chat-system?
  3. Dimos7

    Lights

    that is marker in corona and attached to vehicle
  4. you can export you function throught your meta <export function="name of function here" type="server"/>
  5. try see erros or warnings with /debugscript 3
  6. for spawn a player is spawnPlayer(player, x, y, z)
  7. local playtime_string = string.format("%02d:%02d:%02d", hours, minutes, seconds) if playtime_string then setElementData(player, "Játszott idő", tostring( hours )..' óra '..tostring( minutes )..' perc') end
  8. after change the code do a restart to the resource to see if it works
  9. local countdown = 120 G3 = guiCreateLabel(0.49, 0.67, 0.03, 0.02, tostring(countdown).." mp", true) guiSetFont(G3, "default-bold-small") guiSetVisible(G3,false) addEventHandler("onClientGUIClick",root, function (button, state) if button == "left"and state=="up" and source == buttonGuest then removeEventHandler("onClientRender",root,a123) addEventHandler("onClientRender", root, dxhavendeg) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) setTimer(function () countdown = countdown - 1 if countdown >= 0 then guiSetText(G3, tostring(countdown)) else outputChatBox("asd") end end, 1000, 0) end end ) try see if that work
  10. what exacly you want to do?
  11. i guess you forget to put the window as false exepect if you not have window if you have and all are attached to window not need other put in false
  12. Dimos7

    Question

    what do you need with chat?
  13. Dimos7

    Question

    addCommandHandler("sv", function(player, command, model) if tonumber(model) and tonumber(model) >= 400 and tonumber(model) < 609 then local vx,vy,vz = getElementPosition(player) local vrx , vry, vrz = getElementRotation(player) local vhle = createVehicle(model,vx,vy,vz, vrx, vry, vrz) outputChatBox("Vehicle spawned!", player) warpPedIntoVehicle(player,vhle, 0) else outputChatBox("Error!",player) end end ) for your 3 question instead of player use getRootElement() as for question 2 you need the position of your screen make tables add +1 or - depents the arrow your press and for select you need get skin from table you have it
  14. Dimos7

    Question

    no but function yes
  15. --Client Side function storeArmor ( ) local armor = getPedArmor(localPlayer) if (armor == 100) then return function() triggerServerEvent("setdaarmor",true) outputChatBox("Your armor got stored",255,255,255,true) end end end addCommandHandler ("storearmor", storeArmor)
  16. there is way change the model put it replace it with mod one you have download for all the players
  17. you mean not replace it right if that so then use createWeapon
  18. Dimos7

    GUI Problems

    label = {} foodwindow = guiCreateWindow(388, 199, 465, 639,"COMBINI FRIENDLY",true) guiSetAlpha(foodwindow,225) guiSetProperty(foodwindow, "ImageColours", "tl:FFFFFE0C tr:FF0000FF bl:FF0000FF br:FFFFFE0C") guiCreateStaticImage ( 9, 26, 446, 200,"image.png",true,foodwindow) ramenimg = guiCreateStaticImage(38, 288, 157, 61, "ramen.png", true, foodwindow) pockyimg = guiCreateStaticImage(262, 289, 157, 60, "pocky.png", true, foodwindow) laysimg = guiCreateStaticImage(262, 372, 156, 60, "lays.png", true, foodwindow) omuraisuimg = guiCreateStaticImage(38, 543, 157, 60, "omuraisu.png", true, foodwindow) picanteimg = guiCreateStaticImage(262, 458, 157, 60, "picante.png", true, foodwindow) tartaletaimg = guiCreateStaticImage(262, 543, 157, 61, "tartaleta.png", true, foodwindow) yakisobaimg = guiCreateStaticImage(38, 372, 157, 60, "yakisoba.png", true, foodwindow) onigiriimg = guiCreateStaticImage(38, 458, 157, 60, "onigiri.png", true, foodwindow) closebtn = guiCreateButton(119, 235, 219, 43, "CERRAR", true, foodwindow) guiSetVisible(foodwindow, false) guiSetProperty(closebtn, "NormalTextColour", "FFAAAAAA") GUIEditor.label[2] = guiCreateLabel(437, 550, 153, 20, "RAMEN INSTANTANEO", false) guiLabelSetColor(GUIEditor.label[2], 255, 252, 0) GUIEditor.label[3] = guiCreateLabel(468, 633, 153, 20, "YAKISOBA", false) guiLabelSetColor(GUIEditor.label[3], 255, 252, 0) GUIEditor.label[4] = guiCreateLabel(478, 719, 153, 20, "ONIGIRI", false) guiLabelSetColor(GUIEditor.label[4], 255, 252, 0) GUIEditor.label[5] = guiCreateLabel(473, 804, 153, 20, "OMURAISU", false) guiLabelSetColor(GUIEditor.label[5], 255, 252, 0) GUIEditor.label[6] = guiCreateLabel(700, 804, 153, 20, "TARTALETA", false) guiLabelSetColor(GUIEditor.label[6], 255, 252, 0) GUIEditor.label[7] = guiCreateLabel(694, 633, 153, 20, "PAPAS LAYS", false) guiLabelSetColor(GUIEditor.label[7], 255, 252, 0) GUIEditor.label[8] = guiCreateLabel(700, 550, 153, 20, "POCKYS", false) guiLabelSetColor(GUIEditor.label[8], 255, 252, 0) GUIEditor.label[9] = guiCreateLabel(684, 719, 153, 20, "PAPAS PICANTES", false) guiLabelSetColor(GUIEditor.label[9], 255, 252, 0) end ) function lol (hitElement) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(foodwindow,false) local x,y = (screenW/2-windowW/2),(screenH/2-windowH/2) guiSetPosition(foodwindow,x,y,false) if hitElement == getLocalPlayer() then guiSetVisible(foodwindow, true) showCursor(true) centerWindow(foodwindow) end end function createramen() ramen = createMarker(443.5146484375, -6.431640625, 1059.5,"cylinder", 1, 60, 60, 60,250) setElementDimension(ramen, 5) setElementInterior(ramen, 1) addEventHandler('onClientMarkerHit', ramen, lol) end addEventHandler('onClientResourceStart', getResourceRootElement(),createramen) function createburgers() omuraisu = createMarker(443.5146484375, -6.431640625, 1059.5,"cylinder", 1, 60, 60, 60,250) setElementDimension(omuraisu, 66) setElementInterior(omuraisu, 1) addEventHandler('onClientMarkerHit', omuraisu, lol) end addEventHandler('onClientResourceStart', getResourceRootElement(),createburgers) function createpocky() pocky = createMarker(443.5146484375, -6.431640625, 1059.5,"cylinder", 1, 60, 60, 60,250) setElementDimension(pocky, 8) setElementInterior(pocky, 1) addEventHandler('onClientMarkerHit', pocky, lol) end addEventHandler('onClientResourceStart', getResourceRootElement(),createpocky) function close () guiSetVisible(foodwindow, false) showCursor(false) end addEventHandler("onClientGUIClick", closebtn, close) function lays() if getPlayerMoney(player) >= 150 then inc = 150 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("lays", getLocalPlayer()) outputChatBox("Has comprado Papas Lays por: 150¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", laysimg, lays) function ramen() if getPlayerMoney(player) >= 400 then inc = 400 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("ramen", getLocalPlayer()) outputChatBox("Has comprado Ramen instantáneo por: 400¥", 0, 255, 250, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", ramenimg, ramen) function pocky() if getPlayerMoney(player) >= 200 then inc = 200 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("pocky", getLocalPlayer()) outputChatBox("Has comprado Pockys por: 200¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", pockyimg, pocky) function omuraisu() if getPlayerMoney(player) >= 300 then inc = 300 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("omuraisu", getLocalPlayer()) outputChatBox("Has comprado Omuraisu por: 300¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", omuraisuimg, omuraisu) function picante() if getPlayerMoney(player) >= 200 then inc = 200 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("picante", getLocalPlayer()) outputChatBox("Has comprado Papas Picantes por: 200¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", picanteimg, picante) function tartaleta() if getPlayerMoney(player) >= 1000 then inc = 1000 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("tartaleta", getLocalPlayer()) outputChatBox("Has comprado una Tartaleta por: 1000¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", tartaletaimg, tartaleta) function yakisoba() if getPlayerMoney(player) >= 300 then inc = 300 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("yakisoba", getLocalPlayer()) outputChatBox("Has comprado Yakisoba por: 300¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", yakisobaimg, yakisoba) function onigiri() if getPlayerMoney(player) >= 250 then inc = 250 player = getLocalPlayer () setElementHealth(player, getElementHealth(player) + inc) triggerServerEvent("onigiri", getLocalPlayer()) outputChatBox("Has comprado Onigiri por: 250¥", 0, 255, 0, player) else outputChatBox("Necesitas más dinero para comprar ",255,0,250) end end addEventHandler("onClientGUIClick", onigiriimg, onigiri) try it like this
  19. setVehicleWindowOpen and setTimer i guess
  20. Dimos7

    pm system help

    function getPlayerID(player) if player then local theid players = getElementsByType("player") for id,p in ipairs(players) do if player == p then theid = i end end return theid else return false end end function getPlayerFromID(theID) if theID then theID = tonumber(theID) local theplayer players = getElementsByType("player") for id,p in ipairs(players) do if theID == id then theplayer = p end end return theplayer else return false end end function privateMessage(thePlayer, commandName, sendToName, ...) local message = table.concat({...}, " ") local toPlayer = getPlayerFromPartialName(sendToName) or getPlayerFromID(sendToName) if toPlayer then local pmblocked = getElementData(toPlayer, "pmblocked") if toPlayer ~= thePlayer then if pmblocked ~= 1 then if message ~= "" then outputChatBox("PM to "..getPlayerName(toPlayer).."("..getPlayerID(toPlayer)..") : "..message, thePlayer, 238, 232, 84) outputChatBox("PM from "..getPlayerName(thePlayer).."("..getPlayerID(thePlayer)..") : "..message, toPlayer, 236, 205, 45) outputServerLog("PM to "..getPlayerName(toPlayer).."("..getPlayerID(toPlayer)..") : "..message) outputServerLog("PM from "..getPlayerName(thePlayer).."("..getPlayerID(thePlayer)..") : "..message) setElementData(thePlayer, "pmPartner", toPlayer) setElementData(toPlayer, "pmPartner", thePlayer) end else outputChatBox("This person has diasble his pm try later!", thePlayer, 255, 0, 0) end else outputChatBox("You can't speak to yourself!", thePlayer, 255, 0, 0) end else outputChatBox("Player not found!", thePlayer, 255, 0, 0) end end addCommandHandler("pm", privateMessage) error attempt concatenate a nil value first output chatbox
  21. anyone can help me with this bug
  22. can someone help me when i use [ , ], = or j for emegerncy light and turn them off after my command for lights /light not working correctly
  23. i guess it will called loginapenl or account-system or something like this
  24. give us the code and do /debubscript 3 to any error or warnings
×
×
  • Create New...