Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    Help me plz

    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
  2. TAPL

    getPlayerTeam

    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 )
  3. TAPL

    getPlayerTeam

    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 )
  4. 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.
  5. 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 )
  6. TAPL

    Cursor

    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.
  7. TAPL

    Cursor

    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 ^^
  8. TAPL

    Cursor

    @-=I Blaawee I=- your code mess @CRX all codes i put here works and i am sure show your meta
  9. TAPL

    Cursor

    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)
  10. TAPL

    Cursor

    function toggleCursor () showCursor(not isCursorShowing()) end addCommandHandler("bindme",function() bindKey("F3", "down", toggleCursor) end)
  11. TAPL

    Cursor

    did you put it server side in meta? if yes then change it to client
  12. TAPL

    HeLP{{{{

    if i'm not wrong (helpme == MOJRM-511)
  13. TAPL

    HeLP{{{{

    try to kick me from the topic.
  14. TAPL

    HeLP{{{{

    I'm stupid and you are intelligent solve your problem yourself
  15. TAPL

    Is This Possible ?

    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
  16. did you see any error in /debugscript 3 ?
  17. your skin has files txd and dff or only txd?
  18. TAPL

    HeLP{{{{

    -- Server Side -- addEventHandler("onPlayerChat",root, function (text) if (text == "fuc_k") then cancelEvent() end end)
  19. TAPL

    Vehicle Gui

    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)
  20. TAPL

    Is This Possible ?

    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?
  21. TAPL

    Is This Possible ?

    why you don't try ? if you try you will know if is possible or not
  22. wtf getLocalPlayer ( ) wtf engineReplaceModel ( txd, 60 ) function xxx () txd = engineLoadTXD("data/60.txd") engineImportTXD(txd, 60) end addEventHandler( "onClientResourceStart", resourceRoot, xxx )
  23. TAPL

    HeLP{{{{

    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)
×
×
  • Create New...