-
Posts
4,961 -
Joined
-
Last visited
Everything posted by Jaysds1
-
I think i know what the error was, try this: addEventHandler("onPlayerLogin",root,function(_,acc) if not getAccountData(acc,"gangs")then return end local permission=getAccountData(acc,"permission") if not permissions[permission] then return end triggerClientEvent(source,"ganging",source,permission) outputChatBox("You've joined group ("..getPlayerGangName(source)..") as a ("..permission ..")",source,255,255,0) for _,v in ipairs(getAccounts()) do if not getPlayerGangName(v)then return end local player=getAccountPlayer(v) local accName = getAccountName(v) if player and isElement(player)then triggerClientEvent(source,"recieveingPlayers",source,"online",accName,getPlayerName(player)) else triggerClientEvent(source,"recieveingPlayers",source,"offline",accName) end end for _,v in ipairs(getElementsByType("player")) do if not getPlayerGangName(v)then return end outputChatBox("Memeber "..getPlayerName(source).." has joined the group as a " .. permission,v,0,255,0) triggerClientEvent(v,"memberLoggedIn",v,getAccountName(getPlayerAccount(source)),getPlayerName(source)) end end)
-
I'm not sure, Are you using any script for the wheels to be bigger?
-
try this: addEventHandler("onPlayerLogin",root,function(_,acc) if not getAccountData(acc,"gangs")then return end local permission=getAccountData(acc,"permission") if not permissions[permission] then return end triggerClientEvent(source,"ganging",source,permission) outputChatBox("You've joined group ("..getPlayerGangName(source)..") as a ("..permission ..")",source,255,255,0) for _,v in ipairs(getAccounts()) do if not getPlayerGangName(v)then return end local player=getAccountPlayer(v) local accName = getAccountName(getPlayerAccount(player)) if player and isElement(player)then triggerClientEvent(source,"recieveingPlayers",source,"online",accName,getPlayerName(player)) else triggerClientEvent(source,"recieveingPlayers",source,"offline",accName) end end for _,v in ipairs(getElementsByType("player")) do if not getPlayerGangName(v)then return end outputChatBox("Memeber "..getPlayerName(source).." has joined the group as a " .. permission,v,0,255,0) triggerClientEvent(v,"memberLoggedIn",v,getAccountName(getPlayerAccount(source)),getPlayerName(source)) end end)
-
What I think you're trying to do, is when a player logs in, you want to tell his gang that he is now online. addEventHandler("onPlayerJoin",root,function() for _,v in ipairs(getElementsByType("player")) do if getPlayerGangName(v) then --btw make sure that this function is before this script outputChatBox("Memeber "..getPlayerName(source).." has joined the gang as a " .. permission,v,0,255,0) --permission isn't defined triggerClientEvent(source,"memberLoggedIn",source,getAccountName(getPlayerAccount(source)),getPlayerName(source)) end end end) If this is wrong please show us your full code or you could pm me your full code.
-
try this: local object = createObject ( 1337, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 ) --creates an object setElementVelocity(object,1000,0,0) --sets the speed of the object 1000 going north --For onClientRender addEventHandler("onClientRender",root,function() local x,y,z = getElementVelocity(object) --if the object isn't moving then the x,y,z would be zero outputChatBox(x.. "," ..y..","..z) --Outputs the x,y,z speed of the object end) --timer setTimer(function() local x,y,z = getElementVelocity(object) --if the object isn't moving then the x,y,z would be zero outputChatBox(x.. "," ..y..","..z) --Outputs the x,y,z speed of the object end,1000,7) BTW, the setElementVelocity is only client-side only.
-
Check out the events on the race resource page: https://wiki.multitheftauto.com/wiki/Resource:Race
-
If you want to add a resource to your server, you would need to place the resource in this folder: "MTA San Andreas 1.x\server\mods\deathmatch\resources\". After, if your server is started then type in "refreshall", then type in "start resourceName" (the "resourceName" is the resource/folder name that you put into the "resources" folder"). If you have not started your server then start it and just type in "start resourceName". Read more about: Console Commands here: https://wiki.multitheftauto.com/wiki/Element/Console Resources here: Resources
-
try reinstalling MTA, because the MTADiag shows that MTA couldn't find your GTA game.
-
You could only get their username from a database but you can't get their password.
-
Did you know it's now available for iOS? http://media.rockstargames.com/broadcas ... S_web.html http://www.rockstargames.com/videos/video/10391
-
here, try this: client-side: voice = false disabled = true one = false tab1 = false tab2 = false addCommandHandler("voice",function() voice = not voice end) addEventHandler("onClientPlayerWasted",localPlayer, function() voice = false end) addEventHandler("onClientRender",root, function() local width,height = guiGetScreenSize() if voice then dxDrawText("Radio Machine ",1,(height/2)-80,width,height,tocolor(255,255,255,255),0.6,"bankgothic" ) if isPedInVehicle(localPlayer) then return end tab1 = true dxDrawRectangle(0,(height/2)-80,220,200,tocolor(0,0,0,70)) if not disabled then dxDrawText("(1) Roger",1,(height/2)-60,width,height,tocolor(100,150,240,255),0.6,"bankgothic" ) one = true else dxDrawText("(1) Roger",1,(height/2)-60,width,height,tocolor(100,100,100,255),0.6,"bankgothic" ) one = false end end end) function enableAll() disabled = false end function disableAll() disabled = true setTimer(enableAll, 5000, 1) end bindKey("1", "down",function() if voice then if one then local x, y, z = getElementPosition(localPlayer) if tab1 then triggerServerEvent("sendSound",localPlayer,1.1,x,y,z)--sendSound("1.1", x, y, z) end end disableAll() end end) addEvent("receiveSound",true) addEventHandler("receiveSound",root,function(sPath,sLoop) playSound(sPath,sLoop) end) server-side: addEvent("sendSound",true) addEventHandler("sendSound",root,function(sound, nX, nY, nZ) for i,_ in ipairs(getElementsByType("player"))do local pX, pY, pZ = getElementPosition(i) local dist = getDistanceBetweenPoints3D(pX, pY, pZ, nX, nY, nZ) if dist < 40 then if sound == "1.1" then triggerClientEvent("receiveSound","sounds/roger.mp3", false) end end end end)
-
try this: voice = false disabled = true one = false tab1 = false tab2 = false addCommandHandler("voice",function() voice = not voice end) addEventHandler("onClientPlayerWasted",localPlayer, function() voice = false end) addEventHandler("onClientRender",root, function() local width,height = guiGetScreenSize() if voice then dxDrawText("Radio Machine ",1,(height/2)-80,width,height,tocolor(255,255,255,255),0.6,"bankgothic" ) if isPedInVehicle(localPlayer) then return end tab1 = true dxDrawRectangle(0,(height/2)-80,220,200,tocolor(0,0,0,70)) if not disabled then dxDrawText("(1) Roger",1,(height/2)-60,width,height,tocolor(100,150,240,255),0.6,"bankgothic" ) one = true else dxDrawText("(1) Roger",1,(height/2)-60,width,height,tocolor(100,100,100,255),0.6,"bankgothic" ) one = false end end end) function enableAll() disabled = false end function disableAll() disabled = true setTimer(enableAll, 5000, 1) end bindKey("1", "down",function() if voice then if one then local x, y, z = getElementPosition(localPlayer) if tab1 then sendSound("1.1", x, y, z) end end disableAll() end end) function sendSound (sound, nX, nY, nZ) local pX, pY, pZ = getElementPosition(getLocalPlayer()) local dist = getDistanceBetweenPoints3D(pX, pY, pZ, nX, nY, nZ) if dist < 40 then if sound == "1.1" then playSound("sounds/roger.mp3", false) end end end
-
try this: voice = false addCommandHandler("voice", function() voice = not voice end) addEventHandler("onClientPlayerWasted", getLocalPlayer(), function() voice = false end) local width,height = guiGetScreenSize() addEventHandler("onClientRender", getRootElement(), function() if voice then tab1 = nil tab2 = nil dxDrawText("Radio Machine ",1,(height/2)-80,width,height,tocolor(255,255,255,255),0.6,"bankgothic" ) if not isPedInVehicle(getLocalPlayer()) then tab1 = 1 dxDrawRectangle(0,(height/2)-80,220,200,tocolor(0,0,0,70)) if not disabled then dxDrawText("(1) Roger",1,(height/2)-60,width,height,tocolor(100,150,240,255),0.6,"bankgothic" ) one = true else dxDrawText("(1) Roger",1,(height/2)-60,width,height,tocolor(100,100,100,255),0.6,"bankgothic" ) one = false end end end end) function disableAll() disabled = true setTimer(enableAll, 5000, 1) end function enableAll() disabled = false end function pressed1() if voice then if one == true then if tab1 then local x, y, z = getElementPosition(getLocalPlayer()) triggerEvent("sendSound", getLocalPlayer(), "1.1", x, y, z) end end disableAll() end end bindKey("1", "down", pressed1) function sendSound (sound, nX, nY, nZ) local pX, pY, pZ = getElementPosition(getLocalPlayer()) local dist = getDistanceBetweenPoints3D(pX, pY, pZ, nX, nY, nZ) if dist < 40 then if sound == "1.1" then playSound("sounds/roger.mp3", false) end end end addEventHandler("sendSound", getRootElement(), sendSound) addEvent("sendSound", true)
-
Welcome back to MTA, Can you run this MTADiag, then post the pastebin url here please.
-
Have you tried reinstalling GTA and MTA?
-
How to remove every single object in San Andreas
Jaysds1 replied to micheal1230's topic in Scripting
Use onResourceStart. -
How to remove every single object in San Andreas
Jaysds1 replied to micheal1230's topic in Scripting
Yes, there's a way to remove every single thing on the SA Map: viewtopic.php?f=15&t=43425&hilit=+removeWorldModel -
np, I'll try asking more about packets with the mta team in the irc for you.
-
I don't know anything about packets, but it might be because of your ping...
-
np you guys.
-
Actually, if you didn't upgrade then you can't use it for any external services. Only the local site could use it.