Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. Any errors or warnings in /debugscipt 3 Also id system runing?
  2. createColRectangle attachElements setElementAlpha setElementHealth onColShapeHit
  3. addCommandHandler("fix" , function(thePlayer, cmd, target) if not ( isPlayerOnGroup ( thePlayer ) ) then outputChatBox("#ff0000[Error]: #ffffffShoma Dastresi Be In Dastoor Nadarid!", thePlayer, 255, 255, 255, true) return false end if target ~= nil then local yaru = findPlayer (target) or getPlayerFromID(target) --find player if yaru then if isPedInVehicle ( yaru ) then local mashineyaru = getPedOccupiedVehicle(yaru) local esmesh = getPlayerName(yaru) fixVehicle(mashineyaru) outputChatBox("#00ff00[Done]: #ffffffShoma Mashine #00ff00"..esmesh.." #ffffffRa Fix Kardid!", thePlayer, 255, 255, 255, true) outputChatBox("#FFFF00[Info]: #ffffffAdmin #FFFF00".. getPlayerName ( thePlayer ) .." #ffffffMashin Shoma Ra Fix Kard!", yaru, 255, 255, 255, true) else outputChatBox("#ff0000[Error]: #ffffffIn Player Ke Savare Mashin Nist!", thePlayer, 255, 255, 255, true) end else outputChatBox("#ff0000[Error]: #ffffffPlayer Peyda Nashod!", thePlayer, 255, 255, 255, true) end else outputChatBox("#00FF00Bezan : /fix <PartOfName/ID>", thePlayer, 255, 255, 255, true) end end) function findPlayer(name) local name = name and name:gsub("#%x%x%x%x%x%x", "" ):lower() or nil if name then for _, player in pairs(getElementsByType("player")) do local name_=getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerID(player) if player then local theID for id, p in pairs(getElementsByType("player")) do if p == player then theID = id end return theID end else return end end function getPlayerFromID(theID) if theID then theID = tonumber(theID) local thePlayer for id, p in pairs(getElementsByType("player")) do if theID == id then thePlayer = p end return thePlayer end else return end end A small miskate my bad
  4. addCommandHandler("fix" , function(thePlayer, cmd, target) if not ( isPlayerOnGroup ( thePlayer ) ) then outputChatBox("#ff0000[Error]: #ffffffShoma Dastresi Be In Dastoor Nadarid!", thePlayer, 255, 255, 255, true) return false end if target ~= nil then local yaru = findPlayer (target) or getPlayerFromID(target) --find player if yaru then if isPedInVehicle ( yaru ) then local mashineyaru = getPedOccupiedVehicle(yaru) local esmesh = getPlayerName(yaru) fixVehicle(mashineyaru) outputChatBox("#00ff00[Done]: #ffffffShoma Mashine #00ff00"..esmesh.." #ffffffRa Fix Kardid!", thePlayer, 255, 255, 255, true) outputChatBox("#FFFF00[Info]: #ffffffAdmin #FFFF00".. getPlayerName ( thePlayer ) .." #ffffffMashin Shoma Ra Fix Kard!", yaru, 255, 255, 255, true) else outputChatBox("#ff0000[Error]: #ffffffIn Player Ke Savare Mashin Nist!", thePlayer, 255, 255, 255, true) end else outputChatBox("#ff0000[Error]: #ffffffPlayer Peyda Nashod!", thePlayer, 255, 255, 255, true) end else outputChatBox("#00FF00Bezan : /fix <PartOfName/ID>", thePlayer, 255, 255, 255, true) end end) function findPlayer(name) local name = name and name:gsub("#%x%x%x%x%x%x", "" ):lower() or nil if name then for _, player in pairs(getElementsByType("player")) do local name_=getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerID(player) if player then local theID for id, p in pairs(getElementsByType("player")) do if p == player then theID = id end return theID end else return end end function getPlayerFromID(theID) if theID then tonumber(theID) local thePlayer for id, p in pairs(getElementsByType("player")) do if theID == id then thePlayer = p end return thePlayer end else return end end
  5. function findPlayer(name) local name = name and name:gsub("#%x%x%x%x%x%x", "" ):lower() or nil if name then for _, player in pairs(getElementsByType("player")) do local name_=getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerID(player) if player then local theID for id, p in pairs(getElementsByType("player")) do if p == player then theID = id end return theID end else return end end function getPlayerFromID(theID) if theID then tonumber(theID) local thePlayer for id, p in pairs(getElementsByType("player")) do if theID == id then thePlayer = p end return thePlayer end else return end end addCommandHandler("fix", function(thePlayer, cmd, target) if not ( isPlayerOnGroup ( thePlayer ) ) then outputChatBox("#ff0000[Error]: #ffffffShoma Dastresi Be In Dastoor Nadarid!", thePlayer, 255, 255, 255, true) return false end if targ3t ~= nil then local yaru = findPlayer (target) or getPlayerFromID(target) --find player if yaru then if isPedInVehicle ( yaru ) then local mashineyaru = getPedOccupiedVehicle(yaru) local esmesh = getPlayerName(yaru) fixVehicle(mashineyaru) outputChatBox("#00ff00[Done]: #ffffffShoma Mashine #00ff00"..esmesh.." #ffffffRa Fix Kardid!", thePlayer, 255, 255, 255, true) outputChatBox("#FFFF00[Info]: #ffffffAdmin #FFFF00".. getPlayerName ( thePlayer ) .." #ffffffMashin Shoma Ra Fix Kard!", yaru, 255, 255, 255, true) else outputChatBox("#ff0000[Error]: #ffffffIn Player Ke Savare Mashin Nist!", thePlayer, 255, 255, 255, true) end else outputChatBox("#ff0000[Error]: #ffffffPlayer Peyda Nashod!", thePlayer, 255, 255, 255, true) end else outputChatBox("#00FF00Bezan : /fix <PartOfName/ID>", thePlayer, 255, 255, 255, true) end end ) Put that together and try
  6. Yes lisen there you have findPlayer put or getPlayerFromID and that it
  7. Simple do that function findPlayer(name) local name = name and name:gsub("#%x%x%x%x%x%x", "" ):lower() or nil if name then for _, player in pairs(getElementsByType("player")) do local name_=getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function getPlayerID(player) if player then local theID for id, p in pairs(getElementsByType("player")) do if p == player then theID = id end return theID end else return end end function getPlayerFromID(theID) if theID then tonumber(theID) local thePlayer for id, p in pairs(getElementsByType("player")) do if theID == id then thePlayer = p end return thePlayer end else return end end
  8. Dimos7

    [Question]

    If make my login panel like this then i dont think use it for user panel
  9. Dimos7

    [Question]

    Hello guys i need make a login panel that be able register on a Web and can login both mta server and Web i know i need remoteCall but what else
  10. also in client side not need player gose to client direct
  11. I Guess you can make a image of a bullet and draw it when a gun fires and make it till gos to ground
  12. Because the server will froze till get answer from database so it better use callbacks
  13. local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) local myMarker2 = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) function MarkerHit( hitPlayer, matchingDimension ) if isPedInVehicle(hitPlayer) then local veh =getPedOccupiedVehicle(hitPlayer) setElementPosition ( veh, posX, posY, posZ ) warpPedIntoVehicle(hitPlayer, veh) end end function MarkerHit2( hitPlayer, matchingDimension ) if isPedInVehicle(hitPlayer) then local veh = getPedOccupiedVehicle(hitPlayer) setElementPosition ( veh, posX, posY, posZ ) warpPedIntoVehicle(Hot Player, veh) end end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) addEventHandler( "onMarkerHit", myMarker2, MarkerHit )
  14. What exacly you try to do post message after 30 minutes or command can used after 30 minutes?
  15. We are not here make your codes i suggestion hire someone or find someone do it for you
  16. you can create a new costum event with addEvent()
  17. Dimos7

    Trade

    add the command to Clinet side adn try again
  18. gate = Object(1337,712.61853, 659.00409, 9.94867) addEventHandler('onClientClick',root,function() if isCursorShowing() then local _,_,wx,wy,wz = getCursorPosition() gate:setPosition(wx,wy,wz) end end) Try this
  19. https://wiki.multitheftauto.com/wiki/OnClientFileDownloadComplete
×
×
  • Create New...