-
Posts
467 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Gravestone
-
Anything in the debug?
-
function checkResolutionOnStart () local x,y = guiGetScreenSize() --get their screen size outputChatBox (x.."x"..y ) end --attach the function to the event handler addEventHandler ( "onClientResourceStart", resourceRoot, checkResolutionOnStart )
-
How does this even work? There is no event handling the function.
-
onPlayerJoin is triggered when the player has successfully joined the server, not when the player login. onPlayerLogin is triggered then.
-
Try this: vehiclesid = {429, 541, 480, 411, 565} marker = createMarker(x, y, z, "typeofmarker", size, 255, 0, 0, 255) addEventHandler( "onMarkerHit", marker, function (element) if getElementType(element) == "player" then local x,y,z = getElementPosition(element) local rx,ry,rz = getElementRotation(element) local r, g, b, a = getMarkerColor(marker) if r == 255 and g == 0 and b == 0 and a == 255 then local vehicle = math.random(1,#vehiclesid) local veh = createVehicle(vehicle, x, y, z, 0, 0, rx, ry, rz) warpPedIntoVehicle(element, veh) end end end )
-
Use onPlayerJoin instead. Client: function outPutScreen() local x,y = guiGetScreenSize() outputChatBox(""..x.."x"..y.."") end addEvent("outPutScreen", true) addEventHandler("outPutScreen", getRootElement(), outPutScreen) Server: function outPutScreenResolution() triggerClientEvent("outPutScreen", source) end addEventHandler ("onPlayerJoin", root, outPutScreenResolution)
-
The velocity is the 4th argument of createProjectile.
-
The script draws the player name with it's color but it doesn't set the player's nametag color according to his team. You can make a simple script for that using getTeamColor and setPlayerNametagColor.
-
I meant the part of code in which you're facing the error...
-
This will destroy every colshape and radar area. hillArea = { {1436.6826171875, -2940.1494140625, 13.546875, 500,500,500}, {1436.6826171875, -2640.1494140625, 13.546875, 500,500,500}, {1436.6826171875, -2340.1494140625, 13.546875, 500,500,500}, {1436.6826171875, -640.1494140625, 13.546875, 500,500,500} } hillRadar = { {1262.2802734375, -2769.48828125, 300, 300, 171, 175, 174, 80}, {1262.2802734375, -2469.48828125, 300, 300, 92, 46, 2, 80}, {2762.2802734375, -2169.48828125, 200, 300, 255, 0, 143, 80} } turfCol = nil hillRadars = nil function maketurf (thePlayer) if turfcol == nil and hillRadars == nil then for i,v2 in ipairs(hillArea) do turfCol = createColCuboid(unpack(v2)) end for i,v1 in ipairs(hillRadar) do hill = createRadarArea(unpack(v1)) end turfCol = true hillRadars = true else local allturfs = getElementsByType("radararea") local allcols = getElementsByType("colshape") for i, v2 in ipairs(allturfs) do destroyElement(v2) end for i, v1 in ipairs(allcols) do destroyElement(v1) end turfCol = nil hillRadars = nil end end addCommandHandler("show", maketurf)
-
We know that script doesn't work but we don't know why and in what way it doesn't work. We'll never know that unless you provide us with the part of the code.
-
What is the error being shown in the debug?
-
function setBlip(_, _, _, _, _, theSkin) if theSkin == 21 then outputChatBox("medic_blip") local blip_medic = createBlipAttachedTo ( source, 22 ) local team_axis = getTeamFromName("Axis") local players = getPlayersInTeam(team_axis) for i, player in ipairs(players) do setElementVisibleTo(blip_medic, player, true) end end end addEventHandler ( "onPlayerSpawn", getRootElement(), setBlip )
-
Most probably, there is some gui element overwriting that gui button.
-
Maybe the image is covering the screen? Have you tried using destroyElement? Please ask your client for a screenshot and provide us with it, thanks.
-
Dude we can't understand what you are trying to say unless we see what's wrong.
-
What do you mean can not click on the buttons, grids, images? Are the gui elements enabled/visible?
-
The code looks fine. Can you show us a screenshot of how the gui appears to the clients?
-
Post the code of any gui you're using.
-
Then you have to contact the owner of the script.
-
Neither on client side nor on server side is a function with "givePlayerLicense" name.
-
That doesn't really cause a problem. Feel free to try it yourself.
-
50 is the radius... @Bonsai, have a look at line 10: destroyElement( chatSphere ) Even if the chatsphere is created a billion times, that doesn't matter.
-
Check if the player's Z axis is more than a specified one.
-
Wrong forum homey. Post it here: https://forum.multitheftauto.com/viewforum.php?f=108