This script will allow you to walk up to a hospital entrance and grab a health pickup to refill your health.HospitalHeal.zip (815 Bytes)
very nice does it need more coordinates for other hospitals, this is also a good example of making other pickups like weapons etc you can assign co-ords for ex in the armory add the guns all that to be picked up by officers etc
yeah so far theres only sandy shores added
yea its still a great ex to add the rest of them takes a few min of teleporting and writing down some locations great work tho nice to see you back
@cody196 - @GanjaMonster - hi both need some help here - I can’t see any marker on the map and I’m not able to pickup health to refill - any idea what Im doing wrong ?? did place both files in resource (heal) and autoload (heal) pls to hear - thanks
This doesn’t work. I’ve come across a lot of so called releases that are far from finished. Console gives me nothing but errors on this. A release should be ready to use, this is not.
Please show the errors that way he can help you or someone else can help you.
@HST, @Thor try the code below
local hospitalPickup = {
Pickup = {-1888453608, 1839.03, 3673.25, 34.28}
}
local marker = AddBlipForCoord( 1839.6, 3672.93, 34.28 );
SetBlipSprite( marker, 61 );
function createPickup(typeHash, posX, posY, posZ)
CreatePickup(-1888453608, 1839.03, 3673.25, 34.28)
wait(60)
return
end
function createBlip()
local blip = AddBlipForCoord(pos[1],pos[2],pos[3])
SetBlipAsShortRange(blip,true)
SetBlipSprite(blip,61)
end
well lets try this one instead
Citizen.CreateThread(function()
local hospitalPickup = {
{x= 1839.03, y= 3673.25, z=34.28}
}
local hospitals = {
{id=61, x= 1839.6, y= 3672.93, z= 34.28}
}
-- Create blips on the map for all the hospitals
for _, map in pairs(hospitals) do
map.blip = AddBlipForCoord(map.x, map.y, map.z)
SetBlipSprite(map.blip, map.id)
SetBlipAsShortRange(map.blip, true)
end
-- Spawn the pickup items
for _, item in pairs(hospitalPickup) do
pickup = CreatePickup(GetHashKey("PICKUP_HEALTH_STANDARD"), item.x, item.y, item.z)
Wait(1)
end
end)
Citizen.CreateThread(function()
local hospitalPickup = {
{x= 1839.03, y= 3673.25, z=34.28}
}
local hospitals = {
{id=61, x= 1839.6, y= 3672.93, z= 34.28}
}
-- Create blips on the map for all the hospitals
for _, map in pairs(hospitals) do
map.blip = AddBlipForCoord(map.x, map.y, map.z)
SetBlipSprite(map.blip, map.id)
SetBlipAsShortRange(map.blip, true)
end
-- Spawn the pickup items
for _, item in pairs(hospitalPickup) do
pickup = CreatePickup(GetHashKey("PICKUP_HEALTH_STANDARD"), item.x, item.y, item.z)
end
end)
@Streetcorps - will download right now … and what I can see “it works” - will let y know - thanks
Edit: Its probably me me but … no go ??
@HST - do you have any luck ?? - its probably because of other mods/scripts @Streetcorps did you test it with or without other mods/scripts - thanks
Yes
AutoStartResources:
- chat
- spawnmanager
- essentialmode
- es_freeroam
- fivem-map-skater
- â– â– â– â– â– â– â–
- hardcap
- baseevents
- â– â– â– â– â– â– â–
- hardcap # prevents too many players from joining
- scoreboard
- heal
- stations
- garages
- stores
idk i dont see it for me i wonder if its something else messing it up ill try to redo the code when im dome with work
@Thor no luck here. @Streetcorps I’ll try it tonight removing the other resources I have. Maybe there’s a conflict. I don’t think it’s anything were doing wrong, as my 31 other resources load just fine.
(EDIT: It was us doing something wrong.)