[Ajuda] Bug skin - 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] Bug skin (
/showthread.php?tid=400485)
Bug skin -
MatheusNunes - 18.12.2012
Queria que alguйm me ajudasse a nгo comprar skin maior que 299 e nem menor do que 0 porque se nгo buga a conta do player e ele perde a conta...
pawn Код:
if(dialogid == skins)
{
if(response == 1)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
new grana;
grana = GetPlayerGrana(playerid);
if(grana > 49){
dini_Set(file, "Skin", inputtext);
SetPlayerSkin(playerid, dini_Int(file, "Skin"));
GivePlayerGrana(playerid, -50);
SendClientMessage(playerid, Verde, "(INFO) Vocк comprou uma nova roupa com sucesso !");
} else {
SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem dinheiro para comprar uma roupa");
}
}
}
Re: Bug skin -
tonisantolia - 18.12.2012
Qual variavel seta o valor da skin?
Re: Bug skin -
Ouro - 18.12.2012
pawn Код:
if(strval(inputtext) < 0 || strval(inputtext) > 299) return SendClientMessage(playerid, -1, "...");
Re: Bug skin -
JonathanFeitosa - 18.12.2012
pawn Код:
static JFSExemplo = strval( inputtext );
if( JFSExemplo < 0 || JFSExemplo > 299 )
return SendClientMessage(playerid, -1, "Apenas de 0 a 299 !");
Re: Bug skin -
MatheusNunes - 18.12.2012
Obrigado a todos, Ouro deu certo.