NPCs connects but they dont spawn
#1

Hey guys,

Iґve a little problem over here, I wanted to test some shit with NPCґs but they just dont spawn ;(

Iґve replaced the names, and coords in the gl_npcs fs and my rcon console always tells me that there are incomming connections.

But when I try to teleport to them Iґm getting teleportet to the "0,0,0,-Coordinates"

I already ******d it but yet I didnt couldnt find out what Iґm doing wrong

Code in the GM:

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(
IsPlayerNPC(playerid)) return SpawnPlayer(playerid);
    
SetPlayerInterior(playerid,3);
    
SetPlayerPos(playerid513.0422,-17.3889,1001.5653);
    
SetPlayerCameraPos(playerid513.0743,-10.5657,1001.5653);
    
SetPlayerCameraLookAt(playerid513.0422,-17.3889,1001.5653);
    
SetPlayerFacingAngle(playerid352.0760);
    
    
TextDrawShowForPlayer(playeridTextdraw0);
    return 
1;

Code in the NPC-File:

PHP код:
public OnNPCSpawn()
{
    
SendChat("hi there!");
    
NextPlayback();

Reply
#2

Add this in you gamemode and try:
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
IsPlayerNPC(playerid)) return 1;

Reply
#3

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Add this in you gamemode and try:
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
IsPlayerNPC(playerid)) return 1;

Didnt changed anything


BTW: I dont even know why you think the error could be in OnPlayerSpawn, the NPC doesnt spawn thats my problem
Reply
#4

I even tried it like this but yet i couldnt found out whats wrong....


PHP код:
public OnPlayerConnect(playerid)
{
    if(
IsPlayerNPC(playerid)) return SetPlayerPos(playerid,1615.0560,-1526.9115,13.6229) && SetPlayerInterior(playerid,0);
    
SetPlayerColor(playerid,0x00FF96FF);
    
GivePlayerMoney(playerid,420420);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)