[Ajuda]Erro no "SetPlayerHoldingObject"
#1

Eu sei que jб foi feito tуpicos assim, mas й que nгo estou sabendo direito como й....
No GM que estou editando nгo tem esse "SetPlayerHoldingObject"
Eu tentei botar em um comando de ADM dai ele fica com um Objeto na cabeзa mas deu um erro acho que fala que nгo tem include
Mas eu tenho os novos includes e o pacote antigo, ja botei para funcionar o Server e tudo..
Tenho quase certeza que tem que botar mais alguma coisa para fazer o Objeto no player, porque eu botei assim:
" SetPlayerHoldingObject(playerid, 1210, 6); "
Junto com algumas funзхes la do CMD apenas...
Quem souber me fala ^^

E outra duvida.
Eu tenho um sistema de casas que da o nome do dono o aluguel etc..
Queria deixa essas informaзхes em "TextDraw" Para os jogadores verem de longe as informaзхes...
Manda um tutorial ou me diga como й feito isto


Agradeзo Quem poder me ajudar...
Reply
#2

Primeira dъvida: Diga que versгo de servidor vocк estб usando.

Segunda: Vocк quis dizer 3dText?
Reply
#3

Eu to no Sa-mp 0.3c
Nгo sei direito se й 3D ou TextDraw Por isto to pedindo ajuda xD
Reply
#4

Coloque isto no topo, abaixo de #include <a_samp>:
pawn Код:
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
Reply
#5

Nгo funcionou da o mesmo erra que falei...
Reply
#6

eu fis o meu sistema de "SetPlayerHoldingObject" no samp 3b e no samp 3c dava erro ao copilar
mais ja arrumei. um exemplo de seu erro \/

Код:
#include <a_samp>

#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)

public OnPlayerCommandText(playerid,cmdtext[])
{
new cmd[256];
if(strcmp(cmd, "/acessorios", true) == 0)
{
ShowPlayerDialog(playerid,6668,DIALOG_STYLE_LIST,"Escolha um acessуrio","Nenhum acessуrio (remover)\nTelevisгo\nHipopуtamo\nCrвnio\nSaco\nMina\nVaca\nDragгo\nAlargamento\nFumaзa\nCone\nУculos\nbaseball\nBarril\nBomba","OK","Fechar");
return 1;
}
return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if(dialogid == 6668)
	{
	    if(response)
        {
		if(listitem == 0)
		{
        StopPlayerHoldingObject(playerid);
		}
		if(listitem == 1)
		{
        new tv = 1518;
		SetPlayerHoldingObject(playerid, tv, 2, 0000.23, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
		}
		if(listitem == 2)
		{
        new hippo = 1371;
		SetPlayerHoldingObject(playerid, hippo, 1, 0000.23, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
		}
		if(listitem == 3)
		{
		new skull = 3524;
		SetPlayerHoldingObject(playerid, skull, 1, -0001.7, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
		}
		if(listitem == 4)
		{
		new punchbag = 1985;
		SetPlayerHoldingObject(playerid, punchbag, 1, 0001.00, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
		}
        if(listitem == 5)
		{
		new mine = 2918;
		SetPlayerHoldingObject(playerid, mine, 2, 0001.40, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
        }
        if(listitem == 6)
        {
		new cow = 16442;
		SetPlayerHoldingObject(playerid, cow, 1, 0000.42, 0000.0, 0000.0, -0090.0, 0090.0, 0180.0);
        }
        if(listitem == 7)
        {
		new dragon = 3528;
		SetPlayerHoldingObject(playerid, dragon, 2, 0003.50, 0000.0, -0000.4, -0090.0, 0090.0, 0180.0);
        }
        if(listitem == 8)
        {
		new flare = 354;
		SetPlayerHoldingObject(playerid, flare, 1, 0000.15, 0000.0, 0000.0, 0000.0, 0000.0, 0180.0);
        }
        if(listitem == 9)
        {
		new smoke = 2780;
		SetPlayerHoldingObject(playerid, smoke, 2, 0000.00, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
        }
        if(listitem == 10)
        {
		new cone = 1238;
		SetPlayerHoldingObject(playerid, cone, 2, 0000.48, 0000.0, 0000.0, 0000.0, 0090.0, 0180.0);
        }
        if(listitem == 11)
        {
		new goggles = 3070;
		SetPlayerHoldingObject(playerid, goggles, 2, 0000.00, 0000.07, 0000.0, 0180.0, 0090.0, 0180.0);
        }
        if(listitem == 12)
        {
		new bbat = 2045;
		SetPlayerHoldingObject(playerid, bbat, 5, 0000.10, -0000.03, -0000.30, 0076.0, 0000.0, 0180.0);
        }
        if(listitem == 13)
        {
		new barrel = 1225;
		SetPlayerHoldingObject(playerid, barrel, 1, 0000.00, -0000.45, 0000.0, 0000.0, 0090.0, 0180.0);
        }
        if(listitem == 14)
        {
		new jihad = 1654;
		SetPlayerHoldingObject(playerid, jihad, 1, 0000.00, 0000.20, 0000.0, 0000.0, 0090.0, 0180.0);
        }
        }
        }
        }
Reply
#7

Eu no meu GameMode do 0.3c, eu fiz as #defines que o cynic indicou em cima e depois meti no comando para usar os acessуrios:

SetPlayerHoldingObject(playerid, 1210, 6 ,0.3 ,0.1 ,0 ,0 , -90, 0);

E para parar de usar o acessуrio:

StopPlayerHoldingObject(playerid);

E funcionou....

NOTA: O exemplo que mostro acima tem a haver com uma mala mas isso й variбvel de objecto para objecto....

Espero ter ajudado, cumprimentos,
Swat007forever
Reply
#8

Aee consegui fazer ^^
Sу faltava o STOP
Dai funciona 1000000%
Botei essa maleta para testar fico muito bommm!!
Agora queria saber como coloco um texto em cima da cabeзa tipo "Admin - Em serviзo!" A cor eu tenho varias..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)