Guest Posted March 15, 2008 Share Posted March 15, 2008 Hi, I tried to create a simple blip attached to a player but it doesn't work. function spawn() if (spawnPlayer(source, 0, 0, 5)) then fadeCamera(source, true) createBlipAttachedTo(source, 0, 2, 255, 0, 0, 255) createBlip(0, 0, 0, 0, 2, 0, 255, 0, 255) end end addEventHandler("onPlayerJoin", getRootElement(), spawn) The static green blip is showing but the "attached" red blip isn't. How come? I use the same values for both blips (icon = 0, size = 2). Both server- and clientside creation of attached blips in this form doesn't work for me. Link to comment
Brophy Posted March 15, 2008 Share Posted March 15, 2008 You dont need to use createBlip if you have already used createBlipAttachedTo Link to comment
Guest Posted March 15, 2008 Share Posted March 15, 2008 I know. I just wanted to see if the static blip wasn't showing either but it is. The "attached" blip doesn't show at all when I use icon = 0. And when I use icon = 1 with the exact same setting (size = 2, r = 255, g = 0, b = 0) all I get is a big attached white blip instead of a attached size 2 red blip. Link to comment
Buffalo Posted March 15, 2008 Share Posted March 15, 2008 not sure, but try to put it onPlayerSpawn; Link to comment
Brophy Posted March 15, 2008 Share Posted March 15, 2008 Try this (ServerSide) function spawn ( source ) local s = spawnPlayer ( source, 0, 0, 5 ) if ( s ) then createBlipAttachedTo( source, 0, 2, 255, 0, 0, 255 ) fadeCamera( source,true ) end end addEventHandler("onPlayerJoin", getRootElement(), spawn) Link to comment
Guest Posted March 15, 2008 Share Posted March 15, 2008 Thanks . I'll have to wait until the player is fully spawned before attaching a blip. Makes sense. Link to comment
Guest Posted March 17, 2008 Share Posted March 17, 2008 But now I have another question. How can I destroy blips? Somehow the blips remain visible when a player leaves. Even when I make the blips nil they won't disappear and destroyElement keeps telling me blip is a bad argument. I could make them invisible to any root child, but I want to remove them entirely from memory. Link to comment
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