SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 06/03/2012, 10:50 PM   #1
MagneticLove-
Big Clucker
 
Join Date: Feb 2012
Posts: 59
Reputation: 0
Default [Ajuda]Não spawnando .-.

Bom fiz uma parada Para spawna na profissao Mais não funfa.
ele spawna no Local inicial.
Gostaria de saber como deixo pra spawna Na Profi...
pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PrimeiroSpawn[playerid] == true)
    {
        PrimeiroSpawn[playerid] = false;
        SetPlayerHealth(playerid, VALOR_MAXIMO_VIDA);
        GetPlayerName(playerid, nome, sizeof(nome));
        format(arquivo, sizeof(arquivo), ContasPlayers, nome);
        INI_Open(arquivo);
        SetPlayerSkin(playerid, INI_ReadInt("Skin"));
        SetPlayerPos(playerid,-2133.5146,173.7141,42.2500);
        ApplyAnimation(playerid, "CRACK", "Crckidle2", 4.0, 1, 0, 0, 0, 0);
        //criar o /continuarpos
        INI_Close();
        if(INI_ReadFloat("Vida") == 0) return 0x1;
        INI_Open(arquivo);
        SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
        SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
        SetTimer("Salario", 1800000, true);//1860000
        INI_Close();
    }
    SetPlayerSpawn(playerid);
    return 1;
}

public SetPlayerSpawn(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerProf[playerid] == 1)
        {
            SetPlayerPos(playerid, 1760.7625,-1885.8522,13.5554);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
    }
    return 1;
}
MagneticLove- is offline   Reply With Quote
Old 06/03/2012, 11:15 PM   #2
Don_Speed
High-roller
 
Don_Speed's Avatar
 
Join Date: Sep 2011
Location: Curitiba / PR
Posts: 3,046
Reputation: 218
Default Re: [Ajuda]Não spawnando .-.

pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PrimeiroSpawn[playerid] == true)
    {
        PrimeiroSpawn[playerid] = true;
        SetPlayerHealth(playerid, VALOR_MAXIMO_VIDA);
        GetPlayerName(playerid, nome, sizeof(nome));
        format(arquivo, sizeof(arquivo), ContasPlayers, nome);
        INI_Open(arquivo);
        SetPlayerSkin(playerid, INI_ReadInt("Skin"));
        SetPlayerPos(playerid,-2133.5146,173.7141,42.2500);
        ApplyAnimation(playerid, "CRACK", "Crckidle2", 4.0, 1, 0, 0, 0, 0);
        INI_Close();
        if(INI_ReadFloat("Vida") == 0) return 0x1;
        INI_Open(arquivo);
        SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
        SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
        SetTimer("Salario", 1800000, true);
        INI_Close();
    }
    return 1;
}
__________________
Don_Speed is offline   Reply With Quote
Old 06/03/2012, 11:24 PM   #3
MagneticLove-
Big Clucker
 
Join Date: Feb 2012
Posts: 59
Reputation: 0
Default Re: [Ajuda]Não spawnando .-.

Quote:
Originally Posted by Don_Speed View Post
pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PrimeiroSpawn[playerid] == true)
    {
        PrimeiroSpawn[playerid] = true;
        SetPlayerHealth(playerid, VALOR_MAXIMO_VIDA);
        GetPlayerName(playerid, nome, sizeof(nome));
        format(arquivo, sizeof(arquivo), ContasPlayers, nome);
        INI_Open(arquivo);
        SetPlayerSkin(playerid, INI_ReadInt("Skin"));
        SetPlayerPos(playerid,-2133.5146,173.7141,42.2500);
        ApplyAnimation(playerid, "CRACK", "Crckidle2", 4.0, 1, 0, 0, 0, 0);
        INI_Close();
        if(INI_ReadFloat("Vida") == 0) return 0x1;
        INI_Open(arquivo);
        SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
        SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
        SetTimer("Salario", 1800000, true);
        INI_Close();
    }
    return 1;
}
Ainda Nao spawna Na Profissao !
MagneticLove- is offline   Reply With Quote
Old 06/03/2012, 11:26 PM   #4
Don_Speed
High-roller
 
Don_Speed's Avatar
 
Join Date: Sep 2011
Location: Curitiba / PR
Posts: 3,046
Reputation: 218
Default Re: [Ajuda]Não spawnando .-.

Ata Na Profiasao Qual e a Definiçao da profiçao?
__________________
Don_Speed is offline   Reply With Quote
Old 06/03/2012, 11:29 PM   #5
MagneticLove-
Big Clucker
 
Join Date: Feb 2012
Posts: 59
Reputation: 0
Default Re: [Ajuda]Não spawnando .-.

Quote:
Originally Posted by Don_Speed View Post
Ata Na Profiasao Qual e a Definiçao da profiçao?
pawn Code:
PlayerProf[playerid]
id das Prof

#define Desempregado 0
#define Taxista 1
#define MotoTaxi 2
#define MOnibus 3
#define Medico 4
#define Advogado 5
#define Bancario 6
#define MParticular 7
#define TArmas 8
#define TDrogas 9
#define Prostituta 10
#define Prefeito 11
#define Presidente 12
#define Governador 13
MagneticLove- is offline   Reply With Quote
Old 06/03/2012, 11:33 PM   #6
Don_Speed
High-roller
 
Don_Speed's Avatar
 
Join Date: Sep 2011
Location: Curitiba / PR
Posts: 3,046
Reputation: 218
Default Re: [Ajuda]Não spawnando .-.

pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PlayerProf[playerid] == 1)
    {
       SetPlayerPos(playerid, x, y ,z);
       SendClientMessage(playerid, -1, " Voce Foi Spawnado");
     }
     return 1;
}
__________________

Last edited by Don_Speed; 07/03/2012 at 10:11 AM.
Don_Speed is offline   Reply With Quote
Old 06/03/2012, 11:53 PM   #7
ApeloForum
Big Clucker
 
Join Date: Mar 2012
Posts: 56
Reputation: 1
Default Re: [Ajuda]Não spawnando .-.

Quote:
Originally Posted by Don_Speed View Post
pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PlayerProf[playerid] == 1) || if(PlayerProf[playerid] == Taxista)
    {
       SetPlayerPos(playerid, x, y ,z);
       SendClientMessage(playerid, -1, " Voce Foi Spawnado");
     }
     return 1;
}
ApeloForum is offline   Reply With Quote
Old 07/03/2012, 12:14 AM   #8
MagneticLove-
Big Clucker
 
Join Date: Feb 2012
Posts: 59
Reputation: 0
Default Re: [Ajuda]Não spawnando .-.

Quote:
Originally Posted by Don_Speed View Post
pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PlayerProf[playerid] == 1) || if(PlayerProf[playerid] == Taxista)
    {
       SetPlayerPos(playerid, x, y ,z);
       SendClientMessage(playerid, -1, " Voce Foi Spawnado");
     }
     return 1;
}
Não spawna ainda :/

pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PrimeiroSpawn[playerid] == true)
    {
        PrimeiroSpawn[playerid] = false;
        SetPlayerHealth(playerid, VALOR_MAXIMO_VIDA);
        GetPlayerName(playerid, nome, sizeof(nome));
        format(arquivo, sizeof(arquivo), ContasPlayers, nome);
        INI_Open(arquivo);
        SetPlayerSkin(playerid, INI_ReadInt("Skin"));
        SetPlayerPos(playerid,-2133.5146,173.7141,42.2500);
        ApplyAnimation(playerid, "CRACK", "Crckidle2", 4.0, 1, 0, 0, 0, 0);
        //criar o /continuarpos
        INI_Close();
        if(INI_ReadFloat("Vida") == 0) return 0x1;
        INI_Open(arquivo);
        SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
        SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
        SetTimer("Salario", 1800000, true);//1860000
        INI_Close();
    }
    if(PlayerProf[playerid] == 1)
    {
        SetPlayerPos(playerid, 1753.7893,-1894.2590,13.5571);
        SendClientMessage(playerid, -1, " Voce Foi Spawnado");
    }
    return 1;
}
MagneticLove- is offline   Reply With Quote
Old 07/03/2012, 12:21 AM   #9
paulor
High-roller
 
paulor's Avatar
 
Join Date: Nov 2011
Location: Brasil
Posts: 3,128
Reputation: 215
Default Re: [Ajuda]Não spawnando .-.

Quote:
Originally Posted by ApeloForum View Post
Lol ²

2 if em 1. zika msm em! não sabia dessa.. KKKKK!

@Topic

Tenta direto. Veja se funciona..
pawn Code:
public OnPlayerSpawn(playerid)
{
    if(PrimeiroSpawn[playerid] == true)
    {
        PrimeiroSpawn[playerid] = false;
        SetPlayerHealth(playerid, VALOR_MAXIMO_VIDA);
        GetPlayerName(playerid, nome, sizeof(nome));
        format(arquivo, sizeof(arquivo), ContasPlayers, nome);
        INI_Open(arquivo);
        SetPlayerSkin(playerid, INI_ReadInt("Skin"));
        SetPlayerPos(playerid,-2133.5146,173.7141,42.2500);
        ApplyAnimation(playerid, "CRACK", "Crckidle2", 4.0, 1, 0, 0, 0, 0);
        //criar o /continuarpos
        INI_Close();
        if(INI_ReadFloat("Vida") == 0) return 0x1;
        INI_Open(arquivo);
        SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
        SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
        SetTimer("Salario", 1800000, true);//1860000
        INI_Close();
    }
    if(PlayerProf[playerid] == 1)
    {
        SetPlayerPos(playerid, 1760.7625,-1885.8522,13.5554);
        SetPlayerInterior(playerid, 0);
        return 1;
    }
    return 1;
}
__________________
Meus Projetos - contato@paulorwd.com.br
paulor is offline   Reply With Quote
Old 07/03/2012, 12:33 AM   #10
ApeloForum
Big Clucker
 
Join Date: Mar 2012
Posts: 56
Reputation: 1
Default Re: [Ajuda]Não spawnando .-.

Poste todos os seus "PrimeiroSpawn" e tente trocar o segundo "if" por "else if" E adicionar MSG's aos comandos para você ter maior noção do 'BUG'
ApeloForum is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[AJUDA] Veiculos Spawnando Sosinho CaioMors Português/Portuguese 3 01/12/2011 07:33 PM
[AJUDA]Player não spawnando... danktog Português/Portuguese 5 30/06/2011 12:58 AM
[Ajuda] Player Spawnando ViniciuS_Stronda Português/Portuguese 5 10/06/2011 08:00 PM
[AJUDA] Ajuda Alugns Comandos Aki ? Podem Ajuda eu e Alguns tbm pedro Português/Portuguese 7 06/05/2010 05:12 PM


All times are GMT. The time now is 12:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.