-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Yes, everyone will see it, since it'll be created on every client.
-
You can use my "extra_health" resource which has a function to make a ped/player invulnerable. https://community.multitheftauto.com/in ... ls&id=5195
-
Post your whole function.
-
Is because you forgot to set the "getPropagated" argument at addEventHandler to false.
-
You could make a timer to check every X time if the player is in water. setTimer isElementInWater
-
setPedAnimation has an argument so it can't be interrupted, check the wiki.
-
It must be that 'source' is not a valid player element.
-
Y porque deberiamos darte modos para molestar?
-
You must read many times what I did, then try to reproduce it, but for the texts.
-
function greetingHandler ( message , r ,g ,b) outputChatBox ( "Server : " .. message, r, g, b, true ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), greetingHandler )
-
if isTimer(theTimers [ plr ]) then killTimer(theTimers [ plr ]) end theTimers [ plr ] = setTimer(function(plr) time = time - 70 m,s,cs = msToTimeStr(time) fullTime = m..":"..s textItemSetText(timer,"Time Left : "..tostring(fullTime).."") if plr then setElementData(rRoot,""..getPlayerSerial(plr).."-t",time) end if ( tonumber(m) <= 0 and tonumber(s) <= 0 and tonumber(cs) <= 0 ) then onTimerFinish(plr,timer) end end , 50 , 0 ,plr )
-
The "true" has to be on the outputChatBox, post the client side part.
-
You must define a global table: local lastHit = { } Then when you're going to store it: lastHit [ thehitted ] = thehitter Then to obtain that when they die: local lastHitter = lastHit [ source ]
-
Aren't you reading what I say? you must use the same function, but enable the last argument: colorCoded, set it to "true" and then it'll work.
-
I don't know how slothbot works, but I guess they won't.
-
https://wiki.multitheftauto.com/wiki/OutputChatBox That?
-
What do you mean by "wiki"?
-
function boss ( ) local Team = createTeam ( "Nemsis", 255, 0, 0 ) local nemesi = exports [ "slothbot" ]:spawnBot ( 1193.3, -2038.8, 69, 90, 1, 0, 0, Team, 38, "hunting", "following" ) local nemesi1 = exports [ "slothbot" ]:spawnBot ( 1174.6, -2045.7, 69, 90, 1, 0, 0, Team, 38, "hunting", "following" ) local nemesi2 = exports [ "slothbot" ]:spawnBot ( 1155.3, -2021, 69.0, 90, 1, 0, 0, Team, 38, "hunting", "following" ) local nemesi3 = exports [ "slothbot" ]:spawnBot ( 1137, -2038, 69, 90, 1, 0, 0, Team, 38, "hunting", "following" ) setTimer ( function ( b, b1, b2, b3 ) local Team = getTeamFromName ( "Nemsis" ) exports [ "slothbot" ]:setBotTeam ( b, Team ) exports [ "slothbot" ]:setBotTeam ( b1, Team ) exports [ "slothbot" ]:setBotTeam ( b2, Team ) exports [ "slothbot" ]:setBotTeam ( b3, Team ) local botTeam = exports [ "slothbot" ]:getBotTeam ( b ) if ( botTeam ) then outputChatBox ( "nemesi bot is on the team Nemsis" ) else outputChatBox ( "nemesi bot is not in a team." ) end end ,1000, 1, nemesi, nemesi1, nemesi2, nemesi3 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss )
-
Enable the colorCoded argument of outputChatBox, last argument.
-
local deliverP = { --Los Santos {1787.7626953125, -2555.7822265625, 13}, {-1662.8570556641, -291.42846679688, 14}, {1448.5712890625, 1508.5714111328, 10}, } local PilotPlane = createVehicle ( 593, 1890.3594970703, -2493.8330078125, 13.53911781311 ) local data = { } function PilotDeliver ( thePlayer ) local team = getPlayerTeam ( thePlayer ) if ( team and getTeamName ( team ) == "Pilot" ) then if ( data [ thePlayer ] and isElement ( data [ thePlayer ].delBlip ) and isElement ( data [ thePlayer ].delmarker ) ) then return outputChatBox ( "You already got a destination.", thePlayer, 255, 0, 0 ) end giveDestination ( thePlayer ) end end addCommandHandler ( "startshift", PilotDeliver ) function DelPayment ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local vehicle = getPedOccupiedVehicle ( hitElement ) if ( vehicle and getElementModel ( vehicle ) == 593 ) then local randomPay = math.random ( 2000, 5000 ) givePlayerMoney ( randomPay ) outputChatBox ( "You Arrived to your distenation , This is your payment".. tostring ( randomPay ) .."$", hitElement, 255, 100, 0, true ) if ( data [ hitElement ] ) then if isElement ( data [ hitElement ].delBlip ) then destroyElement ( data [ hitElement ].delBlip ) end if isElement ( data [ hitElement ].delmarker ) then destroyElement ( data [ hitElement ].delmarker ) end end setTimer ( giveDestination, 5000, 1, hitElement ) end end end function giveDestination ( thePlayer ) if ( not isElement ( thePlayer ) ) then return end local x, y, z = unpack ( deliverP [ math.random ( #deliverP ) ] ) data [ thePlayer ] = { delBlip = createBlip ( x, y, z, 51 ), delmarker = createMarker ( x, y, z, "cylinder", 5, 255, 160, 0, 100 ) } addEventHandler ( "onMarkerHit", data [ thePlayer ].delmarker, DelPayment ) outputChatBox ( "You have a new flight , go to location bliped on your map!", thePlayer, 255, 100, 0, true ) end