SA-MP Forums Archive
Help /towpark - 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: Help /towpark (/showthread.php?tid=311180)



Help /towpark - alex_alex123 - 15.01.2012

I ordered /towpark, and not save the car towed. It saves in her car. How can I do to save the car towed?

if(strcmp(cmd, "/towpark", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float,Float:y,Float:z;
new Float:a;
new carid;
carid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
// GetPlayerFacingAngle(playerid, a);
GetVehicleZAngle(carid, a);
if((PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11))
{
PlayerInfo[playerid][pTowc] = 1;
AttachTrailerToVehicle(vid,GetPlayerVehicleID(play erid));
CarInfo[carid][cLocationx] = x;
CarInfo[carid][cLocationy] = y;
CarInfo[carid][cLocationz] = z;
CarInfo[carid][cAngle] = a;
format(string, sizeof(string), "~n~ Tocmai ati parcat masina in centrul TCC ~n~");
GameTextForPlayer(playerid, "Pretul eliberarii costa: 10.000$", 10000, 3);
OnPropUpdate();
OnPlayerUpdate(playerid);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Nu facetii parte din factiunea Tow Car Company");
return 1;
}
}
return 1;
}


Re: Help /towpark - alex_alex123 - 15.01.2012

help..


Re: Help /towpark - mineralo - 15.01.2012

you not use any car's system? just createvehicle?
spune mai exact tu ce ai facut shi in pawn code shi explica in ce consta towpark


Re: Help /towpark - alex_alex123 - 15.01.2012

Car parking consists tractata.La me to park the car in which

Consta in parcarea masinii tractata.La mine se parcheaza masina in care sunt


Re: Help /towpark - alex_alex123 - 15.01.2012

I car system, and there I made ​​a faction Tow Car Company, and I want to add to order / towpark -> to park in a certain place car towed.

Am sistem de masinii,si acolo am facut o factiune Tow Car COmpany , si vreau sa adaug la comanda /towpark --> sa se parcheze intr-un loc anume masina tractata.


Re: Help /towpark - thimo - 15.01.2012

Use IsTrailerAttached if it is attached get the ID and save the X y Z and maybe Z Angle