-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
Yes and please tell me what you are trying to do and tell me the errors if exists , /debugscript 3
-
function hill_Enter ( player, matchingDimension ) if (player and getElementType(player) == "player" and matchingDimension) then setTimer( function (player) radx4() playSound("sounds/rad.mp3") if radn and radn >= radmaxx then setElementData(player,"blood",-666) end end,1000,0,player) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter)
-
Put your current code between the tags, [lua] [./lua] The code is not clear enough to read
-
So, you mean you want to get a message inform you for each time a player clicked on a player? and obviously to click on someone you've to use the cursor..
-
addEventHandler ( "onClientClick", getRootElement() function (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, element) if not isCursorShowing() then return end if element and getElementType(element) == "player" then --your code end end)
-
It looks enjoyable nice work keep it up man btw, which programme you use to map/draw these 3D Objects
-
@Estratigia, your code will returns with some errors ! Try this: function freeze(player) local occveh = getPedOccupiedVehicle(player) if isPedInVehicle(player) == true then if isElementFrozen(occveh) == false then outputChatBox("Your vehicle has been frozen!", player, 79, 226, 249) setElementFrozen(occveh, true) elseif isElementFrozen(player) == true then outputChatBox("You have been unfrozen!", player, 79, 226, 249) else outputChatBox("You have been frozen!", player, 79, 226, 249) setElementFrozen(player, true) end else setElementFrozen(occveh, false) outputChatBox("Your vehicle has been unfrozen!", player, 79, 226, 249) end end addCommandHandler("freeze", freeze)
-
Sure, try this and tell me the result: --Server side: local atBag = {} function nextStep() for i, robber in pairs (getElementsWithinColShape(houserobCircle, "player")) do if not isPedDead(robber) and isPedOnGround(robber) and robberTeams[getTeamName(getPlayerTeam(robber))] then local x,y,z = getElementPosition(robber) exports.RPGcommands:giveMoney(robber, 16000) exports.RPGcommands:sendMessage("*STORE ROBBERY* You got $16000 from the rob, go to the a warehouse in the city to get more money!", 0, 255, 0, robber) atBag[robber] = createObject(1210,x,y,z) exports.bone_attach:attachElementToBone(atBag[robber],robber,12,0,0.05,0.27,0,180,0) triggerClientEvent("showWarehouses", robber) end end end addEvent("onRemoveTheBag",true) addEventHandler("onRemoveTheBag", getRootElement(), function (robber) if atBag[robber] and isElement(atBag[robber]) then destroyElement(atBag[robber]) atBag[robber] = nil end end) --Client side: function finish(robber) if not isPedDead(robber) and isPedOnGround(robber) and robber == getLocalPlayer() then exports.RPGcommands:giveMoney(robber, 10000) exports.RPGcommands:sendClientMessage("You got $10000 from the warehouse.", 0, 255, 0) hideALL() triggerServerEvent("onRemoveTheBag",robber,robber) end end addEventHandler("onClientMarkerHit", marker, finish)
-
Ah I didnt see the other side where you created the object..
-
function finish(robber) if not isPedDead(robber) and isPedOnGround(robber) and robber == getLocalPlayer() then exports.RPGcommands:giveMoney(robber, 10000) exports.RPGcommands:sendClientMessage("You got $10000 from the warehouse.", 0, 255, 0) hideALL() if isElement(atBag) then destroyElement(atBag) atBag = nil end end end addEventHandler("onClientMarkerHit", marker, finish)
-
Basically, resourceRoot = getResourceRootElement(getThisResource()) instead of keep writing all that, resourceRoot is a predifined variable
-
Try that, function loadPlayerTXD() local playertxd = engineLoadTXD("models/omyst.txd") engineImportTXD(playertxd, 60) outputChatBox("Player skin loaded!") end addEventHandler("onClientResourceStart", resourceRoot, loadPlayerTXD)
-
You can use the event "onClientClick" and check if the clicked element is a player or not, like that addEventHandler ( "onClientClick", getRootElement() function (button, state, absoluteX, absoluteY, worldX, worldY, worldZ, element) if element and getElementType(element) == "player" then --your code end end)
-
If you mean setVehicleHandling ,As far as I know it has an ability to set the handling to bikes too
-
Glad to help
-
use guiGetScreenSize
-
Try that, client side: function buyFRepair () triggerServerEvent ( "buyFRepair", getLocalPlayer(), getLocalPlayer()) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], buyFRepair ) server side: function buyFRepair(player) if not player then return end if isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) if onTakeMoney( player, infos.frepairPrice) then if vehicle then setElementHealth( vehicle,1000 ) outputChatBox("[FULL REPAIR] #FFFFFF"..getPlayerName(player).." #FFFFFFhas bought full repair. #B72A00-1600",root,_r,_g,_b,true) end else outputChatBox("[ERROR] #ffffffYou dont have enough cash!",player,255,0,0,true) end else outputConsole ( "You must be in a vehicle!",player,255,0,0,true) end end addEvent("buyFRepair",true) addEventHandler("buyFRepair",root,buyFRepair)
-
Hey, show us an example
-
What I just found wrong is if (type(result == "table")) then Which it must be like that, if (type(result) == "table") then
-
Yes I know that, it must be like that local g = getElementData(localPlayer, "Group") if (g == "HoBoS") then --your code. end
-
Your code is totally messy, you're scripting in client side and adding player as parameter, remove it and use localPlayer also, this part make no senses local g = if getElementData(player, "Group") if (g == "HoBoS") then
-
Well, I'll send it via pm