05.12.2010, 15:53
When a car explodes, I want it to respawn with the new information.. But it won't do that.
It will spawn with the new information until the server restarts.
- Information = Coordinates, color -
This is the code I use.
To save the color, for example, I made a command which will change the file (dini_IntSet) and modify the COwnerData[i] by using this: COwnerData[i][pC1] = color1;, COwnerdata[i][sC2] = color2;.
It will spawn with the new information until the server restarts.
- Information = Coordinates, color -
This is the code I use.
pawn Код:
public OnVehicleDeath(vehicleid)
{
for(new i; i < sizeof(COwnerData); i++)
{
if(vehicleid == COwnerData[i][CarID])
{
DestroyVehicle(COwnerData[i][CarID]);
COwnerData[i][CarID] = CreateVehicle(COwnerData[i][ModelID], COwnerData[i][carX], COwnerData[i][carY], COwnerData[i][carZ], COwnerData[i][carRot], COwnerData[i][pC1], COwnerData[i][sC2], 30*10000);
}
}
return 1;
}