Hi,
mein NPC connected, jedoch wird er kurze Zeit später wieder gekickt.
Codes:
ocmd:story(playerid,params[])
{
#pragma unused params
switch(PlayerData[playerid][pLang])
{
case 0://german
{
ClearChat(playerid);
SCM(playerid,-1," ***..");
SCM(playerid,-1," *** ");
SCM(playerid,-1," ****");
CreateDialogBox(playerid);
UpdateDialogBox(playerid,"~r~***.");
SCM(playerid,-1," ***");
SCM(playerid,-1," *******");
CreateQuestBox(playerid);
UpdateQuestBox(playerid,"~y~***");
SetPlayerCheckpoint(playerid,-765.2651,1627.2670,27.1172,4);
MissionCP[playerid]=1;
ConnectNPC("Mission1","DRIntro");
PlayerPlaySound(playerid,1058,0,0,0);
}
case 1://english
{
ClearChat(playerid);
SCM(playerid,-1," ***..");
SCM(playerid,-1," *** PM");
SCM(playerid,-1,"***.");
CreateDialogBox(playerid);
UpdateDialogBox(playerid,"***");
SCM(playerid,-1," *****y **");
SCM(playerid,-1," ** T*****");
CreateQuestBox(playerid);
UpdateQuestBox(playerid,"~y***");
SetPlayerCheckpoint(playerid,-765.2651,1627.2670,27.1172,4);
ConnectNPC("Mission1","DRIntro");
MissionCP[playerid]=1;
PlayerPlaySound(playerid,1058,0,0,0);
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))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;
}
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid,SName[playerid],MAX_PLAYER_NAME);
if(IsPlayerNPC(playerid))return 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[64];
GetPlayerName(playerid,npcname,64);
if(!strcmp(npcname,"Mission1",true))
{
SetPlayerPos(playerid,-738.1842,1648.0729,27.4358);
SetPlayerSkin(playerid,33);
SpawnPlayer(playerid);
return 1;
}
}
return 1;
}
Grüße Decoder
#edit,
Ich habe die einzelnen Schritte printen lassen, er kommt nichtmal bis OnPlayerSpawn bzw SetPlayerPos