SA-MP Forums Archive
3DTextLabel and Object - 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: 3DTextLabel and Object (/showthread.php?tid=453284)



3DTextLabel and Object - Belajac - 24.07.2013

Create3DTextLabel , CreatePlayer3DTextLabel & CreateObject , CreatePlayerObject do not work everywhere.(in commands don't work)
Where exactly work this functions(in public or elsewhere).
I have command:
Код:
if(strcmp(cmd, "/helmet", true) == 0)
	{
    SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0, 0, 88, 75, 0);
	return 1;
	}
create an object and the object disappears.

Sorry for bad English!


Re : 3DTextLabel and Object - AmirRFCNR - 24.07.2013

https://sampwiki.blast.hk/wiki/CreatePlayerObject


Re: 3DTextLabel and Object - Belajac - 24.07.2013

How to attach this object( CreatePlayerObject(playerid, 18645, 0, 0, 5, 0, 0, 0); ) on player?
I don't know how to put object on player using AttachPlayerObjectToPlayer.
Код:
new helmet[MAX_PLAYERS]
helmet[playerid] = CreatePlayerObject(playerid, 18645, 0, 0, 5, 0, 0, 0);
AttachPlayerObjectToPlayer( playerid,helmet[playerid], playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
this don't work.


Re: 3DTextLabel and Object - Tayab - 24.07.2013

pawn Код:
// On top below includes
new HelmetOn[MAX_PLAYERS];
new helmet[MAX_PLAYERS];


// OnPlayerConnect
HelmetOn[playerid] = 0;

CMD:helmet(playerid, params[])
{
    if(HelmetOn[playerid] == 0)
    {
        helmet[playerid] = SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0, 0, 88, 75, 0);
        SendClientMessage(playerid, COLOR_WHITE, "Helmet on!");
        HelmetOn[playerid] = 1;
    }
    else
    {
        RemovePlayerAttachedObject(playerid,helmet[playerid]);
        SendClientMessage(playerid,COLOR_WHITE,"Helmet off!");
        HelmetOn[playerid] = 0;
    }
    return 1;
}



Re: 3DTextLabel and Object - Belajac - 24.07.2013

SetPlayerAttachedObject don't work
Quote:

I have command:

Код:
if(strcmp(cmd, "/helmet", true) == 0)
	{
    SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0, 0, 88, 75, 0);
	return 1;
	}
create an object and the object disappears.

Create helmet on head and helmet remove.
CreatePlayerObject(playerid, 18645, 0, 0, 5, 0, 0, 0); work but i don't know how to put object on player using AttachPlayerObjectToPlayer.