02.07.2012, 09:07
hey i am back again
i have a problem how do i make a dialog response of this command
i know how to do it but i get a error that is
look
i already have a dialog response of another command which is
and the dialog response of the command /duty is
now the problem is i dont know how do i make a dialog response of the command /weapon and where to put it,i made it but i get errors can anyone make a dialog response and tell me where to put it?
i have a problem how do i make a dialog response of this command
Код:
if (strcmp("/weapon", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 7.0, 313.1375,-166.0060,999.6010)) { ShowPlayerDialog(playerid,253,DIALOG_STYLE_LIST,"Weapons","Silence $500\nAK-47 $2000\nM4 $3000\nDeagle $500\n9mm $200\nMP5 $300\nMicro SMG $200\nCombat Shotgun $500\nRegular Shotgun $400\nSniper Rifle $1500\nOthers","Select","Cancel"); } else { SendClientMessage(playerid,COLOR_PINK2,"You need to be in the Ammunation Checkpoint to buy Weapons"); } return 1; }
look
i already have a dialog response of another command which is
Код:
if (strcmp("/duty", cmdtext, true, 10) == 0) { if(IsPlayerInRangeOfPoint(playerid, 7.0, 255.2998,75.6383,1003.6406)) { ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","Cancel"); } else if(IsPlayerInRangeOfPoint(playerid, 7.0, 233.3887,125.0445,1003.2188)) { ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","Cancel"); } else if(IsPlayerInRangeOfPoint(playerid,7.0,223.5052,187.4177,1003.0313)) { ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","Cancel"); } else { SendClientMessage(playerid,COLOR_PINK2,"Not in Changing Room"); } return 1; }
Код:
switch(dialogid) { case 1: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You Canceled"); return 1; } switch(listitem) { case 0: { SetPlayerSkin(playerid,280); SendClientMessage(playerid,COLOR_SEAGREEN,"Welcome to Duty USPD Officer"); } case 1: { SetPlayerSkin(playerid,281); SendClientMessage(playerid,COLOR_SEAGREEN,"Welcome to Duty USPD Officer"); } case 2: { SetPlayerSkin(playerid,282); SendClientMessage(playerid,COLOR_SEAGREEN,"Welcome to Duty USPD Officer"); } } } } return 0; }