
robod
Members-
Posts
16 -
Joined
-
Last visited
Everything posted by robod
-
this doesnt make perfect square. sometimes its rectangle
-
Hi how can I make perfect square on all resolutions? Is there better way than store positions in array?
-
First you say "Oh ok. Try to use setControlState instead of toggleControl" and then "setPedControlState is for peds. For local player use setControlState and "enter_passenger" as a control name. " I tested both and this still dont work
-
can you show an example? i dont understand or modify the code
-
setPedControlState is for enable entering vehicle by pressing g. How can I mix this. addEvent("goPassaneger", true) function goPassaneger() setPedControlState ( getLocalPlayer(), "enter_passenger", true ) toggleControl ( "enter_passenger", true ) setControlState ( "enter_passenger", true ) end addEventHandler("goPassaneger", getRootElement(), goPassaneger) just like this?
-
i want if player press f for steal the car acts like he pressing g. https://wiki.multitheftauto.com/wiki/WarpPedIntoVehicle this just warps the ped into vehicle it's not that i want
-
ok so i have this client addEvent("goPassaneger", true) function goPassaneger() setPedControlState ( getLocalPlayer(), "enter_passenger", true ) toggleControl ( "enter_passenger", true ) end addEventHandler("goPassaneger", getRootElement(), goPassaneger) server function enterVehicle ( player, seat, jacked ) if jacked ~= false then cancelEvent() triggerClientEvent(player, "goPassaneger", player) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) How can I now make if player try to steal then he go as passaneger?
-
Hello, is it possible to make anty car jack. Player from same team can just enter the vehicle as a passaneger and when he try to steal the car he go as passaneger. How can I do that? Thanks
-
xFactor and yFactor is resolution = 1. You have to add pixels to it like (200+15)*xFactor. 200+15 is position from left in pixels but u have to change position of blips too equal to draw image
-
or use cancelEvent()
-
Hello, I have this code: function click ( button, state, sx, sy, x, y, z, elem, gui ) local teamName local menu teamName = "spies" menu = spiesMenu primarySelection = getSelectedWeapon ( teamName, "primary" ) secondarySelection = getSelectedWeapon ( teamName, "secondary" ) throwableSelection = getSelectedWeapon ( teamName, "throwable" ) specialSection = getSelectedWeapon ( teamName, "special" ) if primarySelection then outputChatBox ( primarySelection ) end if secondarySelection then outputChatBox ( secondarySelection ) end end function getSelectedWeapon ( teamName, category ) if teamName ~= "mercenaries" and teamName ~= "spies" then return false end if retrieveGridList[teamName][category] == nil then return false end local gridList = retrieveGridList[teamName][category] local row = guiGridListGetSelectedItem ( gridList ) if row == -1 then return false end selectedWeapon = guiGridListGetItemText ( gridList, row, 1 ) return selectedWeapon end and I have 4 gridlists in one GUI. How can I output just one selected item from one gridlist item I select? Now it outputs every item selected from each gridlist.
-
nice it works perfectly
-
How can I call server from client then? I tried this https://wiki.multitheftauto.com/wiki/CallServerFunction And there is example: -- get the local player element local _local = getLocalPlayer() -- define the leaveTeam command handler function function cmdLeaveTeam() -- set the player's team to nil callServerFunction("setPlayerTeam", _local) end -- add the command handler addCommandHandler("leaveTeam", cmdLeaveTeam, false) callserver on serverside is non sense
-
What I'm doing wrong? Client: if player == localPlayer then setTimer( function() callServer( 'createDropPicukup', wepons_models[ weapon ], x1, y1, z1, p_rot, slot, ammo, ammoc ) end, _dropSystem[ pickup ].time +50, 1 ) end Server: function callServer(funcname, ...) local arg = { ... } if (arg[1]) then for key, value in next, arg do arg[key] = tonumber(value) or value end end loadstring("return "..funcname)()(unpack(arg)) end addEvent("on_server_call", true) addEventHandler("on_server_call", resourceRoot, callServer) function createDropPicukup ( id, x, y, z, rot, slot, ammo, ammoc ) outputChatBox ( "Red #FFFFFFWhite", getRootElement(), 255, 0, 0, true ) local object = createObject ( id, x, y, z, 87, 0, rot ) setElementCollisionsEnabled ( object, false ) local marker = createMarker ( x, y, z+0.25 + math.random( 0.0500, 0.1005 ) , "corona", 1.3, color_fromSlot[ slot ].r or 255, color_fromSlot[ slot ].g or 255, color_fromSlot[ slot ].b or 255, 12.5, getRootElement() ) setElementData( marker, 'pWeapon', { getIDFromModel( id ), ammo , ammoc } ) attachElements ( marker, object ) setElementParent( object, marker ) end