02.11.2015, 06:11
(
Последний раз редактировалось Dusan01; 02.11.2015 в 08:08.
)
Making Camp Trailer System
IntroductionToday i'm gonna to release this. I think this is useful, because its good for RP servers and from this system of attach u can make really good jobs, camp trailers system...
Things that you need
- SA-MP 0.3.7 windows server - download it and extract it to your desktop
- zcmd - Download it and place it in /pawno/includes/
Let's start scripting!
Okay, so first think witch will we add will be this on top of your script:
PHP код:
new vozilo = 0; //to save vehicleid
new prikolca = 0; //to save trailer id
PHP код:
CMD:veh(playerid, params[]) {
new Float:Poz[4]; //new for player pos
GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]); //getting player pos
GetPlayerFacingAngle(playerid, Poz[3]); //getting player angle
new vozz = CreateVehicle(strval(params), Poz[0]+4, Poz[1], Poz[2], Poz[3], 0, 0, -1); //creating vehicle
PutPlayerInVehicle(playerid, vozz, 0); //Puting player in vehicle as dirver
return 1;
}
PHP код:
CMD:trailer(playerid, params[]) {
new Float:Poz[4]; //new for player pos
GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]); //getting player pos
GetPlayerFacingAngle(playerid, Poz[3]); //getting player angle
prikolca = CreateVehicle(607, Poz[0]+4, Poz[1], Poz[2], Poz[3], 0, 0, -1); //creating trailer id 607
return 1;
}
PHP код:
CMD:attach(playerid, params[]) {
new objekt=CreateObject(3171, 0,0,0,0,0,0); //creating object for example will be camp trailer
AttachObjectToVehicle(objekt, prikolca, 0.084999, -2.125115, -1.144999, -3.014999, 0.000000, 178.890090); //attaching object to trailer
AttachTrailerToVehicle(prikolca, vozilo); //attaching trailer to vehicle
return 1;
}
!!! THANKS FOR WATCHING MY TUTORIAL !!!