-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
well you have to change the offset to what you want. You can also do this: local offX,offY,offZ = getPositionFromElementOffset(car,5,0,0) local offX2,offY2,offZ2 = getPositionFromElementOffset(car,0,5,0) setCameraMatrix(offX,offY,offZ,offX2,offY2,offZ2) Which makes it possible to attach the camera in every position you want. and if you want to rotate the camera when it is attached to the vehicle. See wiki example: https://wiki.multitheftauto.com/wiki/GetCamera cam = getCamera() setElementPosition( cam, 0,0,0 ) -- Clear camera target myVehicle = getPedOccupiedVehicle(localPlayer) attachElements( cam, myVehicle, 0,-4,2, -20,0,0 )
-
offset = not the car position....... offset is the offset you want to set from the car it self. The car position is already within the matrix of the car. function cam () local x,y,z = getElementPosition(car) local offX,offY,offZ = getPositionFromElementOffset(car,5,0,0) -- 5 units offset at the X as. setCameraMatrix(offX,offY,offZ,x,y,z) -- facing the car. end
-
wut? If this isn't what you want, explain better. If you do not understand what these lines do, ask me how they work. and anyway explain it better, I am at the moment only gambling how you want this cam.
-
You can better ask this question on the dutch section or at the resource section. Deze sectie is niet bedoeld voor resources, je kan het beter vragen in de Nederlandse sectie of in de resources sectie. Slechte Engelse lerares? (ik leef met je mee....)
-
https://wiki.multitheftauto.com/wiki/GetElementMatrix function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end Get your offset and put your camera on it. Be creative.
-
@toxicsmoke11 Yes that is a bug, but that won't matter so much because the rounded numbers are accurate enough. Also by not doing that(not convert to string), it saves you some bandwidth. @Feche1320 I think it is more a kind of streamed in bug. I have a sort of similar bug: When I attach an object(with disable col) to my car. It will only be visible when I start driving. (before moving it is only at the position I created it) What if you force them to be not stream able and enabled that later? https://wiki.multitheftauto.com/wiki/Se ... Streamable It would be a logic explanation.
-
Help yourself. Debug it using debug strategies. Wiki can help you, I can't.
-
1: Use setElementAlpha instead of setObjectScale. 2: isInvisible table makes no sense, just use a boolean. local isInvisible = true local isInvisible = false 3: "onClientPlayerJoin" makes no sense, this is only for other players to join. Not for the localPlayer. 4: loop through the players at line 51, doesn't make sense. 6: "onClientMapStarting" is a custom race event, don't you need to enable it? addEvent("onClientMapStarting",true)
-
Does that mean you don't have to try it? I don't think so. As long as you try things there are alway People to correct you and at the end you have your script and learnt from it. If there are things you don't understand, I expect you to ask them and not that you say that you can't do it because that is wasting my time.
-
setPedAnimation(source,false) 2 seconds is 2000 ms not 5000 ms.
-
What do you mean with nothing? You are the one who needs to debugging it, show me the debug results. and it is stupid to use the same debug text all over the script, you need to write what happens there. Not just copy my text, so you don't know what part of the code get executed. Don't forget the /debugscript 3
-
https://wiki.multitheftauto.com/wiki/On ... eCollision
-
You have to use outputDebugString the same as outputChatBox, does nothing else then outputChatBox in to your debug. These debug logs are meant for you, so you can see what is going on. addEvent("afkStatus",true) addEventHandler("afkStatus",root, function (status) outputDebugString("serverside part executed") if status then setPlayerName (client,getPlayerName(client).. "|AFK") outputDebugString("set to afk") else local name = string.gsub(getPlayerName(client),"|AFK", "") if name then outputDebugString("set to not afk") setPlayerName (client,name) end end end) Sorry I do not have notepad ++ on my mac...... so no tabs.
-
yes, if the resource which this xml file is in uses the exact same name.
-
you copied it too fast, I made a typo. outputDebugString Add it at every part of the code you aren't sure it does get executed.(like server side for example)
-
add some manually debug inside your code: outputDebugString("write here which part of the code get executed") Also make sure your name isn't too long. ( Maximum player name length is 22 characters. )
-
Try this: Serverside addEvent("afkStatus",true) addEventHandler("afkStatus",root, function (status) if status then setPlayerName (client,getPlayerName(client).. "|AFK") else local name = string.gsub(getPlayerName(client),"|AFK", "") if name then setPlayerName (client,name) end end end) Set afk triggerServerEvent("afkStatus",localPlayer,true) Set not afk. triggerServerEvent("afkStatus",localPlayer,false)
-
See syntax of clientside outputChatBox and serverside outputChatBox, then you know what you are doing wrong. Server bool outputChatBox ( string text [, element visibleTo=getRootElement(), int r=231, int g=217, int b=176, bool colorCoded=false ] ) Client bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) Clientside doesn't need a target to send it too, since it happens on the client his pc.
-
The file is clientside, the code you are using is not. Post it again if you followed my instructions.
-
Please convert you code to clientside, follow the instructions of my post before.
-
clientside addCommandHandler has a differed syntax: Serverside: player playerSource, string commandName, [string arg1, string arg2, ...] Clientside: string commandName, [string arg1, string arg2, ...] Use at clientside localPlayer instead. (DON'T DEFINE localPlayer INSIDE THE FUNCTION)
-
WRONG SECTION and WRONG SECTION CLICK HERE (resources) CLICK HERE (paid scripter) What CAN you post on this section?????
-
When I am talking about a cookie I am not talking about html and shit. I am talking about something similar to that in mta: creating a clientside xml file, which contains a personal code. A code which another pc can't fake. If the code or serial doesn't match with the account, you have to re-login again. Timestamp is for extra security, so after a while the player has to re-login again.
-
I never mentioned the serverside functions: "onPlayerSpawn" "onPlayerQuit" "onPlayerWasted" You are going to create the blips clientside. and I forgot the event: "onClientPlayerQuit" --> remove blip and save the blips like this: playerBlibs[player]= blip get the blips like this: local blip = playerBlibs[player] clear the data from the table like this: playerBlibs[player] = nil
-
clientside local playerBlibs = {} -- events -- "onClientPlayerSpawn" --> attach blip "onClientPlayerWasted" --> remove blip "onClientElementDataChange" --> attach blip/remove blip "onClientResourceStart" --> (use resourceRoot instead of root) loop through players: attach blips serverside -- events -- "onResourceStart" --> (use resourceRoot instead of root) loop through players: set the elementdata to false for all players. So onClientElementDataChange event will work in the beginning.
