14.02.2016, 21:49
I'm making a 911 system for the police where they can view all the calls. It seems to constantly replace all 15 slots.
I create the new entry afterwards. I replace the [0] slot and move the 0 slot to the next slot, could anyone assist?
Thanks.
pawn Код:
if(PoliceCall[0][pol_rl] > 0)
{
for(new x = 0; x < MAX_POLICECALLS -1; x++)
{
PoliceCall[x + 1][pol_rl] = PoliceCall[x][pol_rl];
PoliceCall[x + 1][pol_tih] = PoliceCall[x][pol_tih];
PoliceCall[x + 1][pol_tim] = PoliceCall[x][pol_tim];
format(PoliceCall[x + 1][pol_loc], 32, "%s", PoliceCall[x][pol_loc]);
format(PoliceCall[x + 1][pol_in], 64, "%s", PoliceCall[x][pol_in]);
format(PoliceCall[x + 1][pol_nm], 24, "%s", PoliceCall[x][pol_nm]);
printf("%s", PoliceCall[x][pol_in]);
}
}
format(PoliceCall[0][pol_loc], 32, "%s", GetLocation(playerid));
format(PoliceCall[0][pol_in], 64, "%s", PoliceCallP[playerid][pol_in]);
PoliceCall[0][pol_rl] = PoliceCallP[playerid][pol_rl];
PoliceCall[0][pol_tih] = THrs;
PoliceCall[0][pol_tim] = TMins;
Thanks.