26.04.2013, 10:19
I Add /mycars Cmd TO AVS Vehicle FilterScript It compiles Succssfully BuT,It Doesent Load The Cars when player uses the cmd in the game.
PHP код:
CMD:mycars(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
new filename[64], line[256];
format(filename, sizeof(filename), VEHICLE_FILE_PATH "v%d.ini", vehicleid);
new File:handle = fopen(filename, io_write);
format(line, sizeof(line), "Created=%d\r\n", VehicleCreated[vehicleid]); fwrite(handle, line);
format(line, sizeof(line), "Model=%d\r\n", VehicleModel[vehicleid]); fwrite(handle, line);
format(line, sizeof(line), "Colors=%d,%d\r\n", VehicleColor[vehicleid][0], VehicleColor[vehicleid][1]); fwrite(handle, line);
format(line, sizeof(line), "Owner=%s\r\n", VehicleOwner[vehicleid]); fwrite(handle, line);
format(line, sizeof(line), "NumberPlate=%s\r\n", VehicleNumberPlate[vehicleid]); fwrite(handle, line);
format(line, sizeof(line), "Value=%d\r\n", VehicleValue[vehicleid]); fwrite(handle, line);
format(line, sizeof(line), "Lock=%d\r\n", VehicleLock[vehicleid]); fwrite(handle, line);
fclose(handle);
if(IsPlayerConnected(playerid))
{
new string[256];
new carkey = PlayerInfo[playerid][pPcarkey];
new carkey2 = PlayerInfo[playerid][pPcarkey2];
new carkey3 = PlayerInfo[playerid][pPcarkey3];
if (PlayerInfo[playerid][pPcarkey] != -1)
{
format(string, sizeof(string), "1| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey][Model], CarInfo[carkey][Colors], CarInfo[Owner], CarInfo[carkey][Lock]);
SendClientMessage(playerid, COLOR_GRAD5,string);
}
if (PlayerInfo[playerid][pPcarkey2] != -1)
{
format(string, sizeof(string), "2| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey2][Model], CarInfo[carkey][Colors], CarInfo[Owner], CarInfo[carkey][Lock]);
SendClientMessage(playerid, COLOR_GRAD5,string);
}
if (PlayerInfo[playerid][pPcarkey3] != -1)
{
format(string, sizeof(string), "3| VehModel:[%s] VehValue:[%d] VehColor1:[%d] VehColor2:[%d] VehLocked:[%d]", CarInfo[carkey3][Model], CarInfo[carkey][Colors], CarInfo[Owner], CarInfo[carkey][Lock]);
SendClientMessage(playerid, COLOR_GRAD5,string); }
}
return 1;
}