Jump to content

manve1

Retired Staff
  • Posts

    1,283
  • Joined

  • Last visited

Everything posted by manve1

  1. What is the function name for calculating between 2 3d points?
  2. ty guys, i fixed the client bit.
  3. Is it possible to get the number out from a function like givePlayerMoney? for example for script like this: local money = givePlayerMoney( math.random( 20, 40 ) ) outputChatBox( money )
  4. viewtopic.php?f=91&t=26541
  5. manve1

    Logs

    Yes it is. Just script it.
  6. For TXD use: txd = engineLoadTXD ( "mod.txd" ) engineImportTXD ( txd, model) NOTE: You need to edit it. After all, load TXD first, then DFF.
  7. @madex: local theObject = createObject( 1423, 1535, -1727, 13.300000190735, 0, 0, 0 ) setElementFrozen( theObject, true )
  8. function adminChat(thePlayer, commandName, text) local user = "user."..getAccountName ( getPlayerAccount ( thePlayer ) ) local playerName = getPlayerName ( thePlayer ) for id, player in ipairs ( aclGroupListObjects ( aclGetGroup ( "Admin" ) ) or aclGroupListObjects ( aclGetGroup ( "SuperModerator" ) ) ) do if player == user then outputChatBox( "#FF0000[#CCCCCCAdmin#FF0000] #FF0000".. playerName.. "#CCCCCC: #FF0000"..text, thePlayer, 255, 255, 255, true) end end end addCommandHandler( "achat", publicChat )
  9. setTimer( function( ) local x, y, z = getElementPosition(source) end, 100, 0 )
  10. I know what he ment, but setElementHealth( thePlayer, 0 ) does the same thing as killPed()
  11. it still does the same function of killing him.
  12. change return to: setElementHealth ( thePlayer, 0 ) return
  13. How can we replace with ur MTA serial if we dont know it?
  14. manve1

    Problem

    The whole ship creating and the timer is in a function, and everything is declared, but it ain't moving the object down
  15. manve1

    Problem

    Still ain't moving it down (( btw, everything is made in the script, the r1, g1, b1, ect .. ))
  16. manve1

    Problem

    I have got a problem, a specific object (( ship )) doesn't move for some reason. And i was wondering why it ain't moving, local ship = createObject( 10771, 105.09999847412, 266.20001220703, 5, 0, 0, 0 ) failureTimer = setTimer( function() if not ( r1 == 0 and g1 == 255 and b1 == 0 ) then setTimer( function() local x1, y1, z1 = getElementPosition( ship ) moveObject( ship, 1000, x1, y1, z1 - 30 ) end, 1000, 0 ) end end, 1000, 1 ) NOTE: Script might make no sense.
  17. manve1

    Playsound

    I think its this: guiGetText
  18. Well, 2 main reasons: 1. Typing mistake OR 2. Missing part of a script.
  19. You should already know that scripts for if you write them out correctly, your problem might be that you written it out nearly correctly and made like 1mistake.
  20. Its in the part of the script, Dude the thing is it works for the other planes so there is no point of me giving the resource that spawns the planes its clearly a problem with the guiGridListSetItemData Not always its function problem (( nearly never )), but sometimes it might be ur problem. After all u need to use this too guiGridListGetItemData
  21. try: change: guiGridListAddColumn(Grid,"Planes",0.9) to: local columnPlanes = guiGridListAddColumn(Grid,"Planes",0.9) guiGridListSetItemData(Grid,1,columnPlanes,"Hydra") guiGridListSetItemText(Grid,1,columnPlanes,"F22 Raptor",false,false)
  22. try: function onPlayerQuit_ ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local x,y,z = getElementPosition (source) setAccountData ( playeraccount, "s.HandMoney", getPlayerMoney ( source ) ) setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source))) setAccountData (playeraccount, "s.x", x) setAccountData (playeraccount, "s.y", y) setAccountData (playeraccount, "s.z", z) setAccountData (playeraccount, "s.int", getElementInterior (source)) setAccountData (playeraccount, "s.dim", getElementDimension (source)) setAccountData (playeraccount, "s.rot", getPlayerRotation (source)) setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 )) setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 )) setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 )) setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 )) setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 )) setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 )) setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 )) setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 )) setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 )) setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 )) setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 )) setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 )) setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 )) setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 )) setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 )) setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 )) setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 )) setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 )) setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 )) setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 )) setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 )) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit_ ) local root = getRootElement() addEventHandler("onPlayerLogin", root, function() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playermoney = getAccountData ( playeraccount, "s.HandMoney" ) if ( playermoney ) then setPlayerMoney ( source, playermoney ) end local playerInt = getAccountData (playeraccount, "s.int") local playerDim = getAccountData (playeraccount, "s.dim") local playerSkin = getAccountData (playeraccount, "s.skin") local playerX = getAccountData (playeraccount, "s.x") local playerY = getAccountData (playeraccount, "s.y") local playerZ = getAccountData (playeraccount, "s.z") local playerRot = getAccountData (playeraccount, "s.rot") spawnPlayer(source, playerX, playerY, playerZ, playerRot, playerSkin, playerInt, playerDim) fadeCamera (source, true) setCameraTarget (source, source) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") giveWeapon ( source, weap0, 1 ) giveWeapon ( source, weap1, 1 ) giveWeapon ( source, weap2, ammo2 ) giveWeapon ( source, weap3, ammo3 ) giveWeapon ( source, weap4, ammo4 ) giveWeapon ( source, weap5, ammo5 ) giveWeapon ( source, weap6, ammo6 ) giveWeapon ( source, weap7, ammo7 ) giveWeapon ( source, weap8, ammo8 ) giveWeapon ( source, weap9, ammo9 ) giveWeapon ( source, weap10, 1 ) giveWeapon ( source, weap11, 1 ) giveWeapon ( source, weap12, 1 ) end end ) addEventHandler('onPlayerQuit',root, function() local account = getPlayerAccount(source) local team = getPlayerTeam(source) if not isGuestAccount(account) then if team and isElement(team) then setAccountData(account,'team',getTeamName(team)) end end end ) addEventHandler('onPlayerLogin',root, function(_,account) local teamName = getAccountdata(account,'team') if teamName then local team = getTeamFromName(teamName) if team and isElement(team) then setPlayerTeam(source,team) end end end )
  23. EDIT: Mind posting more information? like: Row name, Column Name?
  24. manve1

    Question

    How could i give money/weapon to a specific team? (( sorry to ask this but i forgot )) I came up with this code, but i get errors on all of the weapon / money giving functions local teamer = getPlayerTeam( source ) == getTeamFromName('LS') if teamer and ( getElementType ( source ) == "player" ) then giveWeapon( teamer, 31, 500 ) giveWeapon( teamer, 35, 20 ) giveWeapon( teamer, 16, 20 ) givePlayerMoney( teamer, 50000 ) end
  25. I seen a server with a different gamemodes (( race DM and race DD )) I asked the owner and he told me he used different dimensions to create the gamemodes, but idk the rest It is possible But sorry mate, i don't know how to do that
×
×
  • Create New...