SA-MP Forums Archive
[Ajuda] Npc Conecta e Desconecta - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Npc Conecta e Desconecta (/showthread.php?tid=618929)



Npc Conecta e Desconecta - SmokiieGamer - 11.10.2016

Bom pessoal, mais 1 pedido de ajuda rsrs

Eu estou criando 1 npc de Onibus, que fica andando pelas ruas etc...

Mas ele conecta e desconecta, alguem me podia ajudar ?

PRINTS:

http://prntscr.com/csiwxi

http://prntscr.com/csix35

http://prntscr.com/csixe3

http://prntscr.com/csixiz


Re: Npc Conecta e Desconecta - ClaudineiCDS - 11.10.2016

Verifique a callback "OnPlayerSpawn", ou mande ela para eu ver.


Re: Npc Conecta e Desconecta - SmokiieGamer - 11.10.2016

Quote:
Originally Posted by ClaudineiCDS
Посмотреть сообщение
Verifique a callback "OnPlayerSpawn", ou mande ela para eu ver.
Nao Tenho nada no OnPlayerSpawn


Re: Npc Conecta e Desconecta - ClaudineiCDS - 11.10.2016

Quote:
Originally Posted by SmokiieGamer
Посмотреть сообщение
Nao Tenho nada no OnPlayerSpawn
O NPC estб sendo Kick??


Re: Npc Conecta e Desconecta - SmokiieGamer - 11.10.2016

Quote:
Originally Posted by ClaudineiCDS
Посмотреть сообщение
O NPC estб sendo Kick??
Certo.


Re: Npc Conecta e Desconecta - JPedro - 11.10.2016

Tem que fazer o NPC passar pelo sistema de login, senгo ele й kickado
sу checar se й o jogador й NPC e depois spawnar-lo


Re: Npc Conecta e Desconecta - SmokiieGamer - 11.10.2016

Quote:
Originally Posted by JPedro
Посмотреть сообщение
Tem que fazer o NPC passar pelo sistema de login, senгo ele й kickado
sу checar se й o jogador й NPC e depois spawnar-lo
Ata , valeu , sabia disso ai nao...


Re: Npc Conecta e Desconecta - ClaudineiCDS - 11.10.2016

Coloque em seu sistema de login isto:
PHP код:
if(IsPlayerNPC(playerid)) return 0



Re: Npc Conecta e Desconecta - JPedro - 11.10.2016

No meu gamemode eu coloco pra checar se o jogador nгo й um NPC, ai ele mostra a tela de login
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(!
IsPlayerNPC(playerid))
    {
        
// Sistema de Login
    
}
    return 
1;

mas vocк pode fazer assim tambйm

Desse jeito ele checa se й NPC e depois spawna
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(
IsPlayerNPC(playerid))
    {
        
SpawnPlayer(playerid);
    }
    return 
1;




Re: Npc Conecta e Desconecta - SmokiieGamer - 11.10.2016

@REMOVED