dialog help!
#1

OK i have a problam. When a person connects and chooses a dm the amount of players go by +1.. but when i disconnect it says 1 and when a select a dm it goes by 2.. just look through my code

Deathmatches dialog:

Код:
		new string[86];
		format(string,sizeof(string),"Circus Mania (People Currently on map: %i) \nRetard (People Currently on map: %i)",Circus,Retard);
		ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Deathmatches",string, "Select", "Cancel");
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 2) // Deathmatches
	{
		if(response)
		{
			if(listitem == 0)
			{
	  		new rand = random(sizeof(DeathMatchSpawn));
  			SetPlayerPos(playerid, DeathMatchSpawn[rand][0], DeathMatchSpawn[rand][1],DeathMatchSpawn[rand][2]);
				SetPlayerFacingAngle(playerid, DeathMatchSpawn[rand][3]);
		 		SendClientMessage(playerid, 0xFFFFFFFF, "You playing the map: Circus Mania, by Lorenc");
		 		Circus++;
 			}
			if(listitem == 1)
			{
        Retard++;
   		  SendClientMessage(playerid, 0xFFFFFFFF, "You playing the map: Retard, by Lorenc");
       	return 1;
  			}
	 	}
		else
		{
		  KickPlayer(playerid);
   		SendClientMessage(playerid, 0xFFFFFFFF, "You quit.");
		}
	}
	return 0;
}
Now i dont want it to say
Circus Mania (People Currently on map: 1) when i disconnect.
i want it to say
Circus Mania (People Currently on map: 0)

I tryed to put on player disconnect

Код:
	Circus--;
  Retard--;
but it just shows

Circus Mania (People Currently on map: -1) so i dont want it to deduct

sorry for my bad english just in a hurry for school!
Reply


Messages In This Thread
dialog help! - by Lorenc_ - 04.05.2010, 22:13
Re: dialog help! - by Lorenc_ - 05.05.2010, 05:48
Re: dialog help! - by Lorenc_ - 05.05.2010, 21:16
Re: dialog help! - by IamNotKoolllll - 05.05.2010, 21:37
Re: dialog help! - by Lorenc_ - 05.05.2010, 21:46
Re: dialog help! - by Whitetiger - 05.05.2010, 22:57

Forum Jump:


Users browsing this thread: 1 Guest(s)