Help /towpark
#1

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;
}
Reply


Messages In This Thread
Help /towpark - by alex_alex123 - 15.01.2012, 13:09
Re: Help /towpark - by alex_alex123 - 15.01.2012, 14:26
Re: Help /towpark - by mineralo - 15.01.2012, 14:40
Re: Help /towpark - by alex_alex123 - 15.01.2012, 15:00
Re: Help /towpark - by alex_alex123 - 15.01.2012, 15:07
Re: Help /towpark - by thimo - 15.01.2012, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)