Actor with custom skin -
kadar - 19.09.2018
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?
Re: Actor with custom skin -
Salik - 19.09.2018
try
PHP код:
CreateActor(-20001, 67.2179,-1538.9135,4.9933,267.4910);
Re: Actor with custom skin -
kadar - 19.09.2018
Quote:
Originally Posted by Salik
try
PHP код:
CreateActor(-20001, 67.2179,-1538.9135,4.9933,267.4910);
|
Not working. :/
Re: Actor with custom skin -
kadar - 21.09.2018
Any other idea?
Re: Actor with custom skin -
aoky - 21.09.2018
Are you sure the model is 20001? Check your artconfig.txt
Re: Actor with custom skin -
ATomas - 21.09.2018
Try set skin 20001 to you. Work?
Re: Actor with custom skin -
DTV - 21.09.2018
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).
Re: Actor with custom skin -
Undef1ned - 22.09.2018
Have you checked if the server has downloaded the model files?
Re: Actor with custom skin -
kadar - 22.09.2018
It works perfectly with SetPlayerSkin, that is the reason I do not understand what could be wrong with the actors.
Re: Actor with custom skin -
ATomas - 22.09.2018
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
Re: Actor with custom skin -
niCe - 22.09.2018
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.
Re: Actor with custom skin -
kadar - 22.09.2018
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.
Re: Actor with custom skin -
niCe - 22.09.2018
You should put AddCharModel to game mode script in OnGameModeInit, not to artconfig file (that's obsolete).
Re: Actor with custom skin -
J0sh... - 22.09.2018
Even though the artconfig file is "obsolete" it still works.
Re: Actor with custom skin -
kadar - 24.09.2018
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.
Re: Actor with custom skin -
kadar - 24.09.2018
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.