GerardWay Posted January 5, 2014 Share Posted January 5, 2014 Hey, could anybody show me how to make a script that would create a marker (size 2) and place it at random coordinates out of a selection (like 0,0,5 or 10,10,10 or 1234.5678 etc..) and when a player enters the marker, they stay inside the marker for 1 Minute and when the Minute passes, they get 50 Experience and $10,000 along with a progress bar to show how far the player is through the minute and creating a blip on wherever the marker is I'd really appreciate it Link to comment
Drakath Posted January 5, 2014 Share Posted January 5, 2014 table.random createMarker onMarkerHit setTimer setElementData getElementData givePlayerMoney triggerClientEvent guiCreateProgressBar createBlip Link to comment
GerardWay Posted January 5, 2014 Author Share Posted January 5, 2014 Could you possibly give me an example, please? Link to comment
Drakath Posted January 6, 2014 Share Posted January 6, 2014 Try to script it yourself with the functions provided and we will tell you what's wrong. Link to comment
Deepu Posted January 7, 2014 Share Posted January 7, 2014 Friend .... try to learn scripting yourself.... Here tutorial (helping you a bit) thePlayer = getLocalPlayer () -- this is for getting the player who is playing local Marker = createMarker(x,y,z,"type",size,R,G,B,A) -- x,y,z are positions of marker, type can be cylinder, arrow, etc function shit () -- this is the function with its name and hitPlayer and matchingDimensions is when player hits marker with same dimension of marker givePlayerMoney(thePlayer, 10000) end addEventHandler("onClientMarkerHit", Marker, shit) Now learn it in mtasa wiki Link to comment
TAPL Posted January 7, 2014 Share Posted January 7, 2014 Friend .... try to learn scripting yourself....Here tutorial (helping you a bit) thePlayer = getLocalPlayer () -- this is for getting the player who is playing local Marker = createMarker(x,y,z,"type",size,R,G,B,A) -- x,y,z are positions of marker, type can be cylinder, arrow, etc function :~ () -- this is the function with its name and hitPlayer and matchingDimensions is when player hits marker with same dimension of marker givePlayerMoney(thePlayer, 10000) end addEventHandler("onClientMarkerHit", Marker, :~) Now learn it in mtasa wiki You also need to learn it in mtasa wiki. local player isn't always who hit the marker, it could be other player. Also givePlayerMoney in client side doesn't require player argument. Note: Using this function client side (not recommended) will not change a players money server side. Link to comment
Gallagher Posted January 7, 2014 Share Posted January 7, 2014 you talking about this? https://community.multitheftauto.com/ind ... ls&id=8474 local x,y,z = 2152,-1684,16.1 local MoneyMarker = createMarker(x,y,z-2,"cylinder", 5, 139, 0, 285,77) local MoneyBlip = createBlipAttachedTo(MoneyMarker,56) function Check(thePlayer) if isElementWithinMarker(thePlayer, MoneyMarker) then timer = setTimer ( function() givePlayerMoney(thePlayer,1) end , 1000, 0) end end addEventHandler("onMarkerHit",MoneyMarker,Check) function Stop(thePlayer) killTimer(timer) end addEventHandler("onMarkerLeave",MoneyMarker,Stop) Link to comment
YesBY Posted February 1, 2014 Share Posted February 1, 2014 you are probably copying other old zombie server idea. Link to comment
TAPL Posted February 1, 2014 Share Posted February 1, 2014 you are probably copying other old zombie server idea. And? Link to comment
ViRuZGamiing Posted February 1, 2014 Share Posted February 1, 2014 I suggest to use a Table for the Markers... markersPosTable= { [1] = {0, 0, 0, "cylinder", 2.0}, [2] = {1, 1, 1, "cylinder", 2.0}, [3] = {2, 2, 2, "cylinder", 2.0}, } for i=1,3 do local object = createMarker(unpack(markersPosTable[i])) end Link to comment
GerardWay Posted March 1, 2014 Author Share Posted March 1, 2014 you are probably copying other old zombie server idea. Actually, I own the Backup Server for Zombie Outbreak:Reloaded. I'm trying to get everything like it previously was, until the original Owner opens it back up. Link to comment
Moderators Citizen Posted March 1, 2014 Moderators Share Posted March 1, 2014 table.random You probably meant math.random or you should link the utility function: https://wiki.multitheftauto.com/wiki/Table.random Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now