[MTA]Weed Posted January 4, 2018 Posted January 4, 2018 Hello, anyone got any idea whats wrong with my pickup, everything working well and pickups should respawn by the time given in .map and its working very well for the armor and health pickup, they respawn at the interval they should, but not same as weapons, the dont respawn never, you pick once and they are gone. pickupTable[source] = {} for i, p in ipairs(tempMapTable[source].DMpickup) do local pickup if p.typ == "health" then pickup = createPickup ( p.posX, p.posY, p.posZ, 0, p.amount, p.respawn) elseif p.typ == "armor" then pickup = createPickup ( p.posX, p.posY, p.posZ, 1, p.amount, p.respawn) else pickup = createPickup ( p.posX, p.posY, p.posZ, 2, tonumber(p.typ), p.respawn, p.amount) end setElementInterior(pickup, p.interior) setElementDimension(pickup, getElementDimension(source)) table.insert(pickupTable[source], pickup) end end this should be for the weapon pickups: pickup = createPickup ( p.posX, p.posY, p.posZ, 2, tonumber(p.typ), p.respawn, p.amount)
Moderators IIYAMA Posted January 4, 2018 Moderators Posted January 4, 2018 How about you debug it with this function? https://wiki.multitheftauto.com/wiki/GetPickupRespawnInterval
[MTA]Weed Posted January 5, 2018 Author Posted January 5, 2018 there isnt any error on debug, the script should get info from the map, and respawn the pickups. its working perfectly, pickups are there, but the only pickups that respawn, are health and armor. i dont recieve any kind of response from https://wiki.multitheftauto.com/wiki/GetPickupRespawnInterval
Moderators IIYAMA Posted January 5, 2018 Moderators Posted January 5, 2018 I never said that you have to look at your debug console. The only thing I did, was give you a link which you can use to check what is going on with your pick-ups. Which is ALSO debugging. Make use of it, or smoke yourself and do not. 1
Moderators IIYAMA Posted January 5, 2018 Moderators Posted January 5, 2018 I am very sorry to say this, but your creativity skills are lower than zero... Because of the weed? Well here you are! Show me what you are made of! -- serverside addCommandHandler("checkPickups", function () local pickups = getElementsByType ( "pickup") for i=1, #pickups do local pickup = pickups[i] if getPickupType ( pickup ) == 2 then -- weapon pickup local respawnInterval = getPickupRespawnInterval ( pickup ) iprint("RespawnInterval:", respawnInterval) end end end) 2 1
[MTA]Weed Posted January 5, 2018 Author Posted January 5, 2018 @IIYAMA the problem was in another resource which was not allowing the pickups to respawn, thanks. topic can be closed. thanks @IIYAMA for ur time. @Khadeer143 i really am not interested at your offtopic posts, nor ur self liking posts. but keep up. 1
Storm-Hanma Posted January 5, 2018 Posted January 5, 2018 (edited) @weed self like post? Hahhaa that's not off topic ,I said weed by seeing IIyama post ROFL....I can't like my own post test it by yourself then by liking own post !! Edited January 5, 2018 by Khadeer143
Moderators IIYAMA Posted January 5, 2018 Moderators Posted January 5, 2018 1 hour ago, [MTA]Weed said: @IIYAMA the problem was in another resource which was not allowing the pickups to respawn, thanks. topic can be closed. thanks @IIYAMA for ur time. I apologies for my out of placed joke. But I am glad you figured it out with or without my help.
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