31.05.2015, 13:49
Hello again Charalambos26,
It is very simply, if you are using a command processor/plugin you can use the following (example is for ZCMD):
Place this almost anywhere, normally around your other commands.
If you are not using a command processor/plugin:
Place this code under OnPlayerCommandText.
This code will make the dialog show when the player types /academy without the player being on/near the pickup.
It is very simply, if you are using a command processor/plugin you can use the following (example is for ZCMD):
Код:
CMD:academy(playerid, params[]) { if(GetPlayerTeam(playerid) == TEAM_AMERICA) { ShowPlayerDialog(playerid,ACADEMY,DIALOG_STYLE_LIST ,"American Army Academy™","Sniper"COL_BLUE"20XP\n"COL_RWHITE"Medic-"COL_BLUE"50XP\n"COL_RWHITE"Assault"COL_BLUE"65XP\n"COL_RWHITE"Assassin-"COL_BLUE"90XP\n"COL_RWHITE"Suicider-"COL_BLUE"100XP\n"COL_RWHITE"Bomber-"COL_BLUE"300XP\n"COL_RWHITE"Engineer-"COL_BLUE"500XP\n"COL_RWHITE"Spy-"COL_BLUE"900XP\n"COL_RWHITE"Advanced Soldier-"COL_BLUE"950XP\n"COL_RWHITE"Pilot-"COL_BLUE"1000XP\n"COL_RED"Next>>","Learn","Leave"); } return 1; }
If you are not using a command processor/plugin:
Код:
if(!strcmp(cmdtext, "/academy")) { if(GetPlayerTeam(playerid) == TEAM_AMERICA) { ShowPlayerDialog(playerid,ACADEMY,DIALOG_STYLE_LIST ,"American Army Academy™","Sniper-"COL_BLUE"20XP\n"COL_RWHITE"Medic-"COL_BLUE"50XP\n"COL_RWHITE"Assault-"COL_BLUE"65XP\n"COL_RWHITE"Assassin-"COL_BLUE"90XP\n"COL_RWHITE"Suicider-"COL_BLUE"100XP\n"COL_RWHITE"Bomber-"COL_BLUE"300XP\n"COL_RWHITE"Engineer-"COL_BLUE"500XP\n"COL_RWHITE"Spy-"COL_BLUE"900XP\n"COL_RWHITE"Advanced Soldier-"COL_BLUE"950XP\n"COL_RWHITE"Pilot-"COL_BLUE"1000XP\n"COL_RED"Next>>","Learn","Leave"); } return 1; }
This code will make the dialog show when the player types /academy without the player being on/near the pickup.