Dzemous

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dzemous

  • Rank
    Member

Details

  • Gang
    GS
  • Location
    Poland
  • Occupation
    Programmer (amateur
  • Interests
    LUA
  1. triggerServerEvent - create vehicle

    Yes, I know. I prefer to do it on c-side ; p At least I learn how trigger. I don't know what i must using in argument with element (2)
  2. Hi, I will doing job, but I always have got problem with arguments in trigger I read Elements Tree on wiki, but I still do not know what this is about When player hit marker then s-side must create vehicle. C-side StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer ) outputChatBox ("Created vehicle!") end end end addEventHandler ("onClientMarkerHit", StartJobM, StartJob) StartJobM = createMarker (-165.35049, 1059.69141, 18.74219, 'cylinder', 1.0, 22, 38, 199, 255) function StartJob (hitPlayer, matchingDimension) if isPedInVehicle (hitPlayer) then outputChatBox ("You can't hit marker when u are in vehicle!") cancelEvent () if getElementType(hitPlayer) == getlocalPlayer then triggerServerEvent ("poj", localPlayer ) outputChatBox ("Created vehicle!") end end end addEventHandler ("onClientMarkerHit", StartJobM, StartJob) S-side: function VehicleC() lcvehi = createVehicle (422, -158.49141, 1051.20691, 19.75892) end addEvent("poj") addEventHandler("poj", getRootElement(), VehicleC) Please, explain me how i Can triggering
  3. How can I get offset?

    Lasts arguments in function attachElements are offset. How I can get offset?
  4. Hello guys! I doing panel registration. How I can upload text with EditBox with c-side to s-side? When player click button "Registration" then script must take Login and Password with EditBox and s-side must does function addAccount . This is snippet code c-side: local DaneR_Login = guiGetText (GUIREGISTER.Places_R_Register[1]) --Getting login with editbox local DaneR_Passy = guiGetText (GUIREGISTER.Places_R_Register[2]) --Getting password with edibot local StworzKonto = triggerServerEvent ("StworzKonto", getLocalPlayer ()) --trigger (addaccount) if StworzKonto then outputChatBox ("Pomyślnie utworzono konto o nazwie: "..DaneR_Login) --If s-side addAccount else outputChatBox ("Nie udało się utworzyć konta") --if not addAccount end end end end end addEventHandler ("onClientGUIClick", root, CreateAccountPlayer) S-side function StworzKontoWBazieDanych() addAccount ('DaneR_Login', 'DaneR_Passy') --DaneR_Login and DaneR_Passy this are local with c-side. They getting login and password with editbox. end addEvent("StworzKonto",true) addEventHandler("StworzKonto", getRootElement(), StworzKontoWBazieDanych) 0 db. How I can upload this locals?
  5. Lenght text in edibox

    Ok, thanks!
  6. Lenght text in edibox

    Hello! I doing script Panel register and Login. How can I check the length text in editbox? I used: if #GUIREGISTER.Places_R_Register[1] > 0 and #GUIREGISTER.Places_R_Register[1] <=20 then , but this is bad. DB3: Attemp to get length of field '?' (a userdata value) I haven't got idea how to do
  7. Connect SQL - doesn't work

    Ok, thanks Can close this topic.
  8. Connect SQL - doesn't work

    I don't will create multi data base. I want to have one for everything
  9. Connect SQL - doesn't work

    Why this connect doesn't work? local connect = dbConnect("sqlite",":resources/Mlife.db") Script is in: Resources/ZP (ZP this folder with script) Data Base File is in main folder with scripts. Script can't find data base file about name Mlife.db, but this data base file there is
  10. Hello guys, I'm beginners in LUA. Why this code doesn't work? 0 DB When player joined, server giving he skin about ID 0 C-side function SskinC () triggerServerEvent ("SetSkinPlayerJoin", resourceRoot) end addEventHandler ("onClientPlayerJoin", getRootElement(), SskinC) S-side function UstawSkina() setElementModel(client, 0) end addEvent("SetSkinPlayerJoin", true) addEventHandler("SetSkinPlayerJoin", resourceRoot, UstawSkina) I don't know when I must write resourceRoot, root, getRootElement, etc. and this is my problem (Sorry for my english, but i can't pefrect his :/)