Jump to content

Piorun

Members
  • Posts

    421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Piorun

  1. Is it posible to start resource only for local player ??? Or any specific player ???
  2. Piorun

    Maximum value

    Hi. Today I've got a question for "How to math a max value from a table?" Here's a table example = { 52, 20, 24 } And how to use a math.max function for that?
  3. But shaders are working only for models, not for vehicles so I can change it ofc, but every vehicle will have the same color of tints. Anyway - what is the name of tints texture?
  4. Haha .. Thanks - it's working
  5. Hi. I've got problem with clicking on GUI elements. Here's code: function createLoginWindow() ucp_login_window[1] = guiCreateWindow(329,138,393,494,"Project: San Andreas - Logowanie",false) guiWindowSetMovable(ucp_login_window[1],false) guiWindowSetSizable(ucp_login_window[1],false) ucp_login_edit[1] = guiCreateEdit(148,309,228,33,"",false,ucp_login_window[1]) ucp_login_edit[2] = guiCreateEdit(148,386,228,33,"",false,ucp_login_window[1]) guiEditSetMasked(ucp_login_edit[2],true) ucp_login_label[1] = guiCreateLabel(154,291,108,18,"Login:",false,ucp_login_window[1]) guiSetFont(ucp_login_label[1],"default-bold-small") ucp_login_label[2] = guiCreateLabel(154,368,108,18,"Hasło:",false,ucp_login_window[1]) guiSetFont(ucp_login_label[2],"default-bold-small") ucp_login_button[1] = guiCreateButton(271,444,113,41,"Zaloguj >>",false,ucp_login_window[1]) guiSetFont(ucp_login_button[1],"default-bold-small") ucp_login_button[2] = guiCreateButton(9,444,113,41,"Zarejestruj",false,ucp_login_window[1]) ucp_login_image[1] = guiCreateStaticImage(22,319,100,100,"images/shruk.png",false,ucp_login_window[1]) ucp_login_label[3] = guiCreateLabel(9,23,375,62,"Tutaj będzie krótka informacja dotycząca logowania.",false,ucp_login_window[1]) guiLabelSetHorizontalAlign(ucp_login_label[3],"left",true) ucp_login_label[4] = guiCreateLabel(93,86,152,17,"Informacja:",false,ucp_login_window[1]) guiSetFont(ucp_login_label[4],"default-bold-small") ucp_login_label[5] = guiCreateLabel(93,103,283,141,"Tutaj znajdą się informacje o aktualizacjach.",false,ucp_login_window[1]) guiLabelSetHorizontalAlign(ucp_login_label[5],"left",true) ucp_login_label[6] = guiCreateLabel(24,244,352,27,"",false,ucp_login_window[1]) guiLabelSetColor(ucp_login_label[6],255,0,0) guiLabelSetVerticalAlign(ucp_login_label[6],"center") guiSetFont(ucp_login_label[6],"default-bold-small") showCursor(true) showChat(false) addEventHandler("onClientGUIClick", ucp_login_button[1], clientLogin) end And when I click on a button - it's working, but when i click on a window, near a button - this funciton is working too. Why?
  6. My suggestion is about a color of wind tints. Meybe some function setVehicleWindowTintColor, or something like that. I'm thinking that is cool idea to add a alpha argument too. What are you thinking about it?
  7. No ok .. ale w SA:MP są pododawane nowe modele i tekstury jako dodatkowe obiekty - może się jednak da?
  8. Nie do końca to same modele - tutaj dochodzą tzw. "kości". Może w tym problem.
  9. BinSlayer1 - yes, I know this functions, but i was thinking that is any other way to do this. Thanks.
  10. But in my first post i write that function "attachElements" doesn't works for a sound element .
  11. How to attach a sound element to a player? I found this: https://wiki.multitheftauto.com/wiki/AttachElements, but this doesn't work for a sound element (i'm thinking that works few times ago).
  12. I do nothing I sell this code to other user, but i can paste code here. Want it?
  13. Ok doesn't matter .. I fix my code and now is working . Bye.
  14. No one can help me ??
  15. Piorun

    Numberplate

    Wow .. i don't saw it. Thanks again.
  16. Hi My code function deleteVeh(source) if isPedInVehicle(source) then local veh = getPedOccupiedVehicle(source) local data = getElementData(veh, "datanum") if data then local xmlfile = xmlLoadFile("veh.xml") for i, node in ipairs(xmlNodeGetChildren(xmlfile)) do local datanode = xmlNodeGetAttribute(node, "datanum") if data == datanode then local result = xmlDestroyNode(node) xmlSaveFile(xmlfile) destroyElement(veh) end end end end end addCommandHandler("usunauto", deleteVeh) Is working when i restart resource. In other functions i've got creating a vehicle and saveing few info into xml file. When i create a veh and enter to it this function doesn't work, but when i restart resource and enter again - it's working. Why?
  17. Piorun

    Numberplate

    Why in function createVehicle argument numberplate is working only for few models of cars?
  18. By the way - i don't understand what to do next: function createVehsFromXML() local xmlfile = xmlLoadFile("veh.xml") for i, node in ipairs(xmlNodeGetChildren(xmlfile)) do local atr = xmlNodeGetAttributes(node) for name,value in pairs ( atr ) do end end end addEventHandler("onResourceStart", getRootElement(), createVehsFromXML) I've got this code, but i don't know how to get first value of 'value', second value of 'value' etc.
  19. Hi guys. Today i've got problem with a xml file. Here's my xml file (called veh.xml) "1" modelid="492" owner="Piorun" posx="-712.0078125" posy="962.6455078125" posz="12.342837333679" rotx="0" roty="0" rotz="198.21011352539" stcolor="20" ndcolor="2" plate="plate" /> "2" modelid="429" owner="Piorun" posx="-724.787109375" posy="973.064453125" posz="12.339513778687" rotx="0" roty="0" rotz="339.06796264648" stcolor="0" ndcolor="0" plate="newpl" /> And how to create function witch i can create a car with these values (createVehicle for every child)?
  20. b) Why? Czasem można dzięki temu zablokować wchodzenie na serwer hackerów (tzn. zablokować dostęp dla Egiptu, Iraku etc.). Jest możliwość napisania czegoś takiego na pewno, bo wiele serwerów gdzie ilość graczy przekracza 30 osób korzysta z takiego rozwiązania.
×
×
  • Create New...