
Chuck_Norris
Members-
Posts
9 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Chuck_Norris's Achievements

Newbie (4/54)
0
Reputation
-
Hosting Solution. *PayPal & Onebip(Mobile Phone)
Chuck_Norris replied to Josh's topic in Hosting solutions
Recently bought a server, got the email after 5 minutes with login details so the purchase phase went fast. And I'm vey satisfied with my server thank you alot! -
www.domvps.com and you can buy with a credit card.
-
Not easy to use? Okay, I admit I guess I should write which line which you will need to change, sorry. Believe me, karlis knows. No need to give him an tutorial. I know, someone else might need it tho
-
Hello there. I though I would learn you guys how to make a real easy job marker. With a gui appearing when the player enters the marker. And sets you in the correct team. OBS! This requires you to run scoreboard on the server and have a team called "Carjacker"! This script is most suited on an RPG server. First, lets create the marker. And add when the client hits the marker, the gui will be shown. (CLIENT SCRIPT) jobmarker = createMarker(1314,-1575,12,"cylinder",2,0,255,0) -- creates the marker at the given x,y,z sets the marker size and rgb color also wich type of marker. addEventHandler("onClientMarkerHit",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobwindow,true) showCursor(true) end end) -- adds an event so if I'm not in a car the gui will be visible on marker hit now let's create the gui. 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,"Car Jacker",false) -- creates the "window" 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) -- creates the memo text takebutton = guiCreateButton(0.25,0.9,0.2,0.18,"Accept",true,jobwindow) -- creates the accept button cancbutton = guiCreateButton(0.55,0.9,0.2,0.18,"Cancel",true,jobwindow) -- creates the cancel button 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. This creates a calculated gui window in the middle of the screen with a memo text and two buttons to either accept or close the gui. Now, let's add a message saying I'm employed as a Car Jacker if I click on the "Accept" button (takebutton) and if the player clicks on the "Cancel" button (cancbutton) the gui will be closed. addEventHandler("onClientGUIClick",jobwindow, function(b) if b == "left" then if source == takebutton then -- checks if I press on the accept or not if getTeamName(getPlayerTeam(lp)) ~= "Carjacker" then -- checks if I'm in the carjacker team triggerServerEvent("haveCarJob",lp) -- triggers the server event outputChatBox ("You are now now employed as a car jacker",255,255,0, true) -- outputs a message guiSetVisible(jobwindow,false) -- closes the gui showCursor(false) -- removes the cursor end elseif source == cancbutton then -- checks if I press on the cancel button guiSetVisible(jobwindow,false) -- and if I do, the gui will close. showCursor(false) -- removes the cursor end end end) And now, let's check if the player is in "Carjacker" team, and if he is a message will be shown and he wont see the gui when he hits the marker. addEventHandler("onClientMarkerHit",jobmarker, function(p) if p == lp and not isPedInVehicle(lp) then -- checks so if I'm in a vehicle the gui will not be shown guiSetVisible(jobwindow,true) -- sets the gui visible on marker hit showCursor(true) -- sets the cursor visible if getTeamName(getPlayerTeam(lp)) == "Carjacker" then -- checks if I'm in the Carjacker team outputChatBox ("You already have this job..",0,255,0, true) -- if I am, outputs a message guiSetVisible(jobwindow,false) -- sets the gui unvisible showCursor(false) -- removes the cursor end end end) and, at last addEvent("haveMonkeyJob",true) -- adds the event which will be triggered server sided So, the full client sided script is: jobmarker = createMarker(1314,-1575,12,"cylinder",2,0,255,0) addEventHandler("onClientMarkerHit",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobwindow,true) showCursor(true) end end) sx,sy = guiGetScreenSize() lp = getLocalPlayer() mr = math.random(1,2) jobwindow = guiCreateWindow(0.3*sx,0.3*sy,0.4*sx,0.4*sy,"Car Jacker",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) guiMemoSetReadOnly(memo,true) guiWindowSetMovable (jobwindow,false ) guiWindowSetSizable (jobwindow,false ) addEventHandler("onClientGUIClick",jobwindow, function(b) if b == "left" then if source == takebutton then if getTeamName(getPlayerTeam(lp)) ~= "Carjacker" then triggerServerEvent("haveMonkeyJob",lp) outputChatBox ("You are now now employed as a car jacker",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) if getTeamName(getPlayerTeam(lp)) == "Carjacker" then outputChatBox ("You already have this job..",0,255,0, true) guiSetVisible(jobwindow,false) showCursor(false) end end end) addEvent("haveMonkeyJob",true) (SERVER SCRIPT) So, the whole client sided script is done. Now let's create the server script. First, we need to add the event and the function.. addEvent("haveMonkeyJob",true) function haveMonkeyJob() Then we need to trigger the clientevent triggerClientEvent(source,"haveMonkeyJob",root,TheX,TheY) And, now we need to set the player into the correct team. setPlayerTeam(source,getTeamFromName("Carjacker")) So, whole server sided script is: addEvent("haveMonkeyJob",true) -- adds the event function haveMonkeyJob() triggerClientEvent(source,"haveMonkeyJob",root,TheX,TheY) -- triggers the client event setPlayerTeam(source,getTeamFromName("Carjacker")) -- sets me in "Carjacker" team end addEventHandler("haveMonkeyJob",root,haveMonkeyJob) Download Link to the resource: http://www.mediafire.com/?9r3kmukebokzc12
-
something like https://community.multitheftauto.com/index.php?p= ... ls&id=1071 ?
-
Not easy to use? Okay, I admit I guess I should write which line which you will need to change, sorry. add3DText(x,y,z,"text",r,g,b) [line 26] example add3DText(1337,-1337,1337,"text",250,250,250) This will create a text at the 1337, 1337, 1337 coordinates with the 250,250,250 rgb color code which is white. To add another text, simply add another line with the new position.. an example: add3DText(128,-28,28,"Another text hehe",0,255,0) This will obviously create a text at the 128,-28,28, coordinate but this time with a yellow color. to change the font simply change the "sans" to the wished font, like "pricedown" the lines you will need to change is: 16 32 And, to change the maxrage edit the maxrange = 12 to whatever number which will fit you. This resource was created to make texts over a NPC in a RPG Game-mode. Yes, open your admin panel or freeroam panel, check your position then add it to line 26 as I said, change the r,g,b to the actual rgb color code and change "text" to which text you want to use. I had no idea you had made such script, I'm quite new to the forums/community resources as I've been isolated developing an server which never launched..
-
I don't chase people, people chase me. nah, thanks.