SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 02/04/2012, 03:25 AM   #1
.ThePro
Huge Clucker
 
.ThePro's Avatar
 
Join Date: Mar 2012
Location: Rio de Janeiro
Posts: 422
Reputation: 11
Default [PEDIDO] Pedido e Ajuda

Alguém me ajuda, como faço pra não presicar esolher a org de novo quando o player relogar?? http://forum.sa-mp.com/showthread.php?t=276622
.ThePro is offline   Reply With Quote
Old 02/04/2012, 03:39 AM   #2
jefe10
Big Clucker
 
jefe10's Avatar
 
Join Date: Oct 2011
Location: Lages SC
Posts: 89
Reputation: 5
Default Re: [PEDIDO] Pedido e Ajuda

Para salvar use isso:
pawn Code:
public OnPlayerDisconnect(playerid,reason)
{
dini_IntSet(file,"gTeam",gTeam[playerid]);
return 1;
}
public OnPlayerConnect(playerid)
{
gTeam[playerid] = dini_Int(file,"gTeam");
return 1;
}
__________________
Nick: JeFeRodrigues

Te ajudei então me da Reputation !

Acesse: SampKnD
jefe10 is offline   Reply With Quote
Old 02/04/2012, 04:08 AM   #3
.ThePro
Huge Clucker
 
.ThePro's Avatar
 
Join Date: Mar 2012
Location: Rio de Janeiro
Posts: 422
Reputation: 11
Default Respuesta: Re: [PEDIDO] Pedido e Ajuda

Quote:
Originally Posted by jefe10 View Post
Para salvar use isso:
pawn Code:
public OnPlayerDisconnect(playerid,reason)
{
dini_IntSet(file,"gTeam",gTeam[playerid]);
return 1;
}
public OnPlayerConnect(playerid)
{
gTeam[playerid] = dini_Int(file,"gTeam");
return 1;
}
SALVO LEGAL AQUI, VALEU! E COMO EU FAÇO PRA QUEM JÁ TEM A GANG SALVA NÃO APARECER MAIS O DIALOG?
.ThePro is offline   Reply With Quote
Old 08/04/2012, 09:53 PM   #4
Mr.Hardy
Huge Clucker
 
Mr.Hardy's Avatar
 
Join Date: Dec 2011
Location: Brazil (SC)
Posts: 442
Reputation: 61
Default Re: [PEDIDO] Pedido e Ajuda

- Tente isso !

No topo do GM troque
pawn Code:
new gTeam[MAX_PLAYERS];
por
pawn Code:
new gTeam[MAX_PLAYERS] = 0;

Troque:

pawn Code:
OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, 2159.8921,-1055.2019,80.4219); // Setará Câmera ( Posição )
SetPlayerCameraLookAt(playerid, 2159.6272,-1061.3921,80.4219); // Setará Para Onde Irá Olhar.
ShowPlayerDialog(playerid, 4322, DIALOG_STYLE_LIST, "Escolha o Seu Time","Aztecas\nGrove\nBallas","Jogar","Cancelar");
return true;
}

Por:

pawn Code:
OnPlayerRequestClass(playerid, classid)
{
SetPlayerCameraPos(playerid, 2159.8921,-1055.2019,80.4219); // Setará Câmera ( Posição )
SetPlayerCameraLookAt(playerid, 2159.6272,-1061.3921,80.4219); // Setará Para Onde Irá Olhar.
if(gTeam[playerid] != 0) //Verifica se o jogador não tem gang setada !
{
ShowPlayerDialog(playerid, 4322, DIALOG_STYLE_LIST, "Escolha o Seu Time","Aztecas\nGrove\nBallas","Jogar","Cancelar");
}
return true;
}

- Se deu certo me dá reputation !
<<<<<<----
__________________


Dispositivos:
- Nokia Lumia 825
- Gran Duos ( primeira geração )
- iPhone 5S
- iPhone 5C
- iPhone 6
- iPad 2G (wi-fi 2012)
- Sony Playstation 2
- Sony Playstation 3 (Assassin's Creed: Brotherhood | FIFA 11 | Uncharted 3)
- Xbox One (GTA V | FIFA 14 | Battlefield 4 | Titanfall | Watch Dogs | FIFA 15 | Battlefield 5 | UFC | Need For Speed: Rivals | Dragon Age: Inquisition)
Mr.Hardy is offline   Reply With Quote
Old 08/04/2012, 09:59 PM   #5
Ricop522
High-roller
 
Ricop522's Avatar
 
Join Date: Feb 2010
Location: ES
Posts: 2,640
Reputation: 159
Default Re: Respuesta: Re: [PEDIDO] Pedido e Ajuda

Quote:
Originally Posted by .ThePro View Post
SALVO LEGAL AQUI, VALEU! E COMO EU FAÇO PRA QUEM JÁ TEM A GANG SALVA NÃO APARECER MAIS O DIALOG?
pawn Code:
if(gTeam[playerid] > 0) {

            // já tem org
} else {
        // não tem org
}
__________________
"Any fool can write code that a
computer can understand. Good
programmers write code that
humans can understand."

AJUDA! Programação
Github
Ricop522 is offline   Reply With Quote
Old 08/04/2012, 10:00 PM   #6
Mr.Hardy
Huge Clucker
 
Mr.Hardy's Avatar
 
Join Date: Dec 2011
Location: Brazil (SC)
Posts: 442
Reputation: 61
Thumbs down Re: [PEDIDO] Pedido e Ajuda

Ricop pq vc não tá mais no meu GameMode ?

@EDIT:

KKKk gamemode errei no meu MSN ?
__________________


Dispositivos:
- Nokia Lumia 825
- Gran Duos ( primeira geração )
- iPhone 5S
- iPhone 5C
- iPhone 6
- iPad 2G (wi-fi 2012)
- Sony Playstation 2
- Sony Playstation 3 (Assassin's Creed: Brotherhood | FIFA 11 | Uncharted 3)
- Xbox One (GTA V | FIFA 14 | Battlefield 4 | Titanfall | Watch Dogs | FIFA 15 | Battlefield 5 | UFC | Need For Speed: Rivals | Dragon Age: Inquisition)

Last edited by Mr.Hardy; 08/04/2012 at 10:03 PM. Reason: KKKk gamemode errei no meu GM ?
Mr.Hardy 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
[PEDIDO]Pedido para /equipargang em dialog Fire_Hell Português/Portuguese 10 21/10/2011 10:21 PM
[Ajuda/Pedido]/Car Danix Português/Portuguese 14 05/09/2011 04:35 AM
[PEDIDO] Senha Mestre [PEDIDO] Diogo_braz Português/Portuguese 6 09/10/2010 03:56 PM
[PEDIDO]Quando Admin loga no server[PEDIDO] Xapita_Halls Português/Portuguese 12 02/10/2010 11:09 PM


All times are GMT. The time now is 11:06 PM.


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