Little help. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little help. (
/showthread.php?tid=354617)
Little help. -
Littlehelper - 27.06.2012
Hello,
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(checkpointid == NFS)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"[ERROR]: You Should Be In A Vehicle First!");
SetPlayerInterior(playerid,1);
LinkVehicleToInterior(vehicleid,1);
if(IsPlayerInAnyVehicle(playerid)) return SetVehiclePos(vehicleid,624.7927,-22.8007,1001.6973);
SetVehicleZAngle(vehicleid,0.0096);
SetPlayerPos(playerid,624.7927,-22.8007,1001.6973);
SetPlayerCameraPos(playerid,623.9209,-18.4105,1021.7413);
SetPlayerCameraLookAt(playerid,624.7927,-22.8007,1001.6973);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
What's wrong with this code?
SetPlayerCameraPos+LookAt does not work.
Thank you.
Re: Little help. -
Randy More - 27.06.2012
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(checkpointid == NFS)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"[ERROR]: You Should Be In A Vehicle First!");
SetPlayerInterior(playerid,1);
LinkVehicleToInterior(vehicleid,1);
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(vehicleid,624.7927,-22.8007,1001.6973);
SetVehicleZAngle(vehicleid,0.0096);
SetPlayerPos(playerid,624.7927,-22.8007,1001.6973);
SetPlayerCameraPos(playerid,623.9209,-18.4105,1021.7413);
SetPlayerCameraLookAt(playerid,624.7927,-22.8007,1001.6973);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
Re: Little help. -
Littlehelper - 27.06.2012
Camera is working now, but vehicle disappears.