Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnPlayerCommandText(playerid, cmdtext[]) {
- if(strcmp(cmdtext, "/lotto", true) == 0)return ShowPlayerDialog(playerid,10,DIALOG_STYLE_MSGBOX,"Lotto","\
- Чтобы приобрести билет нажмите - Купить.\
- ","Купить","Выход");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case 10:
- {
- if (response)
- {
- GivePlayerMoney(playerid,-1000);
- new rand = random(9999), string[225];
- format(string,sizeof(string),"Ты выииграл %d$. Поздравляем!",rand);
- SendClientMessage(playerid,0x33AA33,string);
- return GivePlayerMoney(playerid,rand);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment