
Hell-Mate
Members-
Posts
198 -
Joined
-
Last visited
Everything posted by Hell-Mate
-
myonlake, same the GUI is not opening when the mech enter the car but now the sound when mech enter the car is working. any one help please. the GUI is not opening to the driver when entering the car
-
I think servers which have ability to download in-game is free-roam servers try to write on console , start play ..
-
No, there is no debug errors.
-
local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "THEGROUPHERE!!" ) ) then function bodies ..
-
There is an ac-panel which is easier than editing mtaconf here is the link of the resource : https://community.multitheftauto.com/in ... ls&id=6242 Note : dont forget to allow acl permission , write on console >> aclrequest allow acpanel all
-
This Script is placing speaker to your place which run a Radio station when you do /placespeacker you can edit this radio station by placing your own music URL by editing it from the script.
-
Good Job MTA team
-
Its visible when the resource starts because you wrote this line onClientResourceStart, you should remove this line and replace it with any other Event like onClientMarkerHit or whatever and dont forget to create the marker ..
-
Well, all is ok now. but i want to ask a last question. How to make it auto detect nearest string or number i wrote? for example i wrote "Hel" so it can detect "Hello". Help please. Thank You
-
You can use TXD workshop, btw this forum is for scripting. txd is not scripting. Thank you
-
Yes, just add the line that i gave to the server side and it will work perfectly, when you press accept you will be at the criminal team, all what you need is to add the team.
-
add this line to the server side > Criminal = createTeam ( "Criminal", 255, 0, 0 )
-
Which blip there is no blips at the server side .. any way if you want a blip copy this whole client script and paste it with yours. local robberHouses = { { 1887, -1113, 25 }; { 2092, -1160, 25 }; { 1896, -1165, 22 }; { 2068, -1720, 13 }; { 1970, -1671, 17 }; { 1895, -1071, 23 }; { 1940, -1066, 23 }; { 1955, -1074, 23 }; { 1960, -1069, 23 }; -- add whit { x,y, z}; { 1956, -1115, 26 }; { 1945, -1115, 26 }; { 1924, -1115, 26 }; { 1900, -1114, 26 }; { 2596, -1237, 47 }; { 2595, -1199, 58 }; { 2516, -1028, 69 }; { 2630, -1072, 68 }; { 2794, -1246, 45 }; { 2809, -1176, 25 }; { 2586, -953, 80 }; } function unpackRobberHouses () return unpack ( robberHouses [ math.random ( #robberHouses ) ] ) end jobmarker = createMarker( 2054.4609375, -1759.5224609375, 13.549641609192, "cylinder", 1.5, 255, 153, 0, 150 ) createBlip ( 2054.4609375, -1759.5224609375, 13.549641609192, 52 ) addEventHandler("onResourceStart",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobmarker,true) showCursor(true) end end) sx,sy = guiGetScreenSize() -- creates a variable lp = getLocalPlayer() -- creates a variable mr = math.random(1,2) -- creates a variable jobwindow = guiCreateWindow(0.3*sx,0.3*sy,0.4*sx,0.4*sy,"Criminal",false) sx,sy = 0.5*sx,0.5*sy memo = guiCreateMemo(0*sx,0.05*sy,0.8*sx,0.6*sy,"Description here",false,jobwindow) takebutton = guiCreateButton(0.25,0.9,0.2,0.18,"Accept",true,jobwindow) cancbutton = guiCreateButton(0.55,0.9,0.2,0.18,"Cancel",true,jobwindow) guiSetVisible (jobwindow,false) -- makes the gui unvisible guiMemoSetReadOnly(memo,true) -- makes so the memo text cannot be edited. guiWindowSetMovable (jobwindow,false ) -- makes to the window is not moveable guiWindowSetSizable (jobwindow,false ) -- makes so you cannot set the size. addEventHandler("onClientGUIClick",jobwindow, function(b) if b == "left" then if source == takebutton then if getTeamName(getPlayerTeam(lp)) ~= "Criminal" then triggerServerEvent ( "HaveCriminalJob", lp) outputChatBox ("You are now now employed as a Criminal",255,255,0, true) guiSetVisible(jobwindow,false) showCursor(false) end elseif source == cancbutton then guiSetVisible(jobwindow,false) showCursor(false) end end end) addEventHandler("onClientMarkerHit",jobmarker, function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobwindow,true) showCursor(true) -- sets the cursor visible if getTeamName(getPlayerTeam(lp)) == "Criminal" then outputChatBox ("You already have this job..",0,255,0, true) guiSetVisible(jobwindow,false) showCursor(false) end end end) addEvent("HaveCriminalJob", true) function createHouses () x, y, z = unpackRobberHouses () robhouseMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end addEventHandler ( "HaveCriminalJob", root, createHouses ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( source == robhouseMarker and not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "givePlayerPay", localPlayer ) destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerEvent ( "createHouseEvent", localPlayer ) end end ) addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end )
-
the blip which i added ?, if "Yes", its working for me.
-
setPlayerWanted level is a server body function .. Here is your script with the stars math.random > function HaveCriminalJob() triggerClientEvent(source,"HaveCriminalJob",root,TheX,TheY) setPlayerTeam(source,getTeamFromName("Criminal")) end addEvent ( "HaveCriminalJob", true) addEventHandler("HaveCriminalJob", root, HaveCriminalJob) addEvent ( "givePlayerPay", true ) function givePlayerRobPay () money = math.random ( 150, 2500 ) givePlayerMoney ( source, money ) outputChatBox ( "You successfully robbed the house and made $" ..money, source ) Stars = math.random ( 1, 6 ) setPlayerWantedLevel ( source, Stars ) outputChatBox ( "You've got " .. Stars .. " Stars For trying to rob a house", source ) fadeCamera ( source, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 2500, 1, source, true, 1 ) end addEventHandler ( "givePlayerPay", root, givePlayerRobPay ) i advice to make the math.random between 1, 2
-
Yup. it will be something like this > Stars = math.random ( 1, 6 ) setPlayerWantedLevel ( thePlayer, Start ) outputChatBox ( "You've got " .. Stars .. " Stars For trying to rob a house", thePlayer )
-
Well the problem is that you have wrote a wrong eventHandler name here is what you miss > addEvent("HaveCriminalJob", true) function createHouses () x, y, z = unpackRobberHouses () robhouseMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end addEventHandler ( "createHousesEvent", root, createHouses ) --Fixed addEvent("HaveCriminalJob", true) function createHouses () x, y, z = unpackRobberHouses () robhouseMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end addEventHandler ( "HaveCriminalJob", root, createHouses ) I hope that i helped --BTW you have to add after robbing a house > math.random to create another marker house to rob.
-
Thank you very much WhoAmI and xxMadexx but can any one answer my first question ? First : what if i want it to getText of the ammo is that code right ? >> giveWeapon ( thePlayer, 31, num )
-
Well another two questions First : what if i want it to getText of the ammo is that code right ? >> giveWeapon ( thePlayer, 31, num ) Second : what if i want it letters not numbers ? does it be > toletter ? totext ?, and what if i want it letters and numbers ? . Thank you
-
Can you give me an example script ?
-
Hello community i just faced a problem when scripting GUI, the problem is > Well, i will give an example for what i want to do. for example i want to make a weapons shop, for example this GUI > Well the problem is,for example some one wrote 5 ammo of M4 how to detect how much he wrote ? all what i know about the server side is that i should write the amount of the ammo to give the player but idk how i let it detect what the player wrote then give thePlayer the amount he wrote Like this script it gives the player 600 ammo per click giveWeapon ( thePlayer, 31, 600 ) i think i should add something instead of 600 to let it detect what the player wrote in the text. i hope someone help me if it possible if someone write me an example for client and server side it will be a favor , thank you