15.11.2016, 11:01
When i select the class , this dialog doesn't disappear..
Код:
public OnPlayerSpawn(playerid)
{
if(IN_DM_CHAINSAW[playerid] == 1)
{
gTeam[playerid] = TEAM_NONE;
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 10);
new ran = random(sizeof(DM_CHAINSAW_SPAWNS));
SetPlayerPos(playerid, DM_CHAINSAW_SPAWNS[ran][0], DM_CHAINSAW_SPAWNS[ran][1], DM_CHAINSAW_SPAWNS[ran][2]);
SetPlayerFacingAngle(playerid, DM_CHAINSAW_SPAWNS[ran][3]);
GivePlayerWeapon(playerid, 9, 1); //This is once again, the weapon given to the player on spawn in dm
return 1;
}
else
if(IN_DM_SNIPER[playerid] == 1)
{
gTeam[playerid] = TEAM_NONE;
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 10);
new ran = random(sizeof(DM_SNIPER_SPAWNS));
SetPlayerPos(playerid, DM_SNIPER_SPAWNS[ran][0], DM_SNIPER_SPAWNS[ran][1], DM_SNIPER_SPAWNS[ran][2]);
SetPlayerFacingAngle(playerid, DM_SNIPER_SPAWNS[ran][3]);
GivePlayerWeapon(playerid, 34, 1000); //This is once again, the weapon given to the player on spawn in dm
return 1;
}
else
if(IN_DM_CBUG[playerid] == 1)
{
gTeam[playerid] = TEAM_NONE;
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 10);
new ran = random(sizeof(DM_CBUG_SPAWNS));
SetPlayerPos(playerid, DM_CBUG_SPAWNS[ran][0], DM_CBUG_SPAWNS[ran][1], DM_CBUG_SPAWNS[ran][2]);
SetPlayerFacingAngle(playerid, DM_CBUG_SPAWNS[ran][3]);
GivePlayerWeapon(playerid, 24, 1000); //This is once again, the weapon given to the player on spawn in dm
return 1;
}
else
{
ShowPlayerDialog(playerid, CLASS_DIALOG, DIALOG_STYLE_LIST,"Class Selection",""ccolor"Assault - "ccolor2"Rank 0\n"ccolor"Sniper - "ccolor2"Rank 0\n"ccolor"Pilot - "ccolor2"Rank 6\n"ccolor"Engineer - "ccolor2"Rank 5\n"ccolor"JetTrooper - "ccolor2"Rank 6\n"ccolor"Support - "ccolor2"Rank 5\n"ccolor"Scout - "ccolor2"Rank 5\n"ccolor"Spy - "ccolor2"Rank 7\n"ccolor"Donor - "ccolor2"For Donators only","Select","");
StopAudioStreamForPlayer(playerid); // Stop the audio stream
SetPlayerHealth(playerid, 99999.0);
SetTimerEx("SpawnProtection", 10000, false, "i", playerid);
SendClientMessage(playerid, C_PINK, "*Anti-Spawn kill protection for 10 seconds!");
SendClientMessage(playerid,red,"If you are confused at any time, feel free to use /helpme [your question].");
AntiSK[playerid] = 1;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
ResetPlayerWeapons(playerid);
UpdateLabelText(playerid);
Update3DTextLabelText(DM[playerid], 0xFFFFFFFF, " ");
TextDrawShowForPlayer(playerid, TeamText[playerid]);
TextDrawHideForPlayer(playerid, CountText[playerid]);
UpdateTextdraw(playerid);
}

