SA-MP Forums Archive
Attached Player Object remove after death/spawn? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Attached Player Object remove after death/spawn? (/showthread.php?tid=376433)



Attached Player Object remove after death/spawn? - kbalor - 10.09.2012

So I have manage to make a attached player object it attached perfectly but. After death/spawn it all removes. Now all my attached objects are gone. How do it maintain or attached if death or spawn, So I don't need to attache object evrytime?


Re: Attached Player Object remove after death/spawn? - Squirrel - 10.09.2012

Well, you need to set them onto the PlayerSpawn. Paste the code


Re: Attached Player Object remove after death/spawn? - Squirrel - 10.09.2012

delete.


Re: Attached Player Object remove after death/spawn? - clarencecuzz - 10.09.2012

Show the code where you attach the items.


Re: Attached Player Object remove after death/spawn? - kbalor - 10.09.2012

Thanks here's the code. I'm doing it using dialog so this go under Ondialogresponse.


pawn Код:
if ( dialogid == DIALOG_OBJ )
    {
        if ( !response ) return 1;
        if ( response )
        {
            switch ( listitem )
            {
                case 0:
                {
                    ShowPlayerDialog(playerid, DIALOG_HEAD, DIALOG_STYLE_LIST, "{33CC99}Head", "Hair\nHair 2\", "Choose", "Back");
                }
             }
           }
       }
    if ( dialogid == DIALOG_HEAD)
    {
        if ( !response ) return ShowPlayerDialog(playerid, DIALOG_OBJ, DIALOG_STYLE_LIST, "
Objects Menu", "Head", "Choose", "Close");
        if ( response )
        {
            switch ( listitem )
            {
                case 0:
                {
                    SetPlayerAttachedObject( playerid, 1, 18893, 2, 0.094485, 0.007215, 0.0, 0.000000, 0.000000, 0.000000, 1.200000, 1.200000, 1.200000  );
                    EditAttachedObject(playerid, 1);
                }