MasterTobi
Members-
Posts
78 -
Joined
-
Last visited
Everything posted by MasterTobi
-
bindkey at clientside don´t need the arg source, use bindKey ("p","down", "hookCursor" )
-
start = createColTube (1978.11328125, -2494.826171875,13,1,5) function startcheck() if (isElementWithinColShape(source ,start)) then end end addEventHandler ( "onElementColShapeHit", getRootElement(), startcheck ) wtf my Server says: " Bad Argument @ isElementwithinColShape "
-
hm the code is unknowable truckerVehicles = { [598]=true, [596]=true, [597]=true, [599]=true } getTeamFromPlayer="mr_trucker" then marker1 = createMarker ( 552.69714355469, 1660.6196289063, 5.9245247840881) string getMarkerType ( marker marker1=cylinder ) float getMarkerSize ( marker marker1= 10 ) 255, 255, 0, 255 getMarkerColor ( marker marker1 ) onClientHitMarker then setMarkerVisible (marker1)="false" thetrailer = trailer = createVehicle ( 591 ) attachTrailerToVehicle ( theVehicle, trailer ) marker2 = createMarker (-1345.484375, 2678.1291503906, 49.044738769531) string getMarkerType ( marker marker1=cylinder ) float getMarkerSize ( marker marker1= 10 ) 255, 255, 0, 255 getMarkerColor ( marker marker1 ) onMarkerHit setMarkerVisible="false" detachTrailerFromVehicle ( vehicle theVehicle, [vehicle theTrailer] ) bool givePlayerMoney ( player thePlayer, int 100 ) outputChatBox ("#FFFF00Ya you really earned it man!",source) function enterVehicle ( thePlayer, seat, jacked ) if ( truckerVehicles[getElementModel ( source )] ) and ( not mr_trucker[getTeamFromPlayer ( thePlayer )] ) then removePedFromVehicle ( thePlayer ) outputChatBox ( "#FFFF00You are not a trucker! #FF0000Get out of my cab!", thePlayer ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) and the code if ( truckerVehicles[getElementModel ( source )] ) and ( not mr_trucker[getTeamFromPlayer ( thePlayer )] ) then It seems like SAMP, or not ?
-
hey i need Help i searched a code or anything that start me a race in DM like SAMP. I hope you know the GodfatherScript, there is ja go-cart race. So i want to script a function like function startrace(source,command,player2,player3,player4) .... end addCommandHandler("startrace",startrace) also i enter the command /startrace ..... in the Chatbox and the Player´s (me and player 2-4 ) are run to drive a race. i hopp you understand me what i want thx
-
createRadarArea ( float leftX, float bottomY, float sizeX, float sizeY, [ int r = 255, int g = 0, int b = 0, int a = 255, element visibleTo = getRootElement() ] ) createRadarArea ( -905.5929,-2933.0986,3900,3500, 255, 0,0,10,source) it´s easy leftX is the Position where your radararea start << startpoint X from the Left Side your Map BottomY is the Y Point from the BottomSide your Map size X and Y is the Size your RadarArea also Leftx + SizeX and BottomY+SizeY omg nobody understand this i hope you know what i mean ^^
-
so i have edit the code and it goes --some form of cruise control theCruiseTimer = "noone-nothing" function cruiseOff(thePlayer) --its on, so turn it off killTimer(theCruiseTimer) theCruiseTimer = "noone-nothing" setControlState ( thePlayer, "accelerate", false ) setControlState ( thePlayer, "brake_reverse", false ) end function cruiseOn(thePlayer, speed, theCar) theCar1 = getPedOccupiedVehicle(thePlayer) if(theCar1) then local x1, y1, z1 = getElementVelocity(theCar) local speed1 =((x1^2 + y1^2 + z1^2)^0.5) * 161 if(speed1 < speed) then setControlState ( thePlayer, "brake_reverse", false ) setControlState ( thePlayer, "accelerate", true ) elseif(speed1 > speed) then setControlState ( thePlayer, "accelerate", false ) -- setControlState ( thePlayer, "brake_reverse", true ) end else cruiseOff(thePlayer) end end function cruiseControl(thePlayer) local theCar = getPedOccupiedVehicle(thePlayer) if(theCruiseTimer == "noone-nothing") then if(theCar) then local x, y, z = getElementVelocity(theCar) local speed =((x^2 + y^2 + z^ 2)^0.5) * 161 --its off, so turn it on theCruiseTimer = setTimer(cruiseOn, 50, 0, thePlayer, speed, theCar) else outputChatBox("Error: players don't have cruise control switches. Must be in car.", thePlayer) end else cruiseOff(thePlayer) end end addCommandHandler("ct", cruiseControl)
-
yes i know but i understand the code .sqrt(x^2 + y^2 + z^2) * 161 << cokacola says that the code goes local speed = math local.sqrt(x^2 + y^2 + z^ speed =2) * 161 <<< speed=2 is not going math.sqrt(x^2 + y^2 + z^2) * 161 and this musst be math.sqrt((x^2 + y^2 + z^2) * 161) or not ?
-
hey i have a question about this tread https://forum.multitheftauto.com/viewtopic.php?f=91&t=24819&p=292845&hilit=cruise+control#p292845 cokacola write if(theCar) then local x, y, z = getElementVelocity(theCar) .sqrt(x^2 + y^2 + z^2) * 161 local speed = math local.sqrt(x^2 + y^2 + z^ speed =2) * 161 math.sqrt(x^2 + y^2 + z^2) * 161 but my console say that .sqrt(x^2 + y^2 + z^2) * 161 <<< it´s wrong exceptet near "." and local.sqrt(x^2 + y^2 + z^ speed =2) * 161 math.sqrt(x^2 + y^2 + z^2) * 161 << i think it´s wrong can everybody help me thx
-
https://forum.multitheftauto.com/viewtopic.php?f=91&t=26100
-
hm thx my prob is : i would like that the ped walk across LS so i need 10000000000 points . therefore I thought it give such a thing in the kind > i have a startpoint and i say the ped, it is to run to the finalpoint
-
hey I would like gladly ped scripting. The Ped have to move from an point A to point B then back or to Point C i have script a ***** function function makePed(source) x,y,z = getElementPosition(source) rz = getPedRotation(source) ped1 = createPed(56, 1481,-1739,13) setPedRotation(ped1, 270) x,y,z = getElementPosition(source) circlearea = createColCircle(1537,-1739,5) circlearea1 = createColCircle(1813,-1821,5) circlearea2 = createColCircle(1813,-1859,5) circlearea3 = createColCircle( 1830, -1859,5) setPedAnimation( ped1, "ped", "WOMAN_walknorm") function move(source) if isElementWithinColShape ( ped1, circlearea )then setPedRotation(ped1, 194) end if isElementWithinColShape ( ped1, circlearea1 )then setPedRotation(ped1, 194) end if isElementWithinColShape ( ped1, circlearea2 )then setPedRotation(ped1, 296) end if isElementWithinColShape ( ped1, circlearea3 )then setPedRotation(ped1, 0) end end setTimer(move,1000,0,source,ped1) end addCommandHandler("ped", makePed) but this is really shit have anybody ideas as I can realize that ? mfg
-
than you musst include the newname in mtaserver.conf like <resource src="<yournewgamemodefoldername>" startup="1" protected="0"/>
-
i have the logingui from the community i think i have "repair" the script with the new codes but it is easy. you can use the command /upgrade, you have to write it in your console
-
??? you mean your ***.lua or not? or means you a function in your script ? if you rename a ***.lua so you must edit your meta.xml
-
you musst edit your meta.xml <meta> <script src="<newname>.lua"/> or if it clientside <script src="<newname>.lua" type="client"/> </meta>
-
you musst edit your meta.xml or if it clientside
-
spezial thx my afk code is this : function funcInput ( key, keyState ) afkTime =60000*15 if ( keyState == "up" ) then setTimer(afkgo,afkTime,1) end if ( keyState == "down" ) then afktimer = getTimers ( afkTime) for timerKey, timerafk in ipairs(afktimer) do killTimer ( timerafk ) end end end function afkgo() afkTime =60000*15 afktimer = getTimers ( afkTime) for timerKey, timerafk in ipairs(afktimer) do killTimer ( timerafk ) end outputChatBox ( "afk" ) end function bindTheKeys () outputChatBox("jupp") bindKey ( "forwards", "down", funcInput ) bindKey ( "forwards", "up", funcInput ) bindKey ( "backwards ", "down", funcInput ) bindKey ( "backwards ", "up", funcInput ) bindKey ( "left", "down", funcInput ) bindKey ( "left", "up", funcInput ) bindKey ( "right", "down", funcInput ) bindKey ( "right", "up", funcInput ) end addEventHandler("onClientPlayerSpawn",getLocalPlayer(),bindTheKeys) i hopp it is good you were kicked after 15mins if you not move edit: you have to write your kick command in the function afkgo()
-
spezial thx my afk code is this : function funcInput ( key, keyState ) afkTime =60000*15 if ( keyState == "up" ) then setTimer(afkgo,afkTime,1) end if ( keyState == "down" ) then afktimer = getTimers ( afkTime) for timerKey, timerafk in ipairs(afktimer) do killTimer ( timerafk ) end end end function afkgo()afkTime =60000*15 afktimer = getTimers ( afkTime) for timerKey, timerafk in ipairs(afktimer) do killTimer ( timerafk ) endoutputChatBox ( "afk" )end function bindTheKeys ()outputChatBox("jupp") bindKey ( "forwards", "down", funcInput ) bindKey ( "forwards", "up", funcInput ) bindKey ( "backwards ", "down", funcInput ) bindKey ( "backwards ", "up", funcInput ) bindKey ( "left", "down", funcInput ) bindKey ( "left", "up", funcInput ) bindKey ( "right", "down", funcInput ) bindKey ( "right", "up", funcInput ) endaddEventHandler("onClientPlayerSpawn",getLocalPlayer(),bindTheKeys) i hopp it is good you were kicked after 15mins if you not move edit: you have to write your kick command in the function afkgo()
-
hm hey i need a function or event, those examines whether client itself moved or has anybody an afk-kicker ? thx sry for my ***** english i understand english very good, but writing OMG
-
hm hey i need a function or event, those examines whether client itself moved or has anybody an afk-kicker ? thx sry for my ***** english i understand english very good, but writing OMG
-
thx a lot for the info´s
-
thx a lot for the info´s
-
ehm i have a reallife server in mta and i scrippted an antimoneyhack script also the script check the money from the player. if there a discrepancy then gotten the admins a warning. so then i tested a hack tool and then was noticeable to me, mta that adjusts. you say >>Money is handled server-side<< also everyone money hack dont work ?
-
ehm i have a reallife server in mta and i scrippted an antimoneyhack script also the script check the money from the player. if there a discrepancy then gotten the admins a warning. so then i tested a hack tool and then was noticeable to me, mta that adjusts. you say >>Money is handled server-side<< also everyone money hack dont work ?
-
hey, first sry for my english i have a tool to hack/cheat in mta and samp so i hacked on my server money, my player become the money and the game or mta set my money to the orginal value. is that a coincidence? or is that intended ? if is intended then it is worth anti-hack itself script to script ?
