Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. public OnPlayerCommandText(playerid, cmdtext[])
  2. {
  3. if (strcmp("/lojaapple", cmdtext, true, 10) == 0)
  4. {
  5. ShowPlayerDialog(playerid, LojaApple, DIALOG_STYLE_TABLIST_HEADERS, "Apple - Produtos", "Produtos\tFunção\nCelulares\tComandos", "Selecionar", "Cancelar");
  6. return 1;
  7. }
  8. return 0;
  9. }
  10.  
  11. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  12. {
  13. if(dialogid == LojaApple)
  14. {
  15. if(response)
  16. {
  17. if(listitem == 0)
  18. {
  19. ShowPlayerDialog(playerid, Celulares, DIALOG_STYLE_TABLIST_HEADERS, "Apple - Celulares", "Produtos\tPreços\niPhone X\t$100000", "Comprar", "Cancelar");
  20. }
  21. }
  22. }
  23.  
  24. if(dialogid == Celulares)
  25. {
  26. if(listitem == 0)
  27. {
  28. new stringCompra[250];
  29. format(stringCompra, sizeof(stringCompra), "(INFO) Você comprou um iPhone X por $100000. Para ver sua funcionalidade, use /comandosiphone");
  30. SendClientMessage(playerid, -1, stringCompra);
  31.  
  32. new Name[24];
  33. GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
  34. new stringMensagem[250];
  35. format(stringMensagem, sizeof(stringMensagem), "O(A) jogador(a) %s comprou um iPhone X na Loja da Apple! Compre o seu também!", Name);
  36. SendClientMessageToAll(-1, stringMensagem);
  37. }
  38. return 1;
  39. }
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement