Jump to content

DhrJay

Members
  • Posts

    51
  • Joined

  • Last visited

Details

  • Gang
    The Clowns

DhrJay's Achievements

Snitch

Snitch (10/54)

0

Reputation

  1. Hahaha! you see... I'm a newbie...! Thanks man...Won't bother you any longer (for today )...
  2. Like this? outputChatBox ( "#EE0000 Only army members can drive this car!, true", thePlayer )
  3. Strange...But thanks anyways...! Do you know how I could add colors to the message? #EE0000
  4. YOU F****ING MADE IT! HOW DO YOU KNOW THESE THINGS...! I made it a ZIP file, and now it works... Really, where did you learn all this? I really want to start learning scripting too... But it's very hard for me to understand it... Do you have any URL where I could start? (Exept for the MTA scripting tutorials.. ) (PS: Why does it make such a big difference between a normal folder?!) Tnkx, Jay
  5. \Well, that's the problem... It doesn't say anything at all... It says: start: Resource could not be found. Maybee it's my META: <meta> <script src="server.lua"/> </meta>
  6. Hey man! Thanks! This still doesnt work though... The server doesnt even find the resource... -Jay
  7. Thanks all! I have this now..But it still doesn't work... carristriction.lua: armySkins = { 287, 217 } armycars = { 432, 520, 425, 548 } function enterVehicle ( theVehicle, seat, jacked ) if ( armycars[getElementModel ( theVehicle )] ) and ( not armySkins[getElementModel ( source )] ) and (seat == 0) then cancelEvent() outputChatBox ( "Only army members can drive this car!", source ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) -- this is the event. Meta.xml <meta> <script src="carristriction.lua" /> </meta>
  8. I changed it to 5000... Nothing really changed! Any ideas?
  9. Hi! Yeah, I really am trying to learn from the Wiki... I just don't know where everything should be in the script... Tnks anyways! You're awesome!
  10. YES! YES, I do! Nice! But how do I put this in the script? local url = "http://www.di.fm/mp3/hardstyle.pls" function playTheSound(x, y, z, vehicle) sound = playSound3D(url, x, y, z) setSoundMaxDistance (url,20) if (isElement(vehicle)) then attachElements(sound, vehicle) end end addEvent("playTheSound", true) addEventHandler("playTheSound", root, playTheSound) function stopTheSound(x, y, z) stopSound(sound) end addEvent("stopTheSound", true) addEventHandler("stopTheSound", root, stopTheSound) -- 181 FM: [url=http://www.181.fm/winamp.pls?station=18]http://www.181.fm/winamp.pls?station=18[/url] ... 0(Top%2040)&file=181-power.pls -- The Hitz channel: [url=http://www.in.com/music/radio/977-the-h]http://www.in.com/music/radio/977-the-h[/url] ... el-15.html Just change the 20 to any number you want. Thanks man! You rock!
  11. Hi! I want to add dimention and interiour to this script... I made it like this: What did I do wrong? function changePos( attacker, weapon, bodypart, loss ) if (weapon == 5) then setElementPosition(source, -2616.5964, -2823.8984, 5.7695) interior=0 dimention=0 end end addEventHandler("onPlayerDamage", root, changePos)
  12. YES! YES, I do! Nice! But how do I put this in the script?
  13. Hi Guys! I found this script, and I wanted to expand the reach of the stream. the resource works perfectly, but you can only hear the music when you move your camera to the speaker... Does anyone know how to change this? Client: local url = "http://www.di.fm/mp3/hardstyle.pls" function playTheSound(x, y, z, vehicle) sound = playSound3D(url, x, y, z) if (isElement(vehicle)) then attachElements(sound, vehicle) end end addEvent("playTheSound", true) addEventHandler("playTheSound", root, playTheSound) function stopTheSound(x, y, z) stopSound(sound) end addEvent("stopTheSound", true) addEventHandler("stopTheSound", root, stopTheSound) -- 181 FM: [url=http://www.181.fm/winamp.pls?station=181-power&style=mp3&description=Power%20181%20(Top%2040]http://www.181.fm/winamp.pls?station=18 ... 0(Top%2040[/url])&file=181-power.pls -- The Hitz channel: [url=http://www.in.com/music/radio/977-the-hitz-channel-15.html]http://www.in.com/music/radio/977-the-h ... el-15.html[/url] Server: function createSpeaker(thePlayer) local x, y, z = getElementPosition(thePlayer) speakerObject = createObject(2229, x, y, z-4) outputChatBox("You have Succesfully created a speaker!", thePlayer, 0, 250, 0) if (isPedInVehicle(thePlayer)) then local vehicle = getPedOccupiedVehicle(thePlayer) attachElements(speakerObject, vehicle) triggerClientEvent(root, "playTheSound", root, x, y, z, vehicle) else triggerClientEvent(root, "playTheSound", root, x, y, z) end end addCommandHandler("placespeaker", createSpeaker) function deleteSpeaker(thePlayer) if (isElement(speakerObject)) then destroyElement(speakerObject) outputChatBox("You have Succesfully destroyed the Speaker!", thePlayer, 0, 0, 255) triggerClientEvent("stopTheSound", root) else outputChatBox("Speaker is not created!", thePlayer, 250, 0, 0) end end addCommandHandler("destroyspeaker", deleteSpeaker)
  14. addEvent( 'onClientRobberMenu',true ) addEvent( 'onSoundRobbery',true ) addEvent( 'onSoundRobberyStop',true ) local bankWindow = guiCreateWindow( 0.3184,0.3568,0.3809,0.306,"Bank Robbery",true ) local buttonYes = guiCreateButton( 36,147,89,46,"Start",false,bankWindow ) local buttonNo = guiCreateButton( 251,147,89,46,"Close",false,bankWindow ) guiSetVisible( bankWindow,false ) guiSetAlpha( bankwindow,0.4 ) addEventHandler( "onSoundRobbery",root, function( ) sound = playSound3D ( "alarm.mp3", 347.32162475586,164.73616027832,1014.1875, true ) setSoundMaxDistance ( sound, 250 ) end ) addEventHandler( "onSoundRobberyStop",root, function( ) if isElement( sound ) then stopSound( sound ) end end ) addEventHandler( 'onClientRobberMenu',localPlayer, function( ) showCursor( true ) guiSetVisible( bankWindow,true ) addEventHandler ( "onClientGUIClick", buttonYes, function( ) showCursor( false ) guiSetVisible( bankWindow,false ) outputChatBox( "Bank Robbery: Stay in the bank till your robbing is done!",255,0,0 ) outputChatBox( "Bank Robbery: Whatch out cops are comming!",255,0,0 ) triggerServerEvent( 'onStartRobber',localPlayer ) end ,false ) addEventHandler ( "onClientGUIClick", buttonNo, function ( ) showCursor( false ) guiSetVisible( bankWindow,false ) end ,false ) end )
×
×
  • Create New...