
Smart.
Members-
Posts
340 -
Joined
-
Last visited
Everything posted by Smart.
-
Also, please use: http://netrac-mta.com/luabttn.PNG local tVehicles = -- what draken was saying is, its alot easier to find and edit it now, the code looks more organized too. { [ 598 ] = true; [ 596 ] = true; [ 597 ] = true; [ 411 ] = true; [ 599 ] = true; } -- Simple Police-Lights by MuLTi! p_lights = {} p_timer = {} p_lvar = {} p_pvar = {} p_lvar2 = {} p_lvar3 = {} p_lvar4 = {} function toggleLights(thePlayer, cmd, level) local level = tonumber(level) if not(level) then outputChatBox("#FF0000 Please select a level![1-2]", thePlayer, 255, 255, 255, true) return end if(level < 1) or (level > 2) then outputChatBox("#FF0000 Please select a level between 1-2!", thePlayer, 255, 255, 255, true) return end local veh = getPedOccupiedVehicle(thePlayer) local id = getElementModel(veh) if ( tVehicles [ getPedOccupiedVehicle ( thePlayer ) ] ) then if(level == 1) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_pvar[veh] = 1 p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end elseif(level == 2) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar3[veh] == 4) then setTimer(function() p_lvar3[veh] = 0 end, 1000, 1) setTimer( function() if(p_lvar4[veh] == 1)then p_lvar4[veh] = 0 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 77, 77, 255) else setVehicleLightState ( veh, 3, 0) ш setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 77, 77) p_lvar4[veh] = 1 end end, 50, 5) return end if(p_lvar2[veh] == 0) or (p_lvar2[veh] == nil) then p_lvar2[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar2[veh] = 0 end if(p_lvar3[veh] == nil) then p_lvar3[veh] = 0 end p_lvar3[veh] = (p_lvar3[veh]+1) end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end end end end addCommandHandler("lights", toggleLights) addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end)
-
onebip is kind of a scam lol, you need to earn at least €200 before being able to withdraw them.
-
That would require scripting. https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
-
A tip, use the lua tags. and, /lights 1 to enable and /lights 2 to disable. read the comment at line: 19 -- Simple Police-Lights by MuLTi! p_lights = {} p_timer = {} p_lvar = {} p_pvar = {} p_lvar2 = {} p_lvar3 = {} p_lvar4 = {} function toggleLights(thePlayer, cmd, level) local level = tonumber(level) if not(level) then outputChatBox("#FF0000 Please select a level![1-2]", thePlayer, 255, 255, 255, true) return end if(level < 1) or (level > 2) then outputChatBox("#FF0000 Please select a level between 1-2!", thePlayer, 255, 255, 255, true) return end local veh = getPedOccupiedVehicle(thePlayer) local id = getElementModel(veh) if (id == 598) or (id == 596) or (id == 597) or (id == 411) then -- here, you see I changed the id '599' to '411' and it worked for me. if(level == 1) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_pvar[veh] = 1 p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end elseif(level == 2) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar3[veh] == 4) then setTimer(function() p_lvar3[veh] = 0 end, 1000, 1) setTimer( function() if(p_lvar4[veh] == 1)then p_lvar4[veh] = 0 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 77, 77, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 77, 77) p_lvar4[veh] = 1 end end, 50, 5) return end if(p_lvar2[veh] == 0) or (p_lvar2[veh] == nil) then p_lvar2[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar2[veh] = 0 end if(p_lvar3[veh] == nil) then p_lvar3[veh] = 0 end p_lvar3[veh] = (p_lvar3[veh]+1) end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end end end end addCommandHandler("lights", toggleLights) addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end)
-
Hello, Let's start off with some basic "history" I've always been wanting to run my own server but I never had the time or the knowledge to do so, then I came across JR10 and we became close friends and we were supposed to create a server called "Bahwan something" but he got too busy with school and I haven't heard from him since he told me he would quit using skype which was: [23/03/2012 23:41:44] JR10: btw i will stop using skype soon.. And then I started to think and I decided to learn lua and so I did. After I "knew" (you can't really know everything) in lua I decided to make a server myself and so I started a project called "netrac" which was supposed to be a 3 gamemode server, but then I had to move to another country, had a lot of school work and I had basically no time to sit around the PC. After some time, maybe a month or so I returned and joined SGC and I was with them for couple of hours when I decided to leave, and simply quitting with MTA. But, I never really did that, I played from time to time but nothing "serious" until one day I got in touch with Infinate (SAUR's Owner) and we chatted for some days then he asked me if I would like to join SAUR as a developer or something similar to it and I said yes. I was in SAUR for tops a week when i decided, I got enough time, I got the knowledge and I want to create something which I call mine. So here I am, re-writing this topic. So, where are we today? I'm gonna continue on this "project" but making slight changes, for instance I'm gonna make it more of an RPG server then running 3 gamemodes. And I wont set a date to release because I'll just make sloppy scripts be stressed and shit so I'm just gonna do it as fast as I can. And hopefully be done near/during the summer break. We recently purchased a website/w domain and it's up'n running now and you can access it at: http://www.netrac-mta.com/ Our VPS is also up'n running thanks to domVPS ( http://www.domvps.com ) So yeah, head to our forums to hear the latest ( Yeah, I'm gonna link it again, why do you care?) http://www.netrac-mta.com/ And oh yeah, inb4 saying we've download an illegal version of IPB: A lot of text, how does it look like in-game? We've been planning on how we're gonna build it up gathering staff members and such but we still have managed to do pretty much in-game. We have created the main system, account system saving and such. We have done a job system, easy to add ped's and such. We have made job levels for almost every job. We have done most of the "Single Player Jobs" such as; trucker, bus driver, pilot and so on. We have done the hospital system, re-spawning and medic job. And, well that's basically it. Also please, keep the flame/whatever away from this topic.
-
We wont tell you how to do it, you will have to learn it yourself, if you come up with a somewhat code, we'll be able to help you. But, like solidsnake said, you should really try something easier.
-
what the fuck? no, read the XML section at the wiki.
-
New forum / Bug Tracker / Community design
Smart. replied to drk's topic in Site/Forum/Discord/Mantis/Wiki related
Because the person who developed/develops the website posted that ss. -
bastards, it's not like they need to have so many servers
-
And, you should be using the lua tag in the future iceman.
-
if you are trying to make a resource(script) which you will be using on your own server, it's actually easy to do. I've actually been working on a resource like this for some time, and I'll release it soon. You will be able to edit the content of F1 easy via .xml If you are talking about re-doing the F1 menu (freeroam) it might be abit too advanced for you, and I would suggest learning scripting (https://wiki.multitheftauto.com/wiki/Scr ... troduction) And, like solidsnake said, editing downloaded scripts in your mta client folder, wont make any difference since you will be downloading the file again, and replacing the one you made.
-
Are you trying to draw a dxtext when you enter the command "drawWel" or what the hell? local sWidth,sHeight = guiGetScreenSize() local find = "The Word: Welcome!" function drawDXText ( command ) dxDrawText(find,sWidth-700,sHeight-200,sWidth-350,sHeight-100,tocolor(255,255,0),1.0,"bankgothic","right","top",false,false,false) end addCommandHandler ( "drawWel", function() addEventHandler ( "onClientRender", root, drawDXText ) end )
-
Try using gameq (http://gameq.sourceforge.net/)
-
I wont release a un-compiled version. I'll fix so you will be able to change the most though, it will take some time I'm more busy now than ever.
-
I'm quite busy atm, I'll def add that in the next version tho, thanks for the respons.
-
Those bastards who give me a low rate without any feedback Anyhow, thanks.
-
I've got an idea, how about you learning c++ and then make us a mod for it?
-
It's a easy to use resource, makes custom made GUI messages instead of the normal chatbox. How to use it? It's really easy to use. I'll give you an example below Server Sided: -- exports ["guimessages"] : outputServer ( argue, "message" ,r, g, b ) exports ["guimessages"] : outputServer (root, "Server sided message" , 204, 51, 255) Client Sided: -- exports ["guimessages"] : outpuClient ( "message" , r, g, b ) exports ["guimessages"] : outputClient ( "Client message" , 204, 51, 255) Using it in a script: -- we register greetPlayer as a handler for the event function greetPlayer ( ) -- we store the player's name local joinedPlayerName = getPlayerName ( source ) local serverName = getServerName( ) -- and send him a greeting exports ["guimessages"] : outputServer ( source, "Welcome " .. joinedPlayerName .. " to ".. serverName .."!" , 255, 255, 255 ) end addEventHandler ( "onPlayerJoin", getRootElement(), greetPlayer ) How does it look like? http://i44.tinypic.com/153y7pw.png http://i44.tinypic.com/o9inop.png http://i39.tinypic.com/efrpzq.png http://i43.tinypic.com/2cwty6x.png Where can I download it? https://community.multitheftauto.com/index.php?p= ... ls&id=4448
-
You should rather ask Amazonic. I don't think it's a default option, because I don't have it either.
-
It was posed in some earlier thread regarding pretty much the same subject if I'm not mistaken.
-
i have fastweb wi-fi... a windows 7 32bit... can you explain me every step of this configuration? try entering http://192.168.1.1 and entering admin as username and admin as password. If that does not work, you should contact your ISP.
-
Setting -> Interface -> Lighter Black And, I don't know why he got that customize thingy, because I don't have it either.
-
Enter http://www.whatismyip.com/ and you'll see your non-lan IP.