d43dr4 Posted December 11, 2012 Posted December 11, 2012 Hello, I got a code but it was not like i want this script code makes every Infernus with a blip but i want it to make only a blip for the car i am on it So please correct this: addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, theVehicles in ipairs ( getElementsByType("vehicle") ) do if string.find ( getElementModel ( theVehicles ), 411 ) then createBlipAttachedTo ( theVehicles, 55 ) end end end ) And if u can do a code to make me a blip on the map , my name on game if u need it #[iMr][E'rrOr]_N THX Just Smile !
myonlake Posted December 11, 2012 Posted December 11, 2012 Perhaps this is what you want. Next time, look at your own code. Yours doesn't make sense. Server-side local serial = "" addEventHandler("onResourceStart", resourceRoot, function() for _,vehicle in ipairs(getElementsByType("vehicle")) do if getVehicleController(vehicle) then if getPlayerSerial(getVehicleController(vehicle)) == "" then createBlipAttachedTo(vehicle, 55, 2, 255, 255, 255, 255, 0, 190) break end end end for _,player in ipairs(getElementsByType("player")) do if getPlayerSerial(player) == serial then createBlipAttachedTo(player, 0, 2, 255, 150, 10, 255) break end end end ) addEventHandler("onPlayerJoin", root, function() if getPlayerSerial(source) == serial then createBlipAttachedTo(source, 0, 2, 255, 150, 10, 255) end end ) addEventHandler("onVehicleEnter", root, function(player, seat, jacker) if getPlayerSerial(player) == serial then createBlipAttachedTo(source, 55, 2, 255, 255, 255, 255, 0, 190) end end ) addEventHandler("onVehicleExit", root, function(player, seat, jacked) if getPlayerSerial(player) == serial then for _,element in ipairs(getAttachedElements(source)) do if getElementType(element) == "blip" then destroyElement(element) break end end end end ) If I helped you, please click the like button on the right Thanks!
TAPL Posted December 11, 2012 Posted December 11, 2012 myonlake, you forgot this: if getPlayerSerial(getVehicleController(vehicle)) == "" then if getPlayerSerial(getVehicleController(vehicle)) == serial then
d43dr4 Posted December 11, 2012 Author Posted December 11, 2012 now how to make my self a blip , when iam without a car ? Just Smile !
Sora Posted December 11, 2012 Posted December 11, 2012 now how to make my self a blip , when iam without a car ? addCommandHandler("noob-blip", function (NoOob) if not nblip then local nblip = createBlipAttachedTo(NoOob,0) else destroyElement(nblip) end end) [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
d43dr4 Posted December 11, 2012 Author Posted December 11, 2012 i dont want to type a command if u can give me a script when it starts i will a blip Just Smile !
Sora Posted December 11, 2012 Posted December 11, 2012 (edited) i dont want to type a commandif u can give me a script when it starts i will a blip the code that i've post before is just an example try to make one your self and stop asking for this kind of help btw : i've answered you before about special car blip .. right here : viewtopic.php?f=119&t=51197&p=499280#p499279 Edited December 11, 2012 by Guest [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
d43dr4 Posted December 11, 2012 Author Posted December 11, 2012 i try before if i can make this why i will ask for before i post to ask for a code i try to make it myself im not exploitative Just Smile !
Sora Posted December 11, 2012 Posted December 11, 2012 i try beforeif i can make this why i will ask for before i post to ask for a code i try to make it myself im not exploitative well then the code is up there change it to your requirements .. and let me see what you've done [REL] Resource Starter System v1.3 [REL] Give Permissions Panel v1.4 [REL] Meta Creator 1.1 ( In-game MetaCreator ) [REL] ACL Permission Manager 1.0 [REL] Accounts Security Manager 1.1 Name(s) in-game : old |S.s|SoRa, current : *Sora
TAPL Posted December 11, 2012 Posted December 11, 2012 now how to make my self a blip , when iam without a car ? When you with/without a car, you want same blip?
myonlake Posted December 11, 2012 Posted December 11, 2012 now how to make my self a blip , when iam without a car ? Perhaps look at my code? It has both in it. If I helped you, please click the like button on the right Thanks!
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