Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/lojaapple", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, LojaApple, DIALOG_STYLE_TABLIST_HEADERS, "Apple - Produtos", "Produtos\tFunção\nCelulares\tComandos", "Selecionar", "Cancelar");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == LojaApple)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, Celulares, DIALOG_STYLE_TABLIST_HEADERS, "Apple - Celulares", "Produtos\tPreços\niPhone X\t$100000", "Comprar", "Cancelar");
- if(dialogid == Celulares)
- {
- if(listitem == 0)
- {
- new stringCompra[250];
- format(stringCompra, sizeof(stringCompra), "(INFO) Você comprou um iPhone X por $100000. Para ver sua funcionalidade, use /comandosiphone");
- SendClientMessage(playerid, -1, stringCompra);
- new Name[24];
- GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
- new stringMensagem[250];
- format(stringMensagem, sizeof(stringMensagem), "O(A) jogador(a) %s comprou um iPhone X na Loja da Apple! Compre o seu também!", Name);
- SendClientMessageToAll(-1, stringMensagem);
- }
- }
- return 1;
- }
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement