SA-MP Forums Archive
Little help[will be appreciated - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help[will be appreciated (/showthread.php?tid=480948)



Little help[will be appreciated - FireWarrior101 - 13.12.2013

pawn Код:
forward dialogtimer(playerid);
public dialogtimer(playerid)
{
  //Class system dialog
for(new i=0; i<MAX_PLAYERS; i++)
    {
     if(IsPlayerConnected(i))
     {
        if((gTeam[playerid] =TEAM_RANGERS))
        {
ShowPlayerDialog(playerid,CLASSELECT, DIALOG_STYLE_LIST, "{FFFFFF}Choose A Class", "Ranger Company{6EF83C}(0 score)\nSniper Company {6EF83C}(1000 score)\nAnti Tank Company{6EF83C}(2500 score)\nPilot Company{6EF83C}(5000 score)","okay","");
        }
        else if((gTeam[playerid] =TEAM_SPETSNAZ))
        {
ShowPlayerDialog(playerid,CLASSELECTSPET, DIALOG_STYLE_LIST, "{FFFFFF}Choose A Class", "Conscript{6EF83C}(0 score)\nScout Sniper{6EF83C}(1000 score)\nMaxim Anti Tank Company{6EF83C}(2500 score)\nRed Pilot Company{6EF83C}(5000 score)","okay","");
        }
      }
    }
    return 1;
}
I added this Timer so if player changes team the other team class dialog shows for him.but the dialog keep on spamming when u connect and before you spawn.

I want it to come after player has spawned and if he selects a class.The dialog should not come again


Re: Little help[will be appreciated - FireWarrior101 - 13.12.2013

anyone knows how my dialogs or players team can be updated so every time player changes team the other team class dialog shows instead of his previous team Class dialog


Re: Little help[will be appreciated - FireWarrior101 - 13.12.2013

how can i make dialog appear after we select team
I want somethin like that it should check before if player is spawned then show dialog
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,268.8589,1882.7103,-30.0938);//The Place postion
SetPlayerFacingAngle(playerid,1.3648);
SetPlayerCameraPos(playerid,268.6997,1888.3927,-29.5313);//Camera Postiion
SetPlayerCameraLookAt(playerid,268.8589,1882.7103,-30.0938);
switch(classid)
       
        {
         case 0:
           {
           gTeam[playerid] = TEAM_RANGERS;
           GameTextForPlayer(playerid, "~h~~h~~b~RANGERS", 2500, 5); // Game text
           SetPlayerColor(playerid,COLOR_LIGHTBLUE);
           SetPlayerSkin(playerid,287);//army skin
           if((gTeam[playerid] =TEAM_RANGERS))
           {
           ShowPlayerDialog(playerid,CLASSELECT, DIALOG_STYLE_LIST, "{FFFFFF}Choose A Class", "Ranger Company{6EF83C}(0 score)\nSniper Company {6EF83C}(1000 score)\nAnti Tank Company{6EF83C}(2500 score)\nPilot Company{6EF83C}(5000 score)","okay","");
           }
           }
        case 1:
          {
          gTeam[playerid] = TEAM_SPETSNAZ;
          GameTextForPlayer(playerid, "~r~SPETSNAZ", 2500, 5); // Game text
          SetPlayerColor(playerid,COLOR_RED);
          SetPlayerSkin(playerid,285);//swat skin
          if((gTeam[playerid] =TEAM_SPETSNAZ))
          {
          ShowPlayerDialog(playerid,CLASSELECTSPET, DIALOG_STYLE_LIST, "{FFFFFF}Choose A Class", "Conscript{6EF83C}(0 score)\nScout Sniper{6EF83C}(1000 score)\nMaxim Anti Tank Company{6EF83C}(2500 score)\nRed Pilot Company{6EF83C}(5000 score)","okay","");
          }
          }
        }
return 1;
}