-
Posts
168 -
Joined
-
Last visited
Everything posted by Vanlot
-
How to use Ghost Paradise mod map's with my MTA server ?
Vanlot replied to 0917725929's topic in Support
Save This File under MTA 1.3>Server>mods>deathmatching>resources. -
When I Press Login they Say That the Pass/Username are wrong but it's correct (I'm Sure 100%) When I press Register They Say "Register/Login Error
-
I Have Problem in My Login Panel with the buttons exactly. Sorry Cause I Ask Much.I Hope That You Help Me. Client: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(87,90,559,465,"Login Panel",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Label[1] = guiCreateLabel(493,442,60,18,"By:Lavand",false,GUIEditor_Window[1]) GUIEditor_Edit[1] = guiCreateEdit(214,98,119,42,"",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(214,174,119,42,"",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(238,77,59,17,"Username:",false,GUIEditor_Window[1]) GUIEditor_Label[3] = guiCreateLabel(243,155,57,15,"PassWord:",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(31,96,93,39,"Login",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(32,179,93,39,"Register",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(379,71,162,148,"images/mtalogo.png",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(31,238,513,200," Welcome To My World",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiSetVisible ( GUIEditor_Window[1], false ) local localPlayer = getLocalPlayer ( ) function windowHandler( ) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") guiSetText(LoginUsername, playername) guiSetText(EditRegisterUsername, playername) guiSetVisible ( GUIEditor_Window[1], true ) guiSetInputEnabled(true) showCursor ( true ) end function onClickBtn ( button, state ) if (source == GUIEditor_Button[1]) then triggerServerEvent ( "onLogin", getRootElement(), localPlayer, guiGetText(LoginUsername), guiGetText(LoginPassword) ) end end function onClickBtn2 ( button, state ) if (source == GUIEditor_Button[2]) then triggerServerEvent ( "onRegister", getRootElement(), localPlayer, guiGetText(EditRegisterUsername), guiGetText(EditRegisterPassword)) end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end addEvent( "hideLoginWindow", true ) addEventHandler( "hideLoginWindow", getRootElement(), hideLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], onClickBtn, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[2], onClickBtn2, false ) Server: function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong. end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) function onRegister ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister )
-
Nice,Good Job.
-
Thanx It's Work.Thanx Again.
-
I Use The Script AFTER You Fix It.But When I Enter The Marker,The Panel Can't Appear anyMore.
-
Hi Every One.I Have A Script To make SWAT Team.To Join The team The Player Must Enter a marker Then A Panel Appears in it he will find Take Job or Cancel. 1-Take job is Work But Cancel Didn't Work 2-The Panel Appear Every Time I Open The Resource But I want it to appear only when The Player enter the Marker. The Client sIDE: local marker = createMarker( 1954.3000488281, -2174.5, 12.5, "Cylinder", 1.5, 0, 0, 255, 150) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Window[1] = guiCreateWindow(204,89,235,437,"SWAT Job",false) GUIEditor_Button[1] = guiCreateButton(11,384,79,39,"Take Job",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,28,217,321,"Welcome To Swat Job.To Take This Job Press \"Take Job\".IF you want to close this window press \"Cancel\"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Button[2] = guiCreateButton(103,384,79,39,"Cancel",false,GUIEditor_Window[1]) function SAWATjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SWATjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SWATjobleave) function joinTeam() triggerServerEvent("setSWAT",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSWATWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSWATWindow, false) Server Side: createBlip ( 1954.3000488281, -2174.5, 12.5, 30 ) function createSWATTeam () SAPDteam = createTeam ("SWAT", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSWATTeam) function joinSWAT() setPlayerTeam(source,SWATteam) setElementModel(source, 280) giveWeapon ( source, 3 ) setElementData( source, "Occupation", "Copteam", true ) outputChatBox("You Are Now SWAT Member.",source,0,255,0) end addEvent("setSWAT", true) addEventHandler("setSWAT",root,joinSWAT) function policeJob ( attacker, attackerweapon, bodypart, loss ) theTeam = getPlayerTeam ( attacker ) if (attackerweapon == 3) and (loss > 2 ) then setElementPosition (source, 219, 110, 999, true) setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) takePlayerMoney (source, 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) The Wanted Script: addEventHandler("onPlayerJoin", root, function ( ) setPlayerNametagText ( source, getPlayerName ( source ) .."[".. getPlayerWantedLevel ( source ) .."]" ) end ) function updateNametagWantedLevel ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do setPlayerNametagText ( player, getPlayerName ( player ) .."[".. getPlayerWantedLevel ( player ) .."]" ) end end setTimer ( updateNametagWantedLevel, 3000, 0 )
-
I Use TAPL Script But I Have 2 Problemes: 1-I Can't See The Marker of Spwan 2-I Can Stay @ The Ground .Like "No Attraction"
-
I'm A Mapper.I Can Help With A Fair Price. Contact Me On Skype :Chris.west59 On E-Mail :[email protected]
-
Watch This Video: https://www.youtube.com/watch?v=tWZDWUw7tXw
-
The Server Side: local vehicles = { } addEvent ( "spawnvehicle", true ) addEventHandler ( "spawnvehicle", root, function ( vehID ) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end vehicles [ source ] = createVehicle ( vehID, getElementPosition ( source ) ) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 255, 255, 255 ) end setTimer ( warpPedIntoVehicle, 200, 1, source, vehicles [ source ] ) triggerClientEvent ( source, "closeWindow", root ) end )
-
Hi Guys Actually I Don't Understand Much in Scripting.I Want To Add To A Label But I Don't Know Where I Must Put The Label Line. & I Think That it's Like That : GUIEditor_Label[1] = guiCreateLabel(x,y,z,a,"By:Lavand",true,Spawn) I Don't Know if the Label Function Correct. & Plz Tell me Where I Must Pu tIt In This Script: function createVehGui () MainGui = guiCreateWindow(408,203,240,349,"Spawn bike",false) guiWindowSetSizable ( MainGui, false ) VehGrid = guiCreateGridList(14,32,180,256,false,MainGui) guiGridListSetSelectionMode(VehGrid,2) _bikes = guiGridListAddColumn(VehGrid,"Bikes",0.85) Spawn = guiCreateButton(15,305,96,35,"Spawn",false,MainGui) guiSetFont(Spawn,"clear-normal") Cancel = guiCreateButton(128,305,96,35,"Cancel",false,MainGui) guiSetFont(Cancel,"clear-normal") for index, vehicle in ipairs(vehicles) do local row = guiGridListAddRow (VehGrid) guiGridListSetItemText ( VehGrid, row, _bikes, tostring(vehicle), false, false ) end end local marker = createMarker(1064.5, 1752.9000244141, 9.3000001907349, 'cylinder', 1.5, 255, 255, 255, 255) local vehicles = {"BMX", "Bike", "Infernus", "NRG-500"} addEventHandler("onClientMarkerHit", marker, function spawnBike(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(MainGui) then guiSetVisible(MainGui, true) showCursor(true) end end end ) if ( isElement ( vehicles [ source ] ) ) then destroyElement ( vehicles [ source ] ) end vehicles [ source ] = createVehicle ( vehID, getElementPosition ( source ) ) if ( vehicles [ source ] ) then setVehicleColor ( vehicles [ source ], 255, 255, 255 ) end setTimer ( warpPedIntoVehicle, 200, 1, source, vehicles [ source ] ) triggerClientEvent ( source, "closeWindow", root ) addEvent ( "spawnVehicle", true ) addEventHandler ( "spawnVehicle", root, function ( vehID, hitElement ) ............. end) local vehicles = { } addEventHandler("onClientGUIClick", root, function () if (source == Spawn) then local row,col = guiGridListGetSelectedItem(VehGrid) if (row and col and row ~= -1 and col ~= -1) then local vehicleName = guiGridListGetItemText(VehGrid, row, 1) if vehicleName == "BMX" then triggerServerEvent("spawnvehicle",localPlayer,509) elseif vehicleName == "Bike" then triggerServerEvent("spawnvehicle",localPlayer,481) end else outputChatBox("Error: Please, select a vehicle of list.",255,0,0) elseif (source == Cancel) then triggerEvent("closeWindow", root ) end end ) addEventHandler("onClientGUIDoubleClick", root, function () if ( source == VehGrid ) then local row,col = guiGridListGetSelectedItem(VehGrid) if (row and col and row ~= -1 and col ~= -1) then local vehicleName = guiGridListGetItemText(VehGrid, row, 1) if vehicleName == "BMX" then triggerServerEvent("spawnvehicle",localPlayer,509) elseif vehicleName == "Bike" then triggerServerEvent("spawnvehicle",localPlayer,481) end end end end ) addEventHandler("onClientMarkerLeave", marker, function () triggerEvent("closeWindow", root ) end ) addEvent("closeWindow", true) addEventHandler("closeWindow", root, function () guiSetVisible(MainGui, false) showCursor(false) guiSetInputEnabled(false) setElementFrozen(localPlayer, false) end )
-
The Most People Who Can Do That Are Indian
-
Can't Understand You.
-
Good Lcuk Brother
-
Just Script Car Spawn Mark.
-
This not realted to mapping.You Must Script That.
-
That's Mean That You Have A Bad NetWork.
-
Plz Delete This .I Post it accidently cause of the Lag.
-
There Are Many Objects in The Ground Floor.So You Can Press on 'World Object' Button The Presss on the object then you will get a Copy.
-
For a newbie as you say .Not Bad.You Can Do Better than this.GL