03.06.2010, 14:35
Hey guys,I have a problem,I'm currently using the include by Martin_M(GetVehicleColor1 and GetVehicleColor2)well here is the code:
It saves everything correctly but the colors. It only shows 0,0 at the file.
Any help please?
Thanks in advance.
pawn Код:
if(strcmp(cmdtext, "/savethepos", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new File:saved = fopen("saved.txt", io_append);
new str[72],n[34];
new v,m,Float:x,Float:y,Float:z,Float:a,c1,c2;
v = GetPlayerVehicleID(playerid);
m = GetVehicleModel(v);
c1 = GetVehicleColor1(v);
c2 = GetVehicleColor2(v);
GetPlayerName(playerid,n,sizeof(n));
GetVehiclePos(v,x,y,z);
GetPlayerFacingAngle(playerid,a);
format(str,340,"%s saved : AddStaticVehicle(%d,%f,%f,%f,%f,%d,%d);\r\n",n,m,x,y,z,a,c1,c2);
fwrite(saved,str);
fclose(saved);
SendClientMessage(playerid,COLOR_ORANGE,"You have saved your vehicle positions.");
}
Any help please?
Thanks in advance.