30.11.2016, 19:11
Hello,
I'm using the RNPC include and got following problem:
Apparently the Bot gets stuck at the RequestClass Position, even though the Init-Process is being called at the right time.
Code:
OnPlayerSpawn:
SetRNPC:
This shows up in the console
As you can see in the code above, the position is NOT "340.0460,2553.3528,16.7910" as it should be but "339.045989 | 2553.352783 | 17.791000" - which is equal to
I have no idea what causes this problem.
Greetings
I'm using the RNPC include and got following problem:
Apparently the Bot gets stuck at the RequestClass Position, even though the Init-Process is being called at the right time.
Code:
Код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)){
printf("Bot @ ClassSel. ");
return 1;
}
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
Код:
if(IsPlayerNPC(playerid)){
SetRNPC(playerid);
return 1;
}
Код:
printf("Calling SetRNPC w/ id %d",npcid);
SetPlayerPos(npcid, 340.0460,2553.3528,16.7910);
new Float:x,Float:y,Float:z;
GetPlayerPos(npcid,x,y,z);
printf("%f | %f | %f",x,y,z);
SetPlayerSkin(npcid,303);
RNPC_AddPause(150);
RNPC_CreateBuild(npcid, PLAYER_RECORDING_TYPE_ONFOOT);
Код:
[20:59:08] Bot @ ClassSel. [20:59:08] Calling SetRNPC w/ id 0 [20:59:08] 339.045989 | 2553.352783 | 17.791000
Код:
AddPlayerClass(0,339.0460,2553.3528,17.7910,71.4563,0,0,0,0,0,0);
Greetings

