GerardWay Posted January 5, 2014 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
Drakath Posted January 5, 2014 Posted January 5, 2014 table.random createMarker onMarkerHit setTimer setElementData getElementData givePlayerMoney triggerClientEvent guiCreateProgressBar createBlip
GerardWay Posted January 5, 2014 Author Posted January 5, 2014 Could you possibly give me an example, please?
Drakath Posted January 6, 2014 Posted January 6, 2014 Try to script it yourself with the functions provided and we will tell you what's wrong.
Deepu Posted January 7, 2014 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
TAPL Posted January 7, 2014 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.
Gallagher Posted January 7, 2014 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)
YesBY Posted February 1, 2014 Posted February 1, 2014 you are probably copying other old zombie server idea.
TAPL Posted February 1, 2014 Posted February 1, 2014 you are probably copying other old zombie server idea. And?
ViRuZGamiing Posted February 1, 2014 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
GerardWay Posted March 1, 2014 Author 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.
Moderators Citizen Posted March 1, 2014 Moderators 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
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