Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - #include <a_samp>
 - #include <mxINI>
 - enum pInfo {
 - pStyle};
 - public OnPlayerConnect(playerid){
 - PlayerInfo[playerid][pStyle] = 4;
 - return (true);}
 - OnPlayerSave(playerid){
 - ini_setInteger(iniFile,"Style",PlayerInfo[playerid][pStyle]);
 - return (true);}
 - public OnPlayerLogin(playerid,password[]){
 - ini_getInteger(iniFile,"Style",PlayerInfo[playerid][pStyle]);
 - return (true);}
 - public OnPlayerCommandText(playerid, cmdtext[]){
 - if(!strcmp(cmd, "/style", true)) return ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Buy combat style", "ELBOW [500$] \nGRABKICK [1000$] \nKNEEHEAD [1500$] \nKUNGFU [5000$] \nBOXING [1000$] \nRemove the fighting style [FREE]", "buy", "closed");
 - return (false);}
 - /*CMD:style(playerid, params[]) return ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "Buy combat style", "ELBOW [500$] \nGRABKICK [1000$] \nKNEEHEAD [1500$] \nKUNGFU [5000$] \nBOXING [1000$] \nRemove the fighting style [FREE]", "buy", "closed");*/
 - public OnPlayerSpawn(playerid){
 - SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pStyle]);
 - return (true);}
 - public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
 - switch(dialogid)
 - {
 - case 777:
 - {
 - switch(listitem)
 - {
 - case 0: PlayerInfo[playerid][pStyle] = 26,GivePlayerMoney(playerid,-500),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'ELBOW'");
 - case 1: PlayerInfo[playerid][pStyle] = 15,GivePlayerMoney(playerid,-1000),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'GRABKICK'");
 - case 2: PlayerInfo[playerid][pStyle] = 7,GivePlayerMoney(playerid,-1500),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'KNEEHEAD'");
 - case 3: PlayerInfo[playerid][pStyle] = 6,GivePlayerMoney(playerid,-5000),SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'KUNGFU'");
 - case 4: PlayerInfo[playerid][pStyle] = 5,GivePlayerMoney(playerid,-100), SendClientMessage(playerid,-1,"{FFFFFF}You have successfully changed the style of fighting 'BOXING'");
 - case 5: PlayerInfo[playerid][pStyle] = 4,SendClientMessage(playerid, -1, "{FFFFFF}You have successfully removed the combat style");
 - }
 - return (true);}
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment