-
Posts
244 -
Joined
-
Last visited
Everything posted by Alpha
-
No, you don't need a database for it, it uses SQLite, and it already creates the database itself.
-
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 )
-
Damn you. I think he can do that by himself.
-
You're welcome.
-
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 )
-
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.
-
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 )
-
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)
-
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.
-
And are you clicking on that one object with that ID? Because if you're clicking on other ATMs, it won't work.
-
It's for 1.3.1 onwards only.
-
Do you mean weapon skills? Use setPedStat
-
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.
-
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.
-
There is no for who argument in outputChatBox clientside.
-
Mota, dbConnect can be used to connect to a SQLite database. Check the wiki documentation: dbConnect
-
Error: call: failed to call 'item-system:getBadges' [Sting?]
Alpha replied to micheal1230's topic in Scripting
Show Item-system resource's meta.xml. -
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 )
-
Oh yeah of course I will come! At least include more details in your post. EDIT: Also large font won't do any difference.