-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
function createText () addEventHandler ( "onClientRender", root, DrawText ) end addCommandHandler ( "wanted", createText ) function DrawText () wantedLvl = getPlayerWantedLevel() if wantedLvl == 0 then dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) else dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) end end
-
you forgot thing function onPlayerLogin (_, cc ) function onPlayerLogin (_, acc ) also this will be less function onPlayerQuit ( ) local acc = getPlayerAccount ( source ) if ( acc ) and not isGuestAccount ( acc ) then if getPlayerTeam ( source ) then setAccountData ( acc, "xsrpg.team", getTeamName ( playerTeam ) ) end end end addEventHandler ( "onPlayerQuit",root, onPlayerQuit ) function onPlayerLogin (_, acc ) if ( acc ) then local pTeam = getAccountData ( acc, "xsrpg.team" ) if ( pTeam ) then setPlayerTeam ( source, getTeamFromName ( pTeam ) ) end end end addEventHandler ( "onPlayerLogin",root, onPlayerLogin )
-
addEventHandler ( "onPlayerLogin" getRootElement ( ), onPlayerLogin ) correct addEventHandler ( "onPlayerLogin", getRootElement(), onPlayerLogin ) also you have two local playerTeam idk if this make problem or not but change it better function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local playerTeam = getPlayerTeam ( source ) if playerTeam then local playerTeamName = getTeamName(playerTeam) setAccountData ( playeraccount, "xsrpg.team", playerTeamName ) end end end addEventHandler ( "onPlayerQuit",getRootElement (), onPlayerQuit ) function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local playerTeam = getAccountData ( playeraccount, "xsrpg.team" ) if ( playerTeam ) then setPlayerTeam ( source, getTeamFromName(playerTeam) ) end end end addEventHandler ( "onPlayerLogin", getRootElement(), onPlayerLogin )
-
Hi guys, like title, i really need this sandwich : I need a *big sandwich, (with ketchup) and maybe with mayonnaise Thanks so much. Edit: i need a pepsi with them Thanks so much.
-
local militaryMarker = createMarker(1552.33, -1605.37, 12.5, 'cylinder', 2.0, 0, 0, 255, 150 ) function militaryMarkerHit ( player, matchingDimension ) if ( getElementType(player) == "player") then local account = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user." .. account, aclGetGroup("Military")) then setElementModel(player, 286) giveWeapon ( player, 31, 80000 ) outputChatBox("You are now working as military", player, 0, 255, 0, false) else outputChatBox("You must be in the military group to use this command!", player, 255, 0, 0, false) end end end addEventHandler( "onMarkerHit", militaryMarker , militaryMarkerHit )
-
did you read the wiki ? https://wiki.multitheftauto.com/wiki/ShowCursor Note that, regardless of the cursor state you set using this function, the cursor will always be visible while the menu, the chatbox input line or the console are active, or if another resource has called this function.
-
meta is good now what is not work? i think you have another resource that showing the cursor and you can't hide it from other resource ^^
-
@-=I Blaawee I=- your code mess @CRX all codes i put here works and i am sure show your meta
-
suggestion for WHAT? this work 100% function toggleCursor () showCursor(not isCursorShowing()) end addCommandHandler("bindme",function() bindKey("F3", "down", toggleCursor) end) did you write the command "bindme" in F8 ? or maybe you want bind the key without command? function toggleCursor () showCursor(not isCursorShowing()) end addEventHandler ("onClientResourceStart",resourceRoot,function() bindKey("F3", "down", toggleCursor) end) or this too can work function toggleCursor () showCursor(not isCursorShowing()) end bindKey("F3", "down", toggleCursor)
-
function toggleCursor () showCursor(not isCursorShowing()) end addCommandHandler("bindme",function() bindKey("F3", "down", toggleCursor) end)
-
did you put it server side in meta? if yes then change it to client
-
if i'm not wrong (helpme == MOJRM-511)
-
I'm stupid and you are intelligent solve your problem yourself
-
restart your mta
-
can be server and client but setting file and main file must be same if main is server setting too must be server if main is client setting too must be client
-
did you see any error in /debugscript 3 ?
-
your skin has files txd and dff or only txd?
-
-- Server Side -- addEventHandler("onPlayerChat",root, function (text) if (text == "fuc_k") then cancelEvent() end end)
-
why your code has so much space? function createLS () local LS = createVehicle ( 596, 1557.03284, -1605.92700, 13 ) warpPedIntoVehicle (source,LS) end addEvent("PoliceLS",true) addEventHandler("PoliceLS", root, createLS) function createLV () local LV = createVehicle ( 598, 1557.03284, -1605.92700, 13 ) warpPedIntoVehicle (source,LV) end addEvent("PoliceLV",true) addEventHandler("PoliceLV", root, createLV) function createSF () local SF = createVehicle ( 597, 1557.03284, -1605.92700, 13 ) warpPedIntoVehicle (source,SF) end addEvent("PoliceSF",true) addEventHandler("PoliceSF", root, createSF) function createRan () local Ran = createVehicle ( 599, 1557.03284, -1605.92700, 13 ) warpPedIntoVehicle (source,Ran) end addEvent("PoliceRan",true) addEventHandler("PoliceRan", root, createRan)
-
easy way to test put in setting lua file setting1 = "Hello World" and put in main lua outputChatBox like this outputChatBox (setting1) Q: do you know what is "local" mean?
-
why you don't try ? if you try you will know if is possible or not
-
wtf getLocalPlayer ( ) wtf engineReplaceModel ( txd, 60 ) function xxx () txd = engineLoadTXD("data/60.txd") engineImportTXD(txd, 60) end addEventHandler( "onClientResourceStart", resourceRoot, xxx )
-
maybe this? if not this what you want Explain exactly what you want function onchat(text) if text == "fuc_k" then local lines = getChatboxLayout()["chat_lines"] for i=1,lines do outputChatBox("") end end end addEventHandler("onClientChatMessage", getRootElement(), onchat)