-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
Any errors or warnings in /debugscipt 3 Also id system runing?
-
createColRectangle attachElements setElementAlpha setElementHealth onColShapeHit
-
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
-
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
-
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
-
Show me your code
-
Yes lisen there you have findPlayer put or getPlayerFromID and that it
-
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
-
If make my login panel like this then i dont think use it for user panel
-
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
-
also in client side not need player gose to client direct
-
I Guess you can make a image of a bullet and draw it when a gun fires and make it till gos to ground
-
Because the server will froze till get answer from database so it better use callbacks
-
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 )
-
What exacly you try to do post message after 30 minutes or command can used after 30 minutes?
-
We are not here make your codes i suggestion hire someone or find someone do it for you
-
you can create a new costum event with addEvent()
-
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
-
https://wiki.multitheftauto.com/wiki/OnClientFileDownloadComplete