Actor with custom skin
#1

Hello!

I have problem with actors. I want to create an anctor with custom skin that I added to the server.
I tried to create it like a normal actor, but if I use skin id above 311, nothing shows up.

I am using this code:

Код:
CreateActor(20001, 67.2179,-1538.9135,4.9933,267.4910);
I don't know what to do to make it work :/
Any ideas?
Reply
#2

try

PHP код:
CreateActor(-2000167.2179,-1538.9135,4.9933,267.4910); 
Reply
#3

Quote:
Originally Posted by Salik
Посмотреть сообщение
try

PHP код:
CreateActor(-2000167.2179,-1538.9135,4.9933,267.4910); 
Not working. :/
Reply
#4

Any other idea?
Reply
#5

Are you sure the model is 20001? Check your artconfig.txt
Reply
#6

Try set skin 20001 to you. Work?
Reply
#7

Try assigning the custom skin to a different ID and use that ID instead, I've had an issue like that (not with actors though).
Reply
#8

Have you checked if the server has downloaded the model files?
Reply
#9

It works perfectly with SetPlayerSkin, that is the reason I do not understand what could be wrong with the actors.
Reply
#10

Quote:
Originally Posted by kadar
Посмотреть сообщение
It works perfectly with SetPlayerSkin, that is the reason I do not understand what could be wrong with the actors.
Its mean custom skins not suported on actors
Reply
#11

Quote:
Originally Posted by ATomas
Посмотреть сообщение
Its mean custom skins not suported on actors
I doubt that, I'm using custom skins on actors and it works properly.
Reply
#12

Quote:
Originally Posted by niCe
Посмотреть сообщение
I doubt that, I'm using custom skins on actors and it works properly.
Dont you have any idea what could be wrong? :/

I have this row in the artconfig file:

Код:
AddCharModel(269, 20001, "fam1.dff", "fam1.txd")
Then a command for creating actor:

Код:
CMD:test(playerid, params[])
{
	new d;
	if(sscanf(params, "d", d)) return Msg(playerid, -1, "/test skinid");
        new Float:pos[3], Float:a[2], Float:z;
	GetPlayerPos(playerid, a[0], a[1], z);
	GetPosInFrontOfPlayer(playerid, pos[0], pos[1], 5);
	GetPlayerFacingAngle(playerid, pos[2]);
	CreateActor(d, pos[0], pos[1], z, pos[2]);
	return 1;
}
And as i said before, it works with IDs from 0 to 311, but with custom skins (so from 20000-30000) it doesnt.
Reply
#13

You should put AddCharModel to game mode script in OnGameModeInit, not to artconfig file (that's obsolete).
Reply
#14

Even though the artconfig file is "obsolete" it still works.
Reply
#15

I've tried to put the code under OnGameModeInit, but still the same. SetPlayerSkin works perfectly, but actors will not get created with custom id-s.
Reply
#16

I fixed the problem, it was my bad... There was an include included called actors that I didn't use, and it f****d everything up. Thanks for everyone who tried to help me.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)