SA-MP Forums Archive
[Pedido] Funзгo - 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: [Pedido] Funзгo (/showthread.php?tid=466365)



Funзгo - Leopawno - 27.09.2013

Olб vim pedir a funзгo que o player nao fique com dinheiro negativo quando compra algo !


Grato desde ja


Re: Funзгo - HatedS - 27.09.2013

Tenta :
pawn Код:
if(GivePlayerMoney(playerid) != quantia) return SendClientMessage(playerid,COR,"Vocк nгo tem esse dinheiro!");
{
      //funзгo
      return 1;
}
ou ...
pawn Код:
if(GivePlayerMoney >= QUANTIA)
{
 // FUnзгo
}
else
{
    SendClientMessage(playerid, -1, "Vocк nгo tem dinheiro suficiente");
}



Re: Funзгo - Leopawno - 27.09.2013

Valeu HatedS como sempre me ajudando irmao !!! +rep


Re: Funзгo - Wellington1999 - 27.09.2013

if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid,COR,"Vocк nгo tem 150 Reais !");
{
return 1;
}


Re: Funзгo - HatedS - 27.09.2013

Quote:
Originally Posted by Wellington1999
Посмотреть сообщение
if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid,COR,"Vocк nгo tem 150 Reais !");
{
return 1;
}
Fala serio, й praticamente o que eu postei ...

Quote:
Originally Posted by HatedS
Посмотреть сообщение
Tenta :
pawn Код:
if(GivePlayerMoney(playerid) != quantia) return SendClientMessage(playerid,COR,"Vocк nгo tem esse dinheiro!");
{
      //funзгo
      return 1;
}
ou ...
pawn Код:
if(GivePlayerMoney >= QUANTIA)
{
 // FUnзгo
}
else
{
    SendClientMessage(playerid, -1, "Vocк nгo tem dinheiro suficiente");
}
e na prуxima usa [PAWN*][/PAWN*] #Sem asterisco '-'