Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add vào gamemode
- #define DIALOG_DONATOR
- // nay la de tranh bi anti warning
- stock SetPlayerArmourEx(playerid, Float:armour)
- {
- ValidArmor[playerid] = armour;
- SetPlayerArmour(playerid, armour);
- return 1;
- }
- CMD:buypacksung(playerid, params[])
- {
- if(PlayerInfo[playerid][pLevel] > 0)
- {
- new string[60];
- format(string, sizeof(string), "Máu\nGiáp\nPack sung");
- ShowPlayerDialogEx(playerid, DIALOG_DONATOR, DIALOG_STYLE_LIST, "LanhChua.Shane.Pack.Sung", string,"Lay", "Xóa");
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ban khong du cap de mua pack sung ");
- }
- return 1;
- }
- tìm public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- thêm:
- if(dialogid == DIALOG_DONATOR) Packsung by Shane DZ
- {
- if(response)
- {
- if(listitem == 0)
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- new hpint = floatround( health, floatround_round );
- if( hpint >= 100 )
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Ban da day binh mau.");
- return 1;
- }
- SetPlayerHealth(playerid, 100);
- SendClientMessageEx(playerid, COLOR_NEWS, "Warning: Ban da su dung Donator de su dung binh mau ( 100HP ).");
- }
- if(listitem == 1)
- {
- new Float:armour;
- GetPlayerArmour(playerid, armour);
- if( armour >= 100 )
- {
- SendClientMessage(playerid, COLOR_GREY, "Ban da day giap");
- return 1;
- }
- SetPlayerArmourEx(playerid, 100);
- SendClientMessage(playerid, COLOR_NEWS, "Warning: Ban da su dung Donator de su dung binh giap ( 100ARMOUR ).");
- }
- if(listitem == 2)
- {
- PlayerInfo[playerid][pCash] -= 2000000;
- GivePlayerValidWeapon(playerid, 30, 999999);
- GivePlayerValidWeapon(playerid, 31, 999999);
- GivePlayerValidWeapon(playerid, 27, 999999);
- GivePlayerValidWeapon(playerid, 24, 999999);
- GivePlayerValidWeapon(playerid, 29, 999999);
- SendClientMessage(playerid, COLOR_NEWS, "[Faskis] Ban da mua bo packsung tu Donator LanhChua.Shane");
- }
- }
- }
- =================================Pawn code by LanhChua.Shane=============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement