[Ajuda] NPC invisнvel ?
#1

@ RESOLVIDO !!!

@ EDITADO.
Reply
#2

Quote:
Originally Posted by JhefTFJ
Посмотреть сообщение
Olб galera, estou com pequena duvida bastante confusa, bem eu criei um NPC pra por no meu servidor e saiu em perfeita posiзгo sem erros, gamemode copilando mt bem...Mas minha Duvida e que o NPC nгo aparece ali no lugar a onde eu iniciei a gravaзгo, alguйm pode tirar estб duvida porque meu NPC nгo aparece?

Obs: o NPC ele Conecta mas nгo aparece!

LOG:
Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[22:06:50] password = ""  (string)
[22:06:50] hostname = "SA-MP Server"  (string)
[22:06:50] 
[22:06:50] Server Plugins
[22:06:50] --------------
[22:06:50]  Loading plugin: streamer
[22:06:50] 

*** Streamer Plugin v2.7.7 by Incognito loaded ***

[22:06:50]   Loaded.
[22:06:50]  Loading plugin: sscanf
[22:06:50] 

[22:06:50]  ===============================

[22:06:50]       sscanf plugin loaded.     

[22:06:50]    © 2009 Alex "******" Cole

[22:06:50]    0.3d-R2 500 Players "dnee"

[22:06:50]  ===============================

[22:06:50]   Loaded.
[22:06:50]  Loading plugin: FileManager
[22:06:50] ******************
[22:06:50] ** FILE MANAGER **
[22:06:50] **    Loaded    **
[22:06:50] ** Version 1.5 **
[22:06:50] ******************
[22:06:50]   Loaded.
[22:06:50]  Loaded 3 plugins.

[22:06:50] 
[22:06:50] Filterscripts
[22:06:50] ---------------
[22:06:50]   Loading filterscript 'npc_record.amx'...
[22:06:50]   Loaded 1 filterscripts.

[22:06:51] [ » ] NR RP - ( NR ) ( GAMEMODE EXCLUSIVA ).
[22:06:51] Number of vehicle models: 15
[22:06:51] [connection] 127.0.0.1:57670 requests connection cookie.
[22:06:52] [connection] incoming connection: 127.0.0.1:57670 id: 0
[22:06:53] [npc:join] Belck has joined the server (0:127.0.0.1)
Verifica se o mesmo passou pelo spawn.
Reply
#3

Quote:
Originally Posted by SammyJ
Посмотреть сообщение
Verifica se o mesmo passou pelo spawn.
Tudo ok e ainda continua sem o NPC no servidor. =/

PHP код:
public OnPlayerSpawn(playerid)
{
    if(
IsPlayerNPC(playerid))
    {
        new 
npcname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnpcnamesizeof(npcname));
        
//if(!strcmp(npcname, "Belck", true))
        
if(!strcmp(npcname"Belck"))
        {
            
SetPlayerSkin(playerid,281);
            
Attach3DTextLabelToPlayer(Belckplayerid0.00.00.2);
            
SetPlayerColor(playerid,0xFFFFFF00);
            
SetTimerEx("FalaDeBelck",20000,true,"d",playerid);
        }
        return 
1;
    } 
Reply
#4

Quote:
Originally Posted by JhefTFJ
Посмотреть сообщение
Tudo ok e ainda continua sem o NPC no servidor. =/
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
IsPlayerNPC(playerid))
    {
        new 
npcname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnpcnamesizeof(npcname));
        
//if(!strcmp(npcname, "Belck", true))
        
if(!strcmp(npcname"Belck"))
        {
            
SetPlayerSkin(playerid,281);
            
Attach3DTextLabelToPlayer(Belckplayerid0.00.00.2);
            
SetPlayerColor(playerid,0xFFFFFF00);
            
SetPlayerVirtualWorld(playerid0);//  seta o mundo virtual
            
SetPlayerInterior(playerid0);// seta o interior
            
SetTimerEx("FalaDeBelck",20000,true,"d",playerid);
        }
        return 
1;
    }
// teste esse comando
CMD:irnpc(playeridparams[])
{
    new 
id strval(params);
    if(
IsPlayerNPC(id))
    {
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(playeridxyz);
        
SetPlayerPos(idxyz);
        
SetPlayerInterior(playeridGetPlayerInterior(id));
        
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(id));
        new 
npcname[MAX_PLAYER_NAME], str[128];
        
GetPlayerName(idnpcnameMAX_PLAYER_NAME);
        
format(strsizeof(str), "Vocк foi atй o npc %s"npcname);
        
SendClientMessage(playerid, -1str);
        return 
true;
    }
    
SendClientMessage(playerid, -1"nгo й um npc");
    return 
true;

Reply
#5

Quote:
Originally Posted by SammyJ
Посмотреть сообщение
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
IsPlayerNPC(playerid))
    {
        new 
npcname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnpcnamesizeof(npcname));
        
//if(!strcmp(npcname, "Belck", true))
        
if(!strcmp(npcname"Belck"))
        {
            
SetPlayerSkin(playerid,281);
            
Attach3DTextLabelToPlayer(Belckplayerid0.00.00.2);
            
SetPlayerColor(playerid,0xFFFFFF00);
            
SetPlayerVirtualWorld(playerid0);//  seta o mundo virtual
            
SetPlayerInterior(playerid0);// seta o interior
            
SetTimerEx("FalaDeBelck",20000,true,"d",playerid);
        }
        return 
1;
    }
// teste esse comando
CMD:irnpc(playeridparams[])
{
    new 
id strval(params);
    if(
IsPlayerNPC(id))
    {
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(playeridxyz);
        
SetPlayerPos(idxyz);
        
SetPlayerInterior(playeridGetPlayerInterior(id));
        
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(id));
        new 
npcname[MAX_PLAYER_NAME], str[128];
        
GetPlayerName(idnpcnameMAX_PLAYER_NAME);
        
format(strsizeof(str), "Vocк foi atй o npc %s"npcname);
        
SendClientMessage(playerid, -1str);
        return 
true;
    }
    
SendClientMessage(playerid, -1"nгo й um npc");
    return 
true;

Adapitei Seu comando, utilizei o comando e meu personagem continua no mesmo lugar, apenas aparece essa mensagem.

Obs: meu NPC estб em na concessionaria, e nгo neste local a onde estou.

Print:
Reply
#6

@ RESOLVIDO !!!

Obrigado SammyJ, vocк mim ajudou bastante!
+ REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)