Jump to content

BinSlayer1

Members
  • Posts

    491
  • Joined

  • Last visited

Everything posted by BinSlayer1

  1. BinSlayer1

    Matrix cams

    pics(code) or it didn't happen
  2. Debug that line https://wiki.multitheftauto.com/wiki/Debugging Add something like local test = getElementData(player,"route") outputChatBox(tostring(test)) outputChatBox(type(test))
  3. BinSlayer1

    Matrix cams

    the script? looks like he's making us script his whole server, since he makes new topics everyday
  4. BinSlayer1

    Matrix cams

    so switchMatrixCams is called 5 times every 50 ms.. So what do you expect the script to do? Everytime it's called, a table of matrixes will be created.. This is non-sense.. Below code should work, however you do not specify LookAt 3rd argument so I dont know how good this will look local matrixCams = { {1614.837, -1301.275, 38.188, 200, 400}, --LS {2052.229, 1559.058, 10.671, 125, 200}, --LV {-1856.736, 807.699, 112.546, 300, 250}, --SF } function switchMatrixCams() local rand = math.random(1, #matrixCams) local x,y,z, lx, ly = unpack(matrixCams[rand]) setCameraMatrix(x,y,z, lx,ly) end function setCameraOnPlayerJoin() -- set the player's camera to a fixed position, looking at a fixed point if getCameraMatrix() then setTimer(switchMatrixCams,50,5) addEventHandler("onClientGUIClick", Button1[1],camTarget, false ) addEventHandler("onClientGUIClick", Btn2[2],camTarget, false ) addEventHandler("onClientGUIClick", Btn3[3],camTarget, false ) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),setCameraOnPlayerJoin)
  5. BinSlayer1

    markers

    probably because setCameraMatrix and setCameraTarget are called at the same time? (same event) setCameraTarget overrides setCameraMatrix you don't need this line "addEventHandler("onClientResourceStart",getRootElement(),camTarget)" do you? ps: setCameraTarget has 1 argument, not 2
  6. BinSlayer1

    markers

    so you're triggering a server event only to fade the camera and then to set the camera matrix then you're setting the camera target (obviously with thePlayer which is probably not defined) and you're also triggering back to the client an event attached to an empty function? Alright, this is really a mess. I'd like to help, but I don't know where to start You should scrap the serverside and do everything clientside. It's just bandwidth waste to trigger serverside events only to set the camera matrix
  7. function toggleGGun(player) if exports.global:isPlayerAdmin(player) then local on = not exports.gravitygun:isGravityGunEnabled(player) exports.gravitygun:togglePlayerGravityGun(player,on) if on then outputChatBox("Gravity gun has been enabled",player) else outputChatBox("Gravity gun has been disabled",player) end else outputChatBox("You don't have permission to use this command.", player, 255, 194, 14) end end addCommandHandler("ggun",toggleGGun) try this btw wtf was that outputChatBox in line 8.. or is it some 1337 scripting technique?
  8. It's not something you can "substitute" .. You need to find and match the logic of your program If you want us to help you more, you'll have to post the code
  9. probably have to make sure hitElement is a player local markerTGB = createMarker(495.71051025391,-75.590278625488,997.7578125,"cylinder",1,255,0,0) setElementInterior (markerTGB, 11) function markerTGBhit( hitElement ) if getElementType(hitElement) == "player" then triggerClientEvent ( hitElement , "onSpecialEvent", hitElement, "test" ) end end addEventHandler( "onMarkerHit", markerTGB, markerTGBhit ) HealthDown, use this as your serverside file.
  10. so debug it.. where you have this function specialEventHandler ( text ) guiSetVisible(guiTGB, true) end add a new line outputting something before the guiSetVisible outputChatBox('working') This way, you'll know the event was called. And if it does show 'working' in the chatbox then you have problems with the actual GUI which you need to fix by making sure syntax is correct according to the mta wiki
  11. function xxx (ammo, killer, killerweapon, bodypart ) if (killer) and (killer ~= source ) then givePlayerMoney (killer,90) outputChatBox("You Have got $90 For Kill The Noob!!",killer,255,255,0) end end addEventHandler ("onPlayerWasted",getRootElement() , xxx)
  12. either server calls a clientside event while your client is still downloading or your clientside code lacks addEvent('blahblah', true)
  13. setElementData( source, "overrideCollide.uniqueblah", nil, false ) so use this line instead of triggering a client event @ cp5 also put ghostmode on serverside onMapStarting
  14. why don't you do this serverside? It seems odd changing remote players' ghostmode
  15. serious people in serious forum are serious (except SDK)
  16. i think there should be an exported function like exports.coolscripts:secondsToMs(1) to handle such delicate matters
  17. get the lastest 1.1 nightly from https://nightly.multitheftauto.com this is a required step as original 1.1 bugs when upgrading compiled scripts so after you install the latest version, type 'upgrade' in the console (also make sure the compiled script file is encoded in UTF-
  18. if isObjectInACLGroup ( "user." .. getPlayerName(source), aclGetGroup ( "Admin" ) ) then if isObjectInACLGroup ( "user." .. getPlayerName(source), aclGetGroup ( "Moderator" ) ) then
  19. https://wiki.multitheftauto.com/wiki/Sho ... dComponent it features disabling of the crosshair too
  20. Admins won't be able to use /me anymore So use this line instead of old one: if hasObjectPermissionTo ( source , "function.banPlayer" ) and type == 0 then
  21. the site you posted works you're at the right place you need to cancel onPlayerChat if hasObjectPermissionTo(source) returns true and simply output something like "[ADMIN]"..getPlayerName(source)..": "..text https://wiki.multitheftauto.com/wiki/Has ... rmissionTo
  22. also how can I play MTA? Why don't you just start by reading up the wiki so you can get a general knowledge about MTA and scripting https://wiki.multitheftauto.com/wiki/Main_Page
  23. BinSlayer1

    Voice

    1) 1 in server config 2) "start voice" in server console if you don't have the voice resource, head over to http://code.google.com/p/mtasa-resources/downloads/list
  24. Where i should put those files? ...maybe into "c:/program files/notepad++/plugins/APIs" ? I just said that.. read my post I said you needed to put it in that folder
  25. Holsten your code probably works, although you do not see the vehicle because 0,0,0 are underground coordinates change it to 0,0,4
×
×
  • Create New...