Problem with array
#1

Код:
UccisioniGDM[issuerid] += amount;
	new string[256];
	format(string,sizeof(string),"Danno fatto: %0.f", UccisioniGDM[issuerid]);
	SendClientMessage(issuerid,Lightblue,string);

	if(UccisioniGDM[issuerid] >= 1500.0)
	{
	new nameDM[MAX_PLAYER_NAME];
	new stringDM[256];
	GetPlayerName(issuerid,nameDM,128);
	format(stringDM,sizeof(stringDM),"Il vincitore dell'Evento DM e' %s, ha guadagnato 1 Punto Esperienza e 15000$!",nameDM);

	GivePlayerMoney(issuerid,15000);
	PlayerInfo[issuerid][pExp]++;
	if(PlayerInfo[issuerid][pExp] >= 20)
	{
	LevelUp(issuerid);
	}
	SendClientMessageToAll(Gold,stringDM);
I put this in "OnPlayerTakeDamage" and i have create an if with if UccisioniGDM[issuerid] > 1500.0 it finishes the event
but if i get shot once it finishes :/ can't understand what's wrong in this code..

UccisioniGDM[issuerid] is the array that stores the damage done in the DM Event
Reply


Messages In This Thread
Problem with array - by Flamehaze7 - 06.03.2017, 14:57
Re: Problem with array - by Jefff - 06.03.2017, 15:14
Re: Problem with array - by Flamehaze7 - 06.03.2017, 15:22
Re: Problem with array - by Jefff - 06.03.2017, 15:34

Forum Jump:


Users browsing this thread: 2 Guest(s)