30.05.2015, 01:27
Hi, this is the second time that i need help today, i have a bug , i'am scripting a First person driving system , but when i do the command to activate this mod , the cordinations of the camera is false.
PHP код:
stock StartFPS(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
FirstPersonObject[playerid] = CreateObject(19300, 40.0, 0.0, 0.0, 0.0, 0.0, 0.0);
if(vehicleid == VehicleRoadTrain || vehicleid == VehicleLineRunner || vehicleid == 443) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, -0.539999, 1.639998, 0.669999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == VehicleTanker) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, -0.444999, 1.799998, 0.699999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == VehicleFlatbed) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, -0.499999, 1.394998, 1.134999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == VehicleDFT30) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, -0.494999, 3.730037, 0.609999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == 522 || vehicleid == 521 || vehicleid == 523 || vehicleid == 509 || vehicleid == 510 || vehicleid == 481 || vehicleid == 581) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, 0.000000, 0.299999, 0.719999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == 468 || vehicleid == 471 ) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, 0.000000, 0.299999, 0.719999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == 519) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, 0.000000, 5.295073, 0.514999, 0.000000, 0.000000, 0.000000);
else if(vehicleid == 577 || vehicleid == 592) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, -0.439999, 24.713855, 4.410053, 0.000000, 0.000000, 0.000000);
else if(vehicleid == VehicleCoach || vehicleid == 431) return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000);
else return AttachObjectToVehicle(FirstPersonObject[playerid], vehicleid, -0.519999, -0.219999, 0.374999, 0.000000, 0.000000, 0.000000);
AttachCameraToObject(playerid, FirstPersonObject[playerid]);
FirstPerson[playerid] = 1;
return 1;
}