09.04.2010, 08:47
Quote:
Originally Posted by biltong
Both vehicles must be streamed in, IE close to you.
OFFTOPIC: I helped Rodney to get to level 9, 25 and 26 xD suckit |
pawn Код:
if(strcmp(cmd, "/transport", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 23)
{
if(tr_check[playerid] >= 1)
{
if(PlayerInfo[playerid][pJobTime] == 0)
{
new newcar = GetPlayerVehicleID(playerid);
if(newcar >= 254 && newcar <= 255)
{
if(PlayerToPoint(20.0,playerid,1647.3077,-2112.8350,13.5547))
{ //vlada
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
/*new Float:pA;
GetVehicleZAngle(GetPlayerVehicleID(playerid),pA);*/
new Float:vX,Float:vY,Float:vZ;
new Found=0;
new newtrailer = AddStaticVehicleEx(450,pX,pY,pZ,0.0,-1,-1,0);
while((GetPlayerVehicleID(playerid)<MAX_VEHICLES)&&(!Found))
{
GetVehiclePos(GetPlayerVehicleID(playerid),vX,vY,vZ);
if((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0))
{
Found=1;
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
new gTrailer = GetVehicleTrailer(GetPlayerVehicleID(playerid));
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
DestroyVehicle(gTrailer);
}
AttachTrailerToVehicle(newtrailer,GetPlayerVehicleID(playerid));
SetPlayerCheckpoint(playerid,2431.2773,114.5036,26.4689,20.0);
transportcheck[playerid]=1; tr_check[playerid] = 0;
GameTextForPlayer(playerid,"~r~Transport ~w~the container to the selected destination!",8000,3);
} }
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You need to be in the working place entrance area to enable the mission.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You cannot transport without a transporter vehicle!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You are already started the your job mission.");
}
}
else
{
format(string, sizeof(string), "* You cannot transport at the moment, please come again in %d minutes.", PlayerInfo[playerid][pJobTime]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* You are not a transporter.");
}
}
return 1;
}