SA-MP Forums Archive
[ajuda]Comando - 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: [ajuda]Comando (/showthread.php?tid=290767)



[ajuda]Comando - lincon c - 16.10.2011

Alguйm sabe como posso colocar o resultado /versaldo dentro de um textdraw
Tipo to querendo fazer um extrato quando o jogador digitar /versaldo abrir um textdraw com o resultado do saldo dele.

TextDrawCreate(626.000000, 254.000000, " ");

Comando.

Код:
if(strcmp(cmd, "/versaldo", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
new check;
check = CPS_GetPlayerCheckpoint(playerid);
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Contanobanco") == 1){
format(string, sizeof(string), "| BANCO | O seu saldo atual й %d", dini_Int(file, "SaldoBancario"));
SendClientMessage(playerid, amarelo, string);
} else {
SendClientMessage(playerid, Vermelho,"| ERRO | Vocк nгo tem uma conta bancбria.");
}
return 1;
}



Re: [Duvida]Comando - [O.z]Caroline - 16.10.2011

pawn Код:
if(strcmp(cmd, "/versaldo", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
new check;
check = CPS_GetPlayerCheckpoint(playerid);
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Contanobanco") == 1){
format(string, sizeof(string), "| BANCO | O seu saldo atual й %d", dini_Int(file, "SaldoBancario"));
//SendClientMessage(playerid, amarelo, string);
GameTextForPlayer(playerid, string, 5000, 3);
} else {
SendClientMessage(playerid, Vermelho,"| ERRO | Vocк nгo tem uma conta bancбria.");
}
return 1;
}



Re: [Duvida]Comando - lincon c - 16.10.2011

[O.z]Caroline Obrigado pela ajuda mais nгo й bem isto que quero fazer.
Gostaria que ele abra dentro do textdraw TextDrawCreate(626.000000, 254.000000, " ");