SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/09/2019, 01:08 PM   #1
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Mudar cash de lugar e a letra

TEXT ATUAL
Quote:
MASTER:: AtualizarTextDraws(playerid)
{
new String[64];
if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
TextDrawHideForPlayer(playerid, TextCash[playerid]);
format(String, sizeof(String), "Cash: ~w~~h~%s", ConvertCash(PlayerInfo[playerid][pCasher]));//nunca vi string q n pega cor kkkk
TextDrawSetString(TextCash[playerid], String);
TextDrawShowForPlayer(playerid, TextCash[playerid]);
}
}


ONDE EU QUERIA QUE TIVESSE


Quote:
new cashstr[128];
format(cashstr,sizeof(cashstr),"Coins ~b~~h~%d",PlayerInfo[playerid][pCoins]);
PlayerTextDrawSetString(playerid, TDCoins[playerid], cashstr);
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 01:09 PM   #2
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 490
Reputation: 15
Default Re: Mudar cash de lugar e a letra

Não entendi

Você quer esconder o dinheiro do jogador e criar outro em um lugar diferente?
NWDMadara is online now   Reply With Quote
Old 22/09/2019, 01:10 PM   #3
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

O DE CIMA E O ONDEE FICA O CASH ATTUALMEENTE E O DEBAIXO E ONDE EU GOSTARIA QUE TIVEESSE MAS NAO TTO CONSEGGUINDO
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 01:12 PM   #4
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 490
Reputation: 15
Default Re: Mudar cash de lugar e a letra

Ta, mas o que tu quer fazer? Não to entendendo nada.

Nos explique, é fácil.
NWDMadara is online now   Reply With Quote
Old 22/09/2019, 01:14 PM   #5
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

EU COLOQUEI A TEXT DEBAIXO MAS NAO APARECE OS CASH MESMO SETANDO APENAS FICA ZERO
Quote:
new cashstr[128];
format(cashstr,sizeof(cashstr),"Coins ~b~~h~%d",PlayerInfo[playerid][pCoins]);
PlayerTextDrawSetString(playerid, TDCoins[playerid], cashstr);
ESTE APARECE OS CASH QUANDO EU SETO MUDA PRA 1 2 3

Quote:
MASTER:: AtualizarTextDraws(playerid)
{
new String[64];
if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
TextDrawHideForPlayer(playerid, TextCash[playerid]);
format(String, sizeof(String), "Cash: ~w~~h~%s", ConvertCash(PlayerInfo[playerid][pCasher]));//nunca vi string q n pega cor kkkk
TextDrawSetString(TextCash[playerid], String);
TextDrawShowForPlayer(playerid, TextCash[playerid]);
}
}
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 01:21 PM   #6
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 490
Reputation: 15
Default Re: Mudar cash de lugar e a letra

PHP Code:
new cashstr[128];
format(cashstr,sizeof(cashstr),"Coins ~b~~h~%d",PlayerInfo[playerid][pCoins]);
PlayerTextDrawSetString(playeridTDCoins[playerid], cashstr); 
Essa parte está funcionando? Se não, o problema está na pCoins.


PHP Code:
MASTER:: AtualizarTextDraws(playerid)
{
new 
String[64];
if(
IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
TextDrawHideForPlayer(playeridTextCash[playerid]);
format(Stringsizeof(String), "Cash: ~w~~h~%s"ConvertCash(PlayerInfo[playerid][pCasher]));//nunca vi string q n pega cor kkkk
TextDrawSetString(TextCash[playerid], String);
TextDrawShowForPlayer(playeridTextCash[playerid]);


Mande a função "ConvertCash"
NWDMadara is online now   Reply With Quote
Old 22/09/2019, 01:31 PM   #7
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

VC NAO ENTENDDEU AINDA O SISTEMA DE CASH N TEM PROBLEMA NENNHUM ESTTA FUNCIONANDO NORMALMENTE APENAAS EU QQUERIA MUDAAR E DEIXAAR ASSIM


Quote:
new cashstr[128];
format(cashstr,sizeof(cashstr),"Coins ~b~~h~%d",PlayerInfo[playerid][pCoins]);
PlayerTextDrawSetString(playerid, TDCoins[playerid], cashstr);

SO ISSO PEGAR AS FUNCOES DO
Quote:
MASTER:: AtualizarTextDraws(playerid)
{
new String[64];
if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
{
TextDrawHideForPlayer(playerid, TextCash[playerid]);
format(String, sizeof(String), "Cash: ~w~~h~%s", ConvertCash(PlayerInfo[playerid][pCasher]));//nunca vi string q n pega cor kkkk
TextDrawSetString(TextCash[playerid], String);
TextDrawShowForPlayer(playerid, TextCash[playerid]);
}
E COLOCAR NESSA
new cashstr[128];
format(cashstr,sizeof(cashstr),"Coins ~b~~h~%d",PlayerInfo[playerid][pCoins]);
PlayerTextDrawSetString(playerid, TDCoins[playerid], cashstr);
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 01:47 PM   #8
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 490
Reputation: 15
Default Re: Mudar cash de lugar e a letra

Ué kkkkkkkk

É isso?

PHP Code:
public OnPlayerSpawn(playerid)
{
    
PlayerTextDrawShow(playeridTDCoins[playerid])
    return 
true;
}

forward AtualizarCash(playerid);
public 
AtualizarCash(playerid)
{
    new 
cashstr[54];

    
format(cashstrsizeof(cashstr), "Coins ~b~~h~%d"ConvertCash(PlayerInfo[playerid][pCoins]));
    
PlayerTextDrawSetString(playeridTDCoins[playerid], cashstr);


* O IsPlayerConnect é inútil na função "AtualizarTextDraws", você não precisa dela.
* Você não precisa esconder a textdraw e exibi-lá novamente a cada vez que for atualizar o dinheiro.
NWDMadara is online now   Reply With Quote
Old 22/09/2019, 03:06 PM   #9
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

mudou o cash somente no de cima o debbaixo conntinuou a mesma coisa

https://imgur.com/a/fLiCZcG
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 03:24 PM   #10
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 490
Reputation: 15
Default Re: Mudar cash de lugar e a letra

Você precisa chamar a callback "AtualizarCash" quando for setar o cash '-'
NWDMadara is online now   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] mudar o tamanho da letra Extra_Tuga Português/Portuguese 4 25/07/2016 07:51 PM
[Ajuda] Mudar casa de lugar Andelux Português/Portuguese 2 09/08/2015 12:46 AM
[Ajuda] Quero mudar a favela do meu GM de lugar. HumildadeForevis Português/Portuguese 6 06/06/2013 12:12 AM
[Ajuda] Como mudar empresa de lugar? Dick_Vigarista Português/Portuguese 4 07/04/2013 11:08 PM
Mudar velocimetro de lugar Petrick™ Português/Portuguese 2 30/08/2012 10:22 PM


All times are GMT. The time now is 03:13 PM.


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