Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //add tren dau gm
- #define BENHVIENMAU (5090)
- //tim public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- //add duoi new string[128];
- if(dialogid == BENHVIENMAU)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if((PlayerInfo[playerid][pCash] <10000))
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
- }
- else
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 1000 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
- return 1;
- }
- else
- {
- if (health < 20.0)
- {
- SetPlayerHealth(playerid, 35.0);
- GivePlayerCash(playerid, -20000);
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
- }
- return 1;
- }
- }
- }
- if(listitem == 1) //
- {
- if((PlayerInfo[playerid][pCash] <30000))
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
- return 1;
- }
- else
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 50 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
- return 1;
- }
- else
- {
- if (health < 45.0)
- {
- SetPlayerHealth(playerid, 50.0);
- GivePlayerCash(playerid, -30000);
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
- }
- return 1;
- }
- }
- }
- if(listitem ==2) //
- {
- if((PlayerInfo[playerid][pCash] <45000))
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
- return 1;
- }
- else
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 95 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
- return 1;
- }
- else
- {
- if (health < 95.0)
- {
- SetPlayerHealth(playerid, 100.0);
- GivePlayerCash(playerid, -45000);
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
- }
- return 1;
- }
- }
- }
- if(listitem ==3) //
- {
- if((PlayerInfo[playerid][pCash] <85000))
- {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Ban không du tiên dê su dung dich vu nay.");
- return 1;
- }
- else
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 95 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Súc khoe cua ban rât tôt không nên dung dich vu này nua!.");
- return 1;
- }
- else
- {
- if (health < 95.0)
- {
- SetPlayerHealth(playerid, 100.0);
- SetPlayerArmour(playerid, 50.0);
- GivePlayerCash(playerid, -85000);
- SendClientMessageEx(playerid, COLOR_GREY, "Ban dã duoc hôi phuc.!");
- }
- return 1;
- }
- }
- }
- }
- }
- ///////////////////////////////add duoi cmd makeadmin hay cmd bat ki
- CMD:benhvien(playerid, params[])
- {
- if(!IsOBenhvien(playerid))
- {
- SendClientMessageEx(playerid, COLOR_GRAD4, "Ban Không O Bênh Viên!");
- return 1;
- }
- else {
- ShowPlayerDialog(playerid, BENHVIENMAU, DIALOG_STYLE_TABLIST_HEADERS, "Benh Vien!",
- "Tên Dich Vu\tPrice\tMáu\n\
- Chê Dô Nghèo\t20.000$\t35HP\n\
- Chê Dô Thuong`\t30.000$\t50HP\n\
- Chê Dô Dai Gia\t45.000$\t100HP\n\
- Chê Dô Vip\t85.000$\t100HP + 50 Giáp",
- "Chon", "Huy");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement