Jump to content

Alpha

Members
  • Posts

    244
  • Joined

  • Last visited

Everything posted by Alpha

  1. No, you don't need a database for it, it uses SQLite, and it already creates the database itself.
  2. Alpha

    Medic problem

    Client: function medicJob (theHealer, healerweapon, bodypart, loss) local theHealth = getElementHealth (localPlayer) local theSkin = getElementModel ( theHealer ) if ( healerweapon == 41 ) and ( loss > 1 ) and ( theHealth < 100 ) and ( theSkin == 274 ) and getElementType(theHealer) == "player" then setElementHealth ( localPlayer, 100 ) triggerServerEvent("awardMedic", localPlayer, theHealer) cancelEvent() end end addEventHandler ("onClientPlayerDamage", localPlayer, medicJob ) Server: addEvent("awardMedic", true) addEventHandler("awardMedic", root, function(healer) givePlayerMoney(healer, 200) takePlayerMoney(source, 100) end )
  3. Alpha

    Medic problem

    Damn you. I think he can do that by himself.
  4. Alpha

    Medic problem

    Damn, I should have noticed it's onPlayerDamage, my bad. Here: function medicJob (theHealer, healerweapon, bodypart, loss) local theHealth = getElementHealth (localPlayer) local theSkin = getElementModel ( theHealer ) if ( healerweapon == 41 ) and ( loss > 1 ) and ( theHealth < 100 ) and ( theSkin == 274 ) and getElementType(theHealer) == "player" then setElementHealth ( localPlayer, 100 ) takePlayerMoney ( localPlayer, 100 ) givePlayerMoney ( theHealer, 200 ) cancelEvent() end end addEventHandler ("onClientPlayerDamage", localPlayer, medicJob )
  5. Alpha

    Medic problem

    Copy my code again, and no I don't think there is a way to remove debug, if you want to stop the debug messages showing to you, use /debugscript 0.
  6. Alpha

    Help?

    It is possible, not that anyone will help you.
  7. Alpha

    Medic problem

    function medicJob (theHealer, healerweapon, bodypart, loss) local theHealth = getElementHealth (source) local theSkin = getElementModel ( theHealer ) if ( healerweapon == 41 ) and ( loss > 1 ) and ( theHealth < 90 ) and ( theSkin == 274 ) and theHealer ~= localPlayer and getElementType(theHealer) == "player" then setElementHealth ( source, 100 ) takePlayerMoney ( source, 100 ) givePlayerMoney ( theHealer, 200 ) cancelEvent() end end addEventHandler ("onPlayerDamage", getRootElement(), medicJob )
  8. Maybe try: function sendenButton (state) if state == "left" then if source == senden_button then local localp = getLocalPlayer() local memoText = guiGetText(edit_memo) if memoText ~= "" and memoText:len() > 1 then triggerServerEvent("userpanelText", getLocalPlayer(), localp, memoText) guiSetText(edit_memo, "") else outoutChatBox("Du hast keinen Text eingegeben!", 255, 48, 48) end end end end addEventHandler("onClientGUIClick", getRootElement(), sendenButton)
  9. Depends on what he's going to do, if he has a server, then he can't use it. If he's making a resource he can't release it for 1.3. So yes it's hard to use it now.
  10. And are you clicking on that one object with that ID? Because if you're clicking on other ATMs, it won't work.
  11. Alpha

    weapon animtion

    Do you mean weapon skills? Use setPedStat
  12. Do you have one ATM object and it's id is 'LS_bank_ATM'? If you have more than one, then you have a problem because you're retrieving one element by the ID, and setting it's element data. So the check will work on that ATM object only. EDIT @ Unique: Won't matter serverside or clientside, you can interact with objects on both sides, either using a .map file or createObject, won't matter. Check what I said above.
  13. executeSQLQuery ( "INSERT INTO peds ( ID Peds, X, Y, Z, rX, rY, rZ ) VALUES ( IDPed+1, modelo, xP, yP, zP, rotX, rotY, rotZ ) " ) IDPed+1?? That's not correct at all, you must retrieve the IDPed from the database first.
  14. There is no for who argument in outputChatBox clientside.
  15. Mota, dbConnect can be used to connect to a SQLite database. Check the wiki documentation: dbConnect
  16. Alpha

    Hi all

    It is actually, you can use it to sort/order the table containing the bank money descendingly.
  17. Alpha

    Hi all

    table.sort Is better to use it in such situation. http://lua-users.org/wiki/TableLibraryTutorial
  18. Alpha

    I need help!

    Screenshots might help too.
  19. Alpha

    Msg Player Problem

    Try: elseif ( source == theMessageButton ) then local row = guiGridListGetSelectedItem ( PlayerGridList ) if not row or row == -1 then return end local playerName = guiGridListGetItemText ( PlayerGridList,row, 1 ) local player = getPlayerFromName(playerName) local theMessage = guiGetText( theMessageEdit ) local msg = table.concat({theMessage}, " ") triggerServerEvent("onMessagePlayer", localPlayer, player, msg )
  20. Oh yeah of course I will come! At least include more details in your post. EDIT: Also large font won't do any difference.
×
×
  • Create New...