TheScriptingNewbie
-
Posts
11 -
Joined
-
Last visited
Posts posted by TheScriptingNewbie
-
-
That checks if the player has $100 or more.
Thank you all, it works, i have another question, is there a way to repair a vehicle when you drive with it into a marker? Using the same money system like now?
-
Hello, i have a script when a player drives through a cluck 'n bell drivethru and gets food, but when player has no money he still gets the food, only the money goes to the negative, what can i do when the player doesn't have any money, it wouldn't give him food and take no money?
Script:
local marker = createMarker( 2377.60, -1909.09, 13.39, "cylinder", 3, 255, 0, 0, 100 ) addEventHandler("onMarkerHit", marker, function(hitElement) if (getElementType(hitElement) == "player") then setElementHealth(hitElement, 200 ) takePlayerMoney(hitElement, 1) outputChatBox( "you bought chicken", hitElement, 0, 255, 0 ) end end ) function setBlip1( ) local blip1 = createBlip( 2377.60, -1909.09, 13.39, 14, root ) setBlipVisibleDistance( blip1, 10000 ) end addEventHandler( "onResourceStart", root, setBlip1 )
Sorry for my english.
-
Yes, i want that they would get 5000$ every 1 second. Without heading out of the marker, but i have no idea of how to do it.
-
Hello, i have this script:
local marker = createMarker( 206.8258972168, -1656.9514160156, 13.52540397644, "checkpoint") addEventHandler("onMarkerHit", marker, function(hitElement) if (getElementType(hitElement) == "player") then givePlayerMoney(hitElement, 5000) setTimer ( givePlayerMoney , 1000, 1) end end )
I try to make a timer, so that i get money every second, i don't know how to do it and did alot of nonsense, any help?
-
Hello i need some help from scripters here, i want that if i walk into a checkpoint, something changes. Like gives you money or something, i am just not experienced enough and don't know how to script such a thing. Could anybody help me?
You can use the client and server side scripting for this. Like, you can make a gui when the player hits the marker(client, server) or give the player money (server), warp him into a car and place them somewhere in the air! (server) The last one will be funny!
local marker = createMarker(0,0,5, "cylinder", 2, 0, 255, 0, 150) -- create's the marker addEventHandler("onMarkerHit", root, function ( hitElement ) if ( source == marker ) then -- if he hits the right marker local v = createVehicle(602, 0, 0, 1200) -- create the vehicle warpPedIntoVehicle(hitElement, v) -- warp him into a vehicle outputChatBox("Dont look down!", hitElement) -- tell him that he is fcked! ;3 end end )
Thank you, i have another question, what if i want that you get 1000 per 10 seconds if you stand on the point, and when you reach the limit you cant get money anymore, for example : 100000 $? I am not experienced at all, but hey at least i'm learning (if not asking too much).
-
Hello i need some help from scripters here, i want that if i walk into a checkpoint, something changes. Like gives you money or something, i am just not experienced enough and don't know how to script such a thing. Could anybody help me?
-
Hmm, i might do something wrong, but when i type /anim again, nothing happens.
-
Thank you, i have another question, i have a script and when i type in /anim into chat the animation plays, how do i make the animation stop?
-
Hello, i know i am very stupid and new at scripting, but i have a problem. I have a script, when player types /spawn command he will spawn at specifed co-ordinates, for some reason when i type the command, nothing happens.I am very new in LUA scripting and my scripts are probbably a mess, so please dont flame on me.
Here is my script: (i know i completely messed up), i hope to get friendly support from people, just as i got on my first thread.
function spawn(cmd) if cmd == "spawn" then spawnplayer(source, 1959.55, -1714.46, 10) addEventHandler(getRootElement ( )) end end
-
Hello, i am scripting a very simple roleplay gamemode that would only include few animations, vehicle and a house system, and details like earning money or eating and stuff (not needed now) (i know most of you are probbably tired of this), i am very new to LUA scripting, and scripting overall, i am also not that good at english. I got the basic spawning and walkaround thingy going, but now i want to ask you guys how to spawn in a different location when i die? (for example a hospital). By the way, i hope people wont get mad at me, and maybe if you know some good MTA LUA scripting lessons, could you give it to me?
Thank you for all your help.
Need a bit of help.
in Scripting
Posted
Thank you, will be a very good practice for me, since i am a beginner!! I am also very thankfull for this community, and i am planning a little thing when this small gamemode is done, hope you will like it.Ofcourse, don't expect too much, it will be very simple