SA-MP Forums Archive
[Ajuda] CMD Dinheiro - 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] CMD Dinheiro (/showthread.php?tid=334462)



[Ajuda] CMD Dinheiro - Caio_Freeze - 14.04.2012

Queria saber como faзo pra dar dinheiro para todos os players online

so me de um exemplo e nao o codigo inteiro.

Ex: /dargrana [quantidade]

ai aparece assim: O Administrador %s Deu %d Para Todos os Players Online!

Obrigado


Re: [Ajuda CMD Dinheiro - ViniBorn - 14.04.2012

loop + GetPlayerName + format + SendClientMessageToAll


Re: [Ajuda CMD Dinheiro - Aninhaah - 14.04.2012

Quote:
Originally Posted by Viniborn
View Post
loop + GetPlayerName + format + SendClientMessageToAll
+ GivePlayerMoney, rs.

pawn Code:
CMD:granapratodos(playerid, params[])
{
  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"Vocк nгo й admin");
  new grana;
  if(sscanf(params, "d", grana)) return SendClientMessage(playerid,-1,"Use: /granapratodos [quantidade]");
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
     GivePlayerMoney(i, grana);
  }
  SendClientMessageToAll(-1,"eee, todo mundo ganhou grana ! eeee");
  return 1;
}
Agora estude o cуdigo e arrume como quiser.


Re: [Ajuda CMD Dinheiro - Caio_Freeze - 14.04.2012

Vou Testar aqui


Re: [Ajuda CMD Dinheiro - Lucas_HenryK - 14.04.2012

Claro e.e!


Re: [Ajuda CMD Dinheiro - Hardware - 14.04.2012

Em vez de usar sscanf, poderia usar dessa forma:

pawn Code:
if(isnull(params)) return SendClientMessage(playerid,-1,"Use: /granapratodos [quantidade]");



Re: [Ajuda CMD Dinheiro - Caio_Freeze - 14.04.2012

Pronto Deu Certo Obrigado Quem Me ajudo