PutPlayerInVehicle error? - 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: PutPlayerInVehicle error? (
/showthread.php?tid=280903)
PutPlayerInVehicle error? -
GameStar. - 03.09.2011
It NPC is out of order if I put it into a vehicle. Floats above the vehicle, does not sit down in it.
Code:
pawn Код:
gNPCVehicleID = CreateVehicle(411, 2109.1763, 1503.0453, 32.2887, 82.2873, 665, 665, 60);
PutPlayerInVehicle(gNPCID, gNPCVehicleID, 0);
PS: Not good, if I rehearse it later
Re: PutPlayerInVehicle error? -
JaTochNietDan - 03.09.2011
Is the recording a vehicle NPC recording? If it isn't, they won't be able to sit in a vehicle. See this page for recording types:
https://sampwiki.blast.hk/wiki/StartRecordingPlayerData
Re: PutPlayerInVehicle error? -
GameStar. - 03.09.2011
Quote:
Originally Posted by JaTochNietDan
Is the recording a vehicle NPC recording?
|
Yes.
But this is not the problem. Accommodation after the vehicle starts to play.
(****** translate = shit)
Re: PutPlayerInVehicle error? -
JaTochNietDan - 03.09.2011
How are you aquiring the ID of the NPC?
Re: PutPlayerInVehicle error? -
GameStar. - 03.09.2011
Quote:
Originally Posted by JaTochNietDan
How are you aquiring the ID of the NPC?
|
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid)) {
new name[20];
GetPlayerName(playerid,name,20);
if(!strcmp(name,"[NPC]Name",true)) {
gNPCID = playerid;
SetSpawnInfo(gNPCID,69,23,380.8346,-1799.0687,7.8281,273.1935,-1,-1,-1,-1,-1,-1);
return 1;
}
}
return 1;
}
Re: PutPlayerInVehicle error? -
GameStar. - 03.09.2011
pawn Код:
CMD:a(playerid){
if(!IsPlayerConnected(0)) SendClientMessage(playerid, SAMPAGE_COLOR, "NPC offline");
PutPlayerInVehicle(0, gNPCVehicleID, 0);
PutPlayerInVehicle(playerid, gNPCVehicleID, 1);
return 1;
}