SA-MP Forums

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

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

como ffaço issso
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 03:32 PM   #12
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 486
Reputation: 13
Default Re: Mudar cash de lugar e a letra

Isso que da editar gamemode kkkk.

Mande o comando de setar ou dar cash
NWDMadara is offline   Reply With Quote
Old 22/09/2019, 04:01 PM   #13
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

CMD:darcash(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, " Você não pode usar este comando!");
return 1;
}


new para1;
new level;
if(sscanf(params, "ud", para1, level))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darcash [ID do Player] [quantia]");
return 1;
}
if(level < 1 || level > 25000)return SendClientMessage(playerid, COLOR_GRAD2, "Cash de 1 a 25000");
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
new string[128];
format(string, sizeof string, "Você deu %d de Cash para %s", level, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
format(string, sizeof string, "O admin %s te deu %d de Cash.", sendername, level);
SendClientMessage(para1, COLOR_LIGHTGREEN, string);
GiveCash(para1,level);
format(string, 128, "INFO: %s deu Cash (%d) para %s",sendername, level, giveplayer);
ABroadCast(COLOR_LIGHTGREEN,string,1);
BNSLogs("Cash", string);
}
}
return 1;
}
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 04:17 PM   #14
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 486
Reputation: 13
Default Re: Mudar cash de lugar e a letra

Função GiveCash

Mande-me
NWDMadara is offline   Reply With Quote
Old 22/09/2019, 04:23 PM   #15
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

static stock GiveCash(playerid,valor)
{
new antes = PlayerInfo[playerid][pCasher];
PlayerInfo[playerid][pCasher] = antes+valor;
return true;
}
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 04:28 PM   #16
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 486
Reputation: 13
Default Re: Mudar cash de lugar e a letra

Essa é a função original da gamemode que atualiza o cash?

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]);
}


Se for, você deve alterá-lá para essa:



PHP Code:
MASTER:: AtualizarTextDraws(playerid);
{
    new 
cashstr[54];

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

E colocar na OnPlayerSpawn:

PHP Code:
PlayerTextDrawShow(playeridTDCoins[playerid]); 
NWDMadara is offline   Reply With Quote
Old 22/09/2019, 04:33 PM   #17
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

TOPICO CLOSED
CharadaFox is offline   Reply With Quote
Old 22/09/2019, 09:26 PM   #18
NWDMadara
Huge Clucker
 
NWDMadara's Avatar
 
Join Date: Mar 2018
Posts: 486
Reputation: 13
Default Re: Mudar cash de lugar e a letra

Quote:
Originally Posted by CharadaFox View Post
TOPICO CLOSED
Conseguiu querido?
NWDMadara is offline   Reply With Quote
Old 23/09/2019, 03:40 PM   #19
CharadaFox
Big Clucker
 
Join Date: May 2019
Posts: 66
Reputation: 0
Default Re: Mudar cash de lugar e a letra

sim era mais simples que imagiinava eu qque coloquei complicaçao em coisa facil
CharadaFox 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] 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 05:38 PM.


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