Minigames Help
#1

Код:
#define TEAM_ROBBERS 1
#define TEAM_COPS 2

new CnR[MAX_PLAYERS];

CMD:cnr(playerid, params[])
{
   ShowPlayerDialog(playerid, DIALOG_CNR, DIALOG_STYLE_LIST, "Minigames", "{CC6600}Team Robbers\n{0000FF}Team Police", "Choose", "Exit");
   return 1;
}
public OnDialogResponse(dialogid)
{
   if(dialogid == DIALOG_CNR)
   {
       if(response)
       {
         switch(listitem)
         {
             case 0:
             {
               SetPlayerTeam(playerid, TEAM_ROBBERS);
                ResetPlayerWeapons(playerid);
                   GameTextForPlayer(playerid, "You have joined ~r~~h~Robbers Team", 5000, 2 );
                    SetPlayerPos( playerid , 1459.7563, 2773.3923, 10.7790 );
                GivePlayerWeapon(playerid, 5, 1);
                GivePlayerWeapon(playerid, 24, 999);
                GivePlayerWeapon(playerid, 27, 999);
                GivePlayerWeapon(playerid, 32, 999);
                GivePlayerWeapon(playerid, 31, 999);
                 SetPlayerSkin( playerid , 293 );
                 SetPlayerColor( playerid , 0xFF0000FF );
            }
            case 1:
            {
                SetPlayerTeam(playerid, TEAM_COPS);
                ResetPlayerWeapons(playerid);
                GameTextForPlayer(playerid, "You have joined ~b~~h~Cops Team", 5000, 2 );
                 SetPlayerPos( playerid , 2290.1704, 2428.5388, 10.8666 );
                 SetPlayerSkin( playerid , 280 );
                   SetPlayerColor( playerid , 0x33CCFFAA ); // light_blue
                GivePlayerWeapon(playerid, 5, 1);
                GivePlayerWeapon(playerid, 24, 999);
                GivePlayerWeapon(playerid, 27, 999);
                GivePlayerWeapon(playerid, 32, 999);
                GivePlayerWeapon(playerid, 31, 999);
                 ResetPlayerWeapons( playerid );
               CnR[playerid] = 1;
            }
         }
      }
   }
whats wrong? i get the pawno is not responding after compile
Reply
#2

Because OnDialogResponse parameters are:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Not.
pawn Код:
public OnDialogResponse(dialogid)
Reply
#3

Sory, I mind
Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

this
Reply
#4

What?

What?

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == DIALOG_CNR)
   {
       if(response)
       {
         switch(listitem)
         {
             case 0:
             {
               SetPlayerTeam(playerid, TEAM_ROBBERS);
                ResetPlayerWeapons(playerid);
                   GameTextForPlayer(playerid, "You have joined ~r~~h~Robbers Team", 5000, 2 );
                    SetPlayerPos( playerid , 1459.7563, 2773.3923, 10.7790 );
                GivePlayerWeapon(playerid, 5, 1);
                GivePlayerWeapon(playerid, 24, 999);
                GivePlayerWeapon(playerid, 27, 999);
                GivePlayerWeapon(playerid, 32, 999);
                GivePlayerWeapon(playerid, 31, 999);
                 SetPlayerSkin( playerid , 293 );
                 SetPlayerColor( playerid , 0xFF0000FF );
            }
            case 1:
            {
                SetPlayerTeam(playerid, TEAM_COPS);
                ResetPlayerWeapons(playerid);
                GameTextForPlayer(playerid, "You have joined ~b~~h~Cops Team", 5000, 2 );
                 SetPlayerPos( playerid , 2290.1704, 2428.5388, 10.8666 );
                 SetPlayerSkin( playerid , 280 );
                   SetPlayerColor( playerid , 0x33CCFFAA ); // light_blue
                GivePlayerWeapon(playerid, 5, 1);
                GivePlayerWeapon(playerid, 24, 999);
                GivePlayerWeapon(playerid, 27, 999);
                GivePlayerWeapon(playerid, 32, 999);
                GivePlayerWeapon(playerid, 31, 999);
                 ResetPlayerWeapons( playerid );
               CnR[playerid] = 1;
            }
         }
      }
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)