SA-MP Forums Archive
[DUV] NPC conflito c/ login - 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: [DUV] NPC conflito c/ login (/showthread.php?tid=132622)



[DUV] NPC conflito c/ login - Ambrуsio - 08.03.2010

Criei um NPC tudo certinho, mas ele sу aparece se eu retirar o sistema de Login!
Eu uso o Sistema de adm XADM, e nele que fica integrado o sistema de login!
O que posso fazer pra resolver esse problema sem retirar o login?!

agradeзo desdejб!


Re: [DUV] NPC conflito c/ login - OxygenBR - 08.03.2010

hmm...

ponha algo do tipo if(IsPlayerNPC(playerid)) no OnPlayerConnect se nгo estou enganado.


Re: [DUV] NPC conflito c/ login - Ambrуsio - 08.03.2010

Quote:
Originally Posted by OxygenBR
hmm...

ponha algo do tipo if(IsPlayerNPC(playerid)) no OnPlayerConnect se nгo estou enganado.
jб coloquei...
Код:
  if(IsPlayerNPC(playerid)) return 1;
.. mas с adiantou!

mais alguem?


Re: [DUV] NPC conflito c/ login - SlashPT - 08.03.2010

como esta o seu registo pode meter as linhas ?? so preciso das linhas que fazem com que reconheзa o jogador e mande as mensagens ou como vc tem [mas atenзгo estou a pedir й tipo exemplo:]

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(!logged)
    {
        Ban(playerid);
    }
    return 1;
}
ta a perceber??


Re: [DUV] NPC conflito c/ login - Ambrуsio - 08.03.2010

Quote:
Originally Posted by DarK TeaM PT
como esta o seu registo pode meter as linhas ?? so preciso das linhas que fazem com que reconheзa o jogador e mande as mensagens ou como vc tem [mas atenзгo estou a pedir й tipo exemplo:]

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(!logged)
    {
        Ban(playerid);
    }
    return 1;
}
ta a perceber??
Seria o OnPlayerSpawn?

Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) 
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); 
    if(!strcmp(npcname, "MeuPrimeiroNPC", true)) 
    {
      PutPlayerInVehicle(playerid, MeuPrimeiroNPCVehicle, 0); 
    }
    return 1;
  }
SetPlayerInterior(playerid,0);
PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
ResetPlayerWeapons(playerid);
TextDrawHideForPlayer(playerid,line1);
TextDrawHideForPlayer(playerid,line3);
TextDrawHideForPlayer(playerid,line2);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
new randt = random(sizeof(RandomTools));
new randp = random(sizeof(RandomPistols));
GivePlayerWeapon(playerid, RandomPistols[randp][0], RandomPistols[randp][1]);
GivePlayerWeapon(playerid, RandomTools[randt][0], RandomTools[randt][1]);
return 1;
}



Re: [DUV] NPC conflito c/ login - GuikBretas - 08.03.2010

if(IsPlayerNPC(playerid))
{
gPlayerLogged[playerid] == 1; //ou troque a vбriavel para a que vocк usa
}
//no OnPlayerConnect


Re: [DUV] NPC conflito c/ login - Ambrуsio - 09.03.2010

Quote:
Originally Posted by GuikBretas
if(IsPlayerNPC(playerid))
{
gPlayerLogged[playerid] == 1; //ou troque a vбriavel para a que vocк usa
}
//no OnPlayerConnect
с intendi o que vc quis dizer.


Re: [DUV] NPC conflito c/ login - SlashPT - 09.03.2010

o ke acontece se ele nao logar se um jogador nao logar banido?? kickado??


Re: [DUV] NPC conflito c/ login - Ambrуsio - 09.03.2010

Quote:
Originally Posted by DarK TeaM PT
o ke acontece se ele nao logar se um jogador nao logar banido?? kickado??
Se o player nгo logar, ele apenas nгo spwana! Ele nгo й kikado, muito menos banido!


Re: [DUV] NPC conflito c/ login - SlashPT - 09.03.2010

e onde estao as linhas disso??