21.12.2012, 20:34
Umm, well i made an special command for choosing weapons and its supposed to be a list for example
Option 1
Option 2
but it shows together Option 1/nOption2
Here the code.
The same problem but now its switching teams.
Whole code gives me this warning
Thanks for helping me in advanced.
Option 1
Option 2
but it shows together Option 1/nOption2
Here the code.
Код:
if (strcmp("/Ws", cmdtext, true, 10) == 0) { #define DIALOG_SLOTWEAPONS 1 ShowPlayerDialog(playerid, DIALOG_SLOTWEAPONS, DIALOG_STYLE_LIST, "Slot Weapons", "Running weapons: /n WalkingWeapons:", "Select", "Close"); return 1; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { { if(dialogid == DIALOG_SLOTWEAPONS) { if(response) { if(listitem == 0) { GivePlayerWeapon (playerid, 22, 9999); GivePlayerWeapon (playerid, 26, 9999); GivePlayerWeapon (playerid, 32, 9999); } if(listitem == 1) { GivePlayerWeapon (playerid, 24, 9999); GivePlayerWeapon (playerid, 27, 9999); GivePlayerWeapon (playerid, 31, 9999); } } }
Код:
if (strcmp("/St", cmdtext, true, 10) == 0) #define DIALOG_TEAM 0 ShowPlayerDialog(playerid, DIALOG_TEAM, DIALOG_STYLE_LIST,"Team Selection", "Team Hobo/nTeam Grandma", "Select", "Close"); return 1; } return 0; // Line 287 }
Код:
if(dialogid == DIALOG_TEAM) { if(response) { if(listitem == 0) { SendClientMessage(playerid, 0x3A47DEFF, "You're now on the team Hobo"); gTeam[playerid] = TEAM_HOBO; SetPlayerSkin(playerid, 231); GivePlayerWeapon (playerid, 24, 500); GivePlayerWeapon (playerid, 27, 500); GivePlayerWeapon (playerid, 31, 500); SetPlayerPos(playerid, -408.1354, 1014.3384, 11.0209); } if(listitem == 1) { SendClientMessage(playerid, 0x3A47DEFF, "You're now on the team Grandma"); gTeam[playerid] = TEAM_GRANDMA; SetPlayerSkin(playerid, 53); GivePlayerWeapon (playerid, 24, 500); GivePlayerWeapon (playerid, 27, 500); GivePlayerWeapon (playerid, 31, 500); SetPlayerPos(playerid,-547.8126, 1094.2133, 11.0250 ); } } }
Код:
C:\Users\Guille\Desktop\Server\gamemodes\ASD.pwn(287) : warning 225: unreachable code