Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, 0x2641FEAA, "You have choosen the Team Rangers");
SetPlayerTeam(playerid, 1);
SetPlayerSkin(playerid, 287);
SetPlayerPos(playerid, 191.82862854004,2074.44140625,22.644439697266);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 22, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 46, 9999);
GivePlayerWeapon(playerid, 43, 9999);
SetPlayerColor(playerid, 0x2641FEAA);
}
case 1:
{
SendClientMessage(playerid, 0xFF0000FF, "You have choosen the Team Spetsnaz");
SetPlayerTeam(playerid, 2);
SetPlayerSkin(playerid, 285);
SetPlayerPos(playerid, 403.69519042969,2535.6623535156,16.54570007);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 22, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 46, 9999);
GivePlayerWeapon(playerid, 43, 9999);
SetPlayerColor(playerid, 0xFF0000FF);
}
}
}
else if(!response) return SendClientMessage(playerid, -1, "You have to choose a team !") && ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Choose a Team","Rangers\nSpetsnaz","Choose","Exit");
}
return 0;
}
public OnPlayerRequestSpawn(playerid)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Choose a Team","Rangers\nSpetsnaz","Choose","Exit");
return 1;
}
(218 ) : warning 235: public function lacks forward declaration (symbol "OnDialogResponse")