SA-MP Forums Archive
Newbie Needs Help Scripting A Trucking Server. - 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: Newbie Needs Help Scripting A Trucking Server. (/showthread.php?tid=166733)



Newbie Needs Help Scripting A Trucking Server. - horscroftt04 - 09.08.2010

Hey guys, 2nd post here. ill let you guys know, the server not appearing on the internet problem, is fixed.

So im looking to start my own trucking server, i have very BASIC knowledge of PAWN code, and i will be able to get a server setup with the trucks and trailers in their positions, but the following, are osme questions i need answering, i need someone patient to answer these, as im not the best, but hophully will learn with your help.

So saving a roadtrain to a postion would be simple, in GTA do /save and get the exact location, enter the create vechile code with the permiter, but how would i do a trailer? as you cant do /save in a trailer.

Am i doing all this coding in the GM script. of FS script.

The question i really need answered, how the hell do i code a route. eg, delivering beer from somewhere, to another.

Thanks!


Re: Newbie Needs Help Scripting A Trucking Server. - [L3th4l] - 09.08.2010

Umm, if you search, there is a Trucking script made by "Sandra". It also creates missions ingame and adds the required vehicles for that mission. Use search


Re: Newbie Needs Help Scripting A Trucking Server. - Kayla.S - 09.08.2010

For the trailer why not just do /save on foot, and then use createvehicle and put in the proper cords, and add the id for the trailer you want.

I also suggest you use mta map editor for car placements. It's alot easier then doing /save all the time. You can line up the cars/trucks perfectly. Just do convertffs.com to convert the cars to samp. :P


Re: Newbie Needs Help Scripting A Trucking Server. - horscroftt04 - 09.08.2010

Kayla, im using MTA map editor, thankyou.

L3thal, i have searched, and i have used that exact filterscript. but it keeps telling me im not in a mission truck, when i am.

all i want to know is how to get a basic truck sever up, its annoying me


Re: Newbie Needs Help Scripting A Trucking Server. - horscroftt04 - 10.08.2010

Sorry for bumping, need help :/


Re: Newbie Needs Help Scripting A Trucking Server. - r0b - 10.08.2010

Um, you need checkpoints, look at the wiki for that.
Then you need to check, if he's in the car, you want to set as a mission car.
If he is, set the first checkpoint. Then set the next checkpoint, if he is in the first. And so on.
OnPlayerEnterCheckpoint(playerid)
SetPlayerCheckpoint(playerid,Float,Float:y,Float :z,Floatize);

Set his Checkpoint, then example coords: 1.0,1.0,1.0
Now use the callback to check if he's in a checkpoint:
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(...params)) // is player in range of checkpoint
{
// then do, what should happen in the checkpoint. After doing this, set his next checkpoint and so on.
}
}