Information doesn't write into an enum - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Information doesn't write into an enum (
/showthread.php?tid=522858)
Information doesn't write into an enum -
kamiliuxliuxliux - 29.06.2014
pawn Код:
for(new i = 0; i < 3; i++)
{
if(anInfo[playerid][i][ID] == -1) continue;
else
{
new Float:a[5], modelis;
GetVehiclePos(anInfo[playerid][i][real_vehid], a[0],a[1],a[2]);
GetVehicleZAngle(anInfo[playerid][i][real_vehid], a[3]);
GetVehicleHealth(anInfo[playerid][i][real_vehid], a[4]);
modelis = GetVehicleModel(anInfo[playerid][i][real_vehid]);
anInfo[playerid][i][xasis] = a[0];
anInfo[playerid][i][yasis] = a[1];
anInfo[playerid][i][zasis] = a[2];
anInfo[playerid][i][angle] = a[3];
anInfo[playerid][i][health] = a[4];
anInfo[playerid][i][model] = modelis;
}
}
pawn Код:
// enum
enum Game4
{
ID,
model,
Float:xasis,
Float:yasis,
Float:zasis,
Float:angle,
owner[30],
Float:health,
col1,
col2,
real_vehid
};
new anInfo[MAX_PLAYERS][3][Game4];
Now, my problem is, that new information doesn't write into those enums and I don't know why (
Re: Information doesn't write into an enum -
BroZeus - 29.06.2014
put this line when u assign those value to enums
print("executed");
see if it prints or not
Re: Information doesn't write into an enum -
kamiliuxliuxliux - 29.06.2014
Yeah, it executes.