Npc AttachTrailerToVehicle don't work - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Npc AttachTrailerToVehicle don't work (
/showthread.php?tid=145100)
Npc AttachTrailerToVehicle don't work -
gangstajoe - 30.04.2010
Hi,
I got a NPC, that drives a linerunner, with thrailer. i searched down the model ID of the linerunner, and the trailer, so i wanted to attach them, and let the npc drive it.
But it don't attach, if i go to the NPC, i only see the linerunner, and not the trailer.. i tried it in the public OnGameModeInit, and in the npc information. Both don't work.
Does someone know how i can attach them, so the npc can drive it?
Re: Npc AttachTrailerToVehicle don't work -
Steven82 - 30.04.2010
Shit, i did this awhile back but since got rid of the script, hm..maybe if i remember the coding i will send back to you :/
Re: Npc AttachTrailerToVehicle don't work -
gangstajoe - 01.05.2010
Quote:
Originally Posted by Steven82
Shit, i did this awhile back but since got rid of the script, hm..maybe if i remember the coding i will send back to you :/
|
That would be nice
Re: Npc AttachTrailerToVehicle don't work -
CAR - 01.05.2010
Please send your code with trailer and linerunner and onplayerconnect also
Re: Npc AttachTrailerToVehicle don't work -
gangstajoe - 01.05.2010
on top:
Код:
new Linerunner,trailer;
OnGameModeInit:
Код:
ConnectNPC("Linerunner","Linerunner");
Linerunner = CreateVehilce(403, 0.0, 0.0, 5.0, 0.0, 2, 7, 5000);
Trailer = CreateVehilce(450, 0.0, 0.0, 5.0, 0.0, 2, 7, 5000);
AttachTrailerToVehicle(Trailer,Linerunner);
OnPlayerSpawn:
Код:
if(PIslayerNPC(playerid))
{
new NPCname[MAX_PLAYER_NAME];
GetPlayerName(playerid, NPCname, sizeof(NPCname));
if(!strcmp(npcname, "Dumper01", true))
{
PutPlayerInVehicle(playerid,Linerunner,0);
AttachTrailerToVehicle(Trailer,Linerunner);
return 1;
}
}
i don't got a OnPlayerConnect in my fs.
Re: Npc AttachTrailerToVehicle don't work -
gangstajoe - 05.05.2010
So, what did i do wrong?