27.07.2013, 23:28
pawn Код:
#include <a_samp>
#include <GetVehicleColor>
public OnPlayerCommandText(playerid, cmdtext[] ) {
if (!strcmp("/save2", cmdtext)) {
new Float: Pos[4], Cor1, Cor2, cStr[128];
GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2] );
GetVehicleZAngle(GetPlayerVehicleID(playerid), Pos[3] );
GetVehicleColor(GetPlayerVehicleID(playerid), Cor1, Cor2);
new File: Cars = fopen("carros.ini", io_append);
format(cStr, sizeof cStr, "AddStaticVehicle(%i, %f, %f, %f, %f, %i, %i);\r\n", GetVehicleModel(GetPlayerVehicleID(playerid)), Pos[0], Pos[1], Pos[2], Pos[3], Cor1, Cor2);
fwrite(Cars, cStr);
fclose(Cars);
return true;
}
return true;
}
E й necessбrio estar dentro de um veнculo.