SkrillexX
Members-
Posts
50 -
Joined
-
Last visited
Everything posted by SkrillexX
-
Just like that ? function HitMarker ( thePlayer ) if ( thePlayer == localPlayer and source == theMarker ) then addEventHandler ( "onClientRender" ,getRootElement(), dxDraw ) end end setTime ( 00 ,00 )
-
I want to make the time 00:00 Each time the player hits the marker
-
No , in fact , It makes the ingame time 00:00 So that i can calculate the Robbery's finish time which will be 10:00 ( 5 minutes later )
-
Euh , i don't think this code is correct but anyways .. Correct me if there's mistakes function HitMarker(thePlayer,theMarker ) local thePlayer = getLocalPlayer() local markercheck = isElementWithinMarker(thePlayer ,theMarker ) end addEventHandler("onClientMarkerHit" ,getRootElement() ,HitMarker ) function dxDraw() if ( markercheck ) then outputChatBox ("keep inside the Marker and type /robtime to know what's the remaining time" ,thePlayer ,0 ,250 ,0 ,false ) dxDrawText("ROBBERY IS PROGRESSING ( 50000$ )", 279, 143, 661, 201, tocolor(255, 0, 0, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) setTime ( 00 , 00 ) else return end end addEventHandler("onClientRender" ,getRootElement() ,dxDraw )
-
I can't see a way of adding onClientRender , What do you think
-
I tried to correct the code , check it out , i added the first part of it. function RobMarker(thePlayer) local pos = 281.12664794922 ,-1768.4904785156 ,4.5230431556702 local theMarker = createMarker ( pos, "checkpoint" ,4.0 ,255 ,0 ,0 ) createBlip ( pos ,32 ,2 ,255 ,0 ,0 ,255 ,0 ) setTimer (RobMarker , 600000 ,0 ) end addEventHandler ("onClientResourceStart" ,getRootElement() ,RobMarker) function HitMarker(thePlayer,theMarker ) local thePlayer = getLocalPlayer() local markercheck = isElementWithinMarker(thePlayer ,theMarker ) if ( markercheck ) then outputChatBox ("keep inside the Marker and type /robtime to know what's the remaining time" ,thePlayer ,0 ,250 ,0 ,false ) dxDrawText("ROBBERY IS PROGRESSING ( 50000$ )", 279, 143, 661, 201, tocolor(255, 0, 0, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) setTime ( 00 , 00 ) else return end end addEventHandler("onClientMarkerHit" ,getRootElement() ,HitMarker )
-
Greetings , as /debugscript 3 said , there's an error somewhere in line 4 , problem is that i'm unable to find it. function HitMarker(thePlayer,theMarker ) local thePlayer = getLocalPlayer() local thePlayerPos = getElementPosition(thePlayer) if (thePlayerPos == x ,y ,z) then outputChatBox ("keep inside the Marker and type /robtime to know what's the remaining time" ,thePlayer ,0 ,250 ,0 ,false ) dxDrawText("ROBBERY IS PROGRESSING ( 50000$ )", 279, 143, 661, 201, tocolor(255, 0, 0, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) setTime ( 00 , 00 ) else return end end addEventHandler("OnClientMarkerHit" ,getRootElement() ,HitMarker ) btw i precised the "x ,y ,z" on a previous function Here's debugscript's message : ERROR; Loading Script Failed : Rob\Robbery.lua:4:')' expected near '.'
-
What am i supposed to use in order to make a DxText showing me a percentage (from 1% to 100% ) Increasing. To move from 1% to 2% , it takes 5 seconds )
-
Hello ,I am planning on making a Robbery script which consists on a big marker that will display a Dx Messgae showing Percentage of the progress of the Robbery as soon as a player hit it. Could you help me a bit with the list of functions i'll have to use ?
-
What about the syntax or the appropriate use of math.random ?
-
Anyone could tell me what's the purpose from using math.random ? is it to choose any random number ?
-
Greetings , i want to make a continous outPutChatbox which means for example "Visit Our Forums at www.randomforum.com" But i want it to output Once each 5 minutes , How to do that ?
-
Didn't really understand your code.
-
Greetings , i was wondering how to use : addCommandHandler with a 2 parts command. Normally , i'd use addCommandHandler ("commandname" ,Handlerfucntion ) But i want to do a command like /goto [iD] , It consists on two parts which are the basic command and the Player's ID. So what's the appropriate use of that function in a similar case ?
-
Thanks a lot , i appreciate. I'll take your advice into consideration.
-
Greetings , this script i've tried to make consists on checking the player's money when he types /money. If the player's money is less then 0 , The message would be written in red , If it's more then 0 or 0 , It would be written in green function mamoney(thePlayer ,cmd) money = getPlayerMoney(thePlayer) if ( money >= 0) then outputChatBox( "Your current money is "..money ,0 ,250 ,0) else outputChatBox( "Your current money is "..money ,250 ,0 ,0) end end addCommandHandler ("money" ,mamoney)
-
Greetings , i've been recently learning how to script and as my first script , i tried to make something simple. A command that would give you money if your money is between 1000$ and 5000$. This is my lua code. function giveMoney(cmd , thePlayer) number = math.random (1000,5000) money = getPlayerMoney(thePlayer) if money == number then givePlayerMoney(thePlayer, 1000) else outputChatBox ("You already have enough money , fool" ,getRootElement(),250 ,250 ,0 ) end addCommandHandler ("money" ,giveMoney ) end Please , if any you see an error try to notify me it. Thanks.
-
Ahh ok i understand.
-
In this script the player's Gravity will change to 0.100 If he types /grav i do not know why it doesn't work . function Gravity(thePlayer) setPedGravity(thePlayer ,0.100) end addCommandHandler ("grav" ,thePlayer)
