Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 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. if(dialogid == Celulares)
  22. {
  23. if(listitem == 0)
  24. {
  25. new stringCompra[250];
  26. format(stringCompra, sizeof(stringCompra), "(INFO) Você comprou um iPhone X por $100000. Para ver sua funcionalidade, use /comandosiphone");
  27. SendClientMessage(playerid, -1, stringCompra);
  28.  
  29. new Name[24];
  30. GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
  31. new stringMensagem[250];
  32. format(stringMensagem, sizeof(stringMensagem), "O(A) jogador(a) %s comprou um iPhone X na Loja da Apple! Compre o seu também!", Name);
  33. SendClientMessageToAll(-1, stringMensagem);
  34. }
  35. }
  36. return 1;
  37. }
  38. return 0;
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement