-
Posts
708 -
Joined
-
Last visited
Everything posted by K4stic
-
I no have say is my i just ask help in part who i make
-
How make Owner's i mean then player's in same Group take this turf to be can't take it again untill it take's other group and to output there => outputChatBox ( "Turf owners: here be the name of that Group Turf Owner", p, 255, 255, 0 ) <= Sorry for my bad english addEventHandler ( 'onColShapeHit', root, function ( p ) if ( getElementData ( p, "Group" ) ) then if ( source == pCuboid ) then outputChatBox ( "Turf owners: coming soon!", p, 255, 255, 0 ) outputChatBox ( "Wait 5 min to take turf.", p, 255, 255, 0 ) setRadarAreaFlashing ( pArea, true ) getElemetdata( p, "owners") local pGang = getElementData ( p, "Group" ) setTimer ( function ( ) setRadarAreaColor ( pArea, iR2, iG2, iB2, 100 ) givePlayerMoney ( p, 5000 ) outputChatBox ( "Congratulations, #FFFF00 you have taken the turf!", p, 0, 255, 0, true ) setRadarAreaFlashing ( pArea, false ) getElementdata ( p, "Group" ) setElementdata( p, "owners" ) end ,300000, 1 ) end else outputChatBox ( "Get in a group first!", p, 255, 0, 0 ) end end ) addEventHandler ( 'onColShapeLeave', root, function ( ) if ( source == pCuboid ) then setRadarAreaFlashing ( pArea, false ) end end )
-
How make it in same pozition? pls tell me and give small tut if you can local pArea = createRadarArea( 1877.18555, 642.92706, 200, 100, 0, 255, 0, 175 ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ local pCuboid = createColCuboid(1877.18555, 642.92706, 9.82031, 100.05969238281, 120.13433837891, 13.156658172607)
-
I vote for 3ɑsn8 ɑʟsnɾq is good person and help other's
-
thx it's work i will say you if i find bug because i have fix with help of community and some my self that 5-6 time's and still bugget after 1 day
-
says error: attempt to perform arithmetic on a nil value setElementData ( source, "cans", tonumber(getElementData(source, "cans") or 0) + cans, false )
-
and another help pls it's says error => attempt to perform arithmetic on a boolean value setElementData ( source, "cans", (getElementData(source, "cans") + cans), false )
-
work's good but how make it to take first the job and the spawn boat and go to fishing because now is :need have spawned the boat and then take the job to get fish
-
thx work but i need to player hit it and sell the fish
-
--Server side local index,theBoat; for index,theBoat in ipairs ( getElementsByType ( "vehicle" ) ) do if ( model == 453 ) then setElementData(theBoat, "fishboat", true) setElementData(theBoat, "fishes", 0) end end finish = createMarker( 971.8, -2103.6, 2.2,"cylinder", 2, 0, 0, 255, 155) FishingMinigameBlip = createBlipAttachedTo ( finish, 9, 2, 0, 0, 255, 255, 0, 250, getRootElement() ) addEventHandler("onMarkerHit", finish, function (thePlayer) if ( getElementType ( thePlayer)) == "player" then local fishes = getElementData( thePlayer, "fishes") or 0 outputChatBox ( "You have sold "..fishes.." fishes and earned $"..fishes * 3,thePlayer) givePlayerMoney ( thePlayer,fishes* 3 ) setElementData ( thePlayer, "fishes", 0, false) end end ) addEventHandler ( "onVehicleEnter", getRootElement(), function(thePlayer) if getElementData(getPedOccupiedVehicle(thePlayer),"fishboat") then triggerClientEvent(thePlayer, "enableFishermanMission",thePlayer) end end ) addEventHandler ( "onVehicleExit", getRootElement(), function(thePlayer) if getElementData(source,"fishboat") then triggerClientEvent(thePlayer, "disableFishermanMission",thePlayer) end end ) --Client side LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end addEvent( 'enableFishermanMission', true ) addEventHandler( 'enableFishermanMission', getRootElement( ), function( ) if ( source == localPlayer ) then addEventHandler( 'onClientRender', getRootElement( ), FishermanGUIText ) Timer = setTimer( checkfishesbleh, 5000, 0 ) end end ) function checkfishesbleh( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then local aSpeed = getElementSpeed( vehicle, 'kph' ) local curfish = getElementData( vehicle, 'fishes' ) or 0 if ( curfish > 499 ) then setElementData( vehicle, 'fishes', 500 ) else if ( aSpeed >= 20 ) then setElementData( vehicle, 'fishes', ( curfish + math.random( 4 ) ) ) end end end end addEvent ("disableFishermanMission",true) addEventHandler ("disableFishermanMission",getRootElement(), function() if (source == getLocalPlayer()) then removeEventHandler ("onClientRender",getRootElement(),FishermanGUIText) killTimer(checkfishesbleh) end end )
-
same problem not give a fish and no error's
-
don't see it and sorry i make wrong code is with one ')' but who i have say is no give fish
-
thx Alexs_Steel that part work Now new problem --client side function getheVehicleSpeed() return (x^2 + y^2 + z^2) ^ 0.5 end addEvent ("enableFishermanMission",true) addEventHandler ("enableFishermanMission",getRootElement(), function() if (source == getLocalPlayer()) then addEventHandler ("onClientRender",getRootElement(),FishermanGUIText) end checkfishesbleh = setTimer( function() kmh = math.floor( getheVehicleSpeed( getPedOccupiedVehicle(getLocalPlayer()), getElementVelocity (getPedOccupiedVehicle(getLocalPlayer())) ) * 100 * 1.61 ) curfish = getElementData(getPedOccupiedVehicle(getLocalPlayer()),"fishes") if curfish > 499 then setElementData(getPedOccupiedVehicle(getLocalPlayer()),"fishes",500) else if kmh >= 20 then setElementData(getPedOccupiedVehicle(getLocalPlayer()),"fishes",curfish + math.random(1,4)) end end end ,5000,0) end ) No error's just it not give fishes
-
maybe because exports work with client side!
-
addEventHandler("onMarkerHit", finish, function (thePlayer) if ( getElementType ( thePlayer)) == "player" then local fishes = getElementData( thePlayer, "fishes") outputChatBox ( "You have sold "..fishes.." fishes and earned #00FF00$"..fishes * 3,thePlayer) givePlayerMoney ( thePlayer,fishes* 3 ) setElementData ( thePlayer, "fishes", 0, false) end end ) it's output me error => server.lua:5: attempt to concatenate local 'fishes' (a boolean value)
-
Hello Community *Today i have make a License System it's Open source so you can edit it! *Remember and pls Do not Remove my Credit's Download Link