04.05.2010, 22:13
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:
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
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!
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; }
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--;
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!