Damages
#1

Hi, I have a damage saving system which shows how many times you were shot to where and by which gun using /injuries. It's all saving in a thing like this:
Код:
new Injury[MAX_PLAYERS][MAX_BODY_PARTS][MAX_WEAPONS];
How would it be possible to store everything inside "Injury" here?:
Код:
corpseInjuries[MAX_BODY_PARTS][MAX_WEAPONS]
I have that in enum called corpseData. I need this because I want people to be able to see the injuries of a corpse.
Reply
#2

I could do it like that:
Код:
for (new i = 0; i < MAX_BODY_PARTS; i++) {
	for (new j = 0; j < MAX_WEAPONS; j++) {
		CorpseInjury[id][i][j] = Injury[playerid][i][j];
	}
}
Reply
#3

You're doing CorpseInjury[id][i][j] = Injury[playerid][i][j];
But...
corpseInjuries is only a multidimensional array. You're setting its data like it was a three dimensional array.
Are you sure you didn't mean to define corpseInjuries like so?:
corpseInjuries[MAX_PLAYERS][MAX_BODY_PARTS][MAX_WEAPONS]

If not, then replace this:
CorpseInjury[id][i][j] = Injury[playerid][i][j];

by this:
CorpseInjury[i][j] = Injury[playerid][i][j];
Reply
#4

Mine works perfectly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)