15.05.2014, 07:41
Ok wait
Код:
#define DIALOG_SKILL #define DIALOG_COMMANDS #define DIALOG_RAPISTINFO #define DIALOG_PICKPOCKETINFO #define DIALOG_MECHANICINFO #define DIALOG_HITMANINFO #define DIALOG_WEAPONDEALERINFO #define DIALOG_DRUGDEALERINFO
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response)// They pressed the first button. { switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs. { case DIALOG_SKILL:// Our dialog! { switch(listitem)// Checking which listitem was selected { case 0:// The first item listed { new string [128]; ResetPlayerWeapons(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"%s has chosen Rapist Skill!",name); SendClientMessageToAll( -1,string); SendClientMessage(playerid, COLOR_RED,"Please type /skillinfo for more information!"); SendClientMessage(playerid, COLOR_RED,"You have become a Rapist"); SetPlayerTeam(playerid, TEAM_RAPIST); SetPlayerColor(playerid, COLOR_GHOSTWHITE); GivePlayerWeapon(playerid,5,1,17,3,22,100,41,200); } case 1: // The second item listed { new string [128]; ResetPlayerWeapons(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"%s has chosen PickPocket Skill!",name); SendClientMessageToAll( -1,string); SendClientMessage(playerid, COLOR_RED,"Please type /skillinfo for more information!"); SendClientMessage(playerid, COLOR_RED,"You have become a PickPocket"); SetPlayerTeam(playerid, TEAM_PICKPOCKET); SetPlayerColor(playerid, COLOR_GHOSTWHITE); GivePlayerWeapon(playerid,15,1,22,200,29,200); } case 2: // The second item listed { new string [128]; ResetPlayerWeapons(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"%s has chosen Mechanic Skill!",name); SendClientMessageToAll( -1,string); SendClientMessage(playerid, COLOR_RED,"Please type /skillinfo for more information!"); SendClientMessage(playerid, COLOR_RED,"You have become a Mechanic"); SetPlayerTeam(playerid, TEAM_MECHANIC); SetPlayerColor(playerid, COLOR_GHOSTWHITE); GivePlayerWeapon(playerid,10,1,11,1,12,1,13,1); } case 3: // The second item listed { new string [128]; ResetPlayerWeapons(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"%s has chosen Hitman Skill!",name); SendClientMessageToAll( -1,string); SendClientMessage(playerid, COLOR_RED,"Please type /skillinfo for more information!"); SendClientMessage(playerid, COLOR_RED,"You have become a Hitman"); SetPlayerTeam(playerid, TEAM_HITMAN); SetPlayerColor(playerid, COLOR_GHOSTWHITE); GivePlayerWeapon(playerid,4,1,23,200,25,75,34,50); } case 4: // The second item listed { new string [128]; ResetPlayerWeapons(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"%s has chosen Weapon Dealer Skill",name); SendClientMessageToAll( -1,string); SendClientMessage(playerid, COLOR_RED,"You have become a Weapon Dealer"); SendClientMessage(playerid, COLOR_RED,"Please type /skillinfo for more information!"); SetPlayerTeam(playerid, TEAM_WEAPONDEALER); SetPlayerColor(playerid, COLOR_GHOSTWHITE); GivePlayerWeapon(playerid,24,50,26,20,32,100,30,200); } case 5: // The second item listed { new string [128]; ResetPlayerWeapons(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string,sizeof(string),"%s has chosen Drug Dealer Skill",name); SendClientMessageToAll( -1,string); SendClientMessage(playerid, COLOR_RED,"You have become a Drug Dealer"); SendClientMessage(playerid, COLOR_RED,"Please type /skillinfo for more information!"); SetPlayerTeam(playerid, TEAM_DRUGDEALER); SetPlayerColor(playerid, COLOR_GHOSTWHITE); GivePlayerWeapon(playerid,24,50,32,100,30,200); } } } case DIALOG_COMMANDS:// Our dialog! { switch(listitem) { case 0:// The first item listed { SendClientMessage(playerid, COLOR_RED,"Commands Coming Soon"); } case 1: // The second item listed { SendClientMessage(playerid, COLOR_RED,"Commands Coming Soon"); } case 2: // The second item listed { SendClientMessage(playerid, COLOR_RED,"Commands Coming Soon"); } case 3: // The second item listed { SendClientMessage(playerid, COLOR_RED,"Commands Coming Soon"); } }} case DIALOG_RAPISTINFO:// Our dialog! { SendClientMessage(playerid, COLOR_PINK,"[Skill INFO]Your commands are:- /rape"); } case DIALOG_PICKPOCKETINFO:// Our dialog! { SendClientMessage(playerid, COLOR_PINK,"[Skill INFO]Your commands are:- /rob , /robshop , /fool"); } case DIALOG_MECHANICINFO:// Our dialog! { SendClientMessage(playerid, COLOR_PINK,"[Skill INFO]Your commands are:- /mechanicmenu"); } case DIALOG_HITMANINFO:// Our dialog! { SendClientMessage(playerid, COLOR_PINK,"[Skill INFO]Your commands are:- /contracts"); } case DIALOG_WEAPONDEALERINFO:// Our dialog! { SendClientMessage(playerid, COLOR_PINK,"[Skill INFO]Your commands are:- /sellweaps"); } case DIALOG_DRUGDEALERINFO:// Our dialog! { SendClientMessage(playerid, COLOR_PINK,"[Skill INFO]Your commands are:- /selldrugs"); } }} return 0; }