-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Make sure: - server script did started. - Client and server are in the same folder. - server script has been written in the meta.xml - server script is server side... more mistakes that can lead to this result?
-
try: local x, y, z = getElementPosition(getPedOccupiedVehicle (thePlayer) or thePlayer)
-
addEventHandler ( "onPlayerSpawn", root, function ( ) local account = getPlayerAccount ( source ) if ( account and not isGuestAccount ( account ) ) then setPlayerWantedLevel ( source, getAccountData ( account, "save-level" ) or 0 ) local team = getTeamFromName ( getAccountData ( account, "save-team" ) ) if ( team ) then setPlayerTeam ( source, team ) else outputChatBox ( "Get a Job NOOB", source ) end for slot = 1, 12 do local wep = getAccountData ( account, "save-wep".. slot ) local ammo = getAccountData ( account, "save-ammo".. slot ) giveWeapon ( source, wep, ammo ) end end end ) setPlayerWantedLevel ( source, getAccountData ( account, "save-level" ) or 0 )*
-
Because you don't load all the account data? setPlayerWantedLevel ( source, getAccountData ( account, "save-level" ) or 0 ) What stats???? nobody has written anything in the script about stats.
-
https://wiki.multitheftauto.com/wiki/ToggleControl https://wiki.multitheftauto.com/wiki/On ... aponSwitch https://wiki.multitheftauto.com/wiki/SetTimer
-
np. nope, I don't have time for paid scripting.
-
aha lazy guy. Next time you make your own. local maxLevel = 20 -- max level local untilW = 60 -- sec local raising,level = (maxLevel/untilW)/10,0 untilW = nil local runningTimer function editSomeWater() level = level + raising -- level raising setWaterLevel ( level ) -- set the level if level >= maxLevel then -- compare values of level and max level setWaterLevel ( maxLevel ) -- set it back to max level for perfection if isTimer(runningTimer) then -- check if the timer exist killTimer(runningTimer) -- stop the timer end runningTimer,level,maxLevel = nil,nil,nil -- delete data (ram) end end setTimer (function () -- set a timer for 15000 millisec (15 sec), runs one time "1" runningTimer = setTimer ( editSomeWater, 100, 0 ) -- set an invinity timer to set the water level, (0 = invinity) (only stops when you stop him with killTimer) end,15000,1)
-
Must it stay at 20 m? local level = 0 local runningTimer function editSomeWater() level = level + 0.033333 setWaterLevel ( level ) if level >= 20 then setWaterLevel ( 20 ) if isTimer(runningTimer) then killTimer(runningTimer) end runningTimer = nil end end setTimer (function () runningTimer = setTimer ( editSomeWater, 100, 0 ) end,15000,1)
-
The script is included with the map? or apart? raising/draining 20 meters 60 sec 20/60 = 0.33333333 per sec 0.33333333 / 10 = 0.033333 per 0.1 sec (100 millisecond) local level = 0 local waterState = "raising" local runningTimer function editSomeWater() if waterState == "raising" then level = level + 0.033333 setWaterLevel ( level ) if level >= 20 then waterState = "draining" setWaterLevel ( 20 ) end elseif waterState == "draining " then level = level - 0.033333 setWaterLevel ( level ) if level <= 0 then waterState = nil --"raising" for repeating setWaterLevel ( 0 ) end elseif isTimer(runningTimer) then killTimer(runningTimer) end end setTimer (function () runningTimer = setTimer ( editSomeWater, 100, 0 ) end,15000,1)
-
btw what is the use of that? (I only know that it is handy for exporting) but nothing more or less.
-
You have the position of the cursor and you have the positions of the rectange, as far I know it isn't that hard to compare them.I haven't said that I finished the code, I just help you creating the basic. It is your job to finish it. Note* it doesn't store a cursor position because it is a local.
-
local rectangePos = {{200, 200,400,400}} addEventHandler("onClientRender",root, function() local myTable = rectangePos[1] local XposStart,YposStart,XposEnd,YposEnd = myTable[1],myTable[2],myTable[3],myTable[4] local x,y,,yD,zD = getCursorPosition ( ) end) + https://wiki.multitheftauto.com/wiki/OnClientClick
-
Then you are at the wrong section. This is for scripting.
-
shotguns do have a spray, every spark counts as a bullet.
-
remove: local marker = createMarker() -- line 9 Also: setElementInterior(myMarker, 1494.3350, 1305.6510, 1093.2890) setElementInterior ( element theElement, int interior [, float x, float y, float z] ) -- read syntax clearly local myMarker = createMarker(-2620.7634277344, 1376.0603027344, 7.1228446960449, 'cylinder', 2.0, 255, 0, 0, 150) -- create myMarker function MarkerHit( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then setElementInterior( hitElement, 3, 1494.3350, 1305.6510, 1093.2890) end end setElementInterior(myMarker,3, 1494.3350, 1305.6510, 1093.2890)-- I have set it to interior 3, if that isn't your interior you have to change the value setElementDimension(myMarker, 3) addEventHandler( "onMarkerHit", myMarker, MarkerHit )
-
or onClientClick https://wiki.multitheftauto.com/wiki/OnClientClick You can use that for clicking at directx render images or specific locations. compare the image start size and the image end size with the absoluteX and absoluteY value. local Xstart, Ystart = 100,100 local Xend,Yend = Xstart+100, Ystart+100 addEventHandler ("onClienClick",root, function (button, state,absoluteX, absoluteY ) if (absoluteX > Xstart and absoluteX < Xend) and (absoluteY > Ystart and absoluteY < Yend) then outputChatBox("clicked on the image") end end)
-
Why don't you take a look in the .map file and check if the colour codes are correct saved.
-
most of the dx functions require the event's "onClientRender" or "onClientPreRender". 3D hud will be hard. But I don't think it will be impossible. 2: to the left side of the player or left side of the screen? There are some attachment functions, for attach things to other things. https://wiki.multitheftauto.com/wiki/AttachElements https://wiki.multitheftauto.com/wiki/Se ... hedOffsets
-
if it is because it is to big you can also create your own password protection. addEventHandler ( "onPlayerJoin", root, function ( ) -- autoLogin local cSerial = getPlayerSerial ( source ) if cSerial then -- no bugs? local pass = cSerial .. "X" -- fill this in X<------------------------------------------ local account = getAccount ( tostring ( cSerial ), pass ) if ( account ) then logIn ( source, account, pass ) outputChatBox ( "Logged in successfully", source, 255, 255, 255 ) else local account = addAccount ( tostring ( cSerial ), pass ) if ( account ) then logIn ( source, account, pass ) outputChatBox ( "Registered and logged in successfully", source, 255, 255, 255 ) else outputChatBox ( "Failed to register!", source ) end end end end)
-
aha lol O_o but then there should be an error.
-
if that works, WHAT THE ... DOESN'T WORK!
