if(strcmp(cmd, "/tow", true) == 0)
{
if (IsTowTruck(GetVehicleModel(GetPlayerVehicleID(playerid))))
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
new Float:vX,Float:vY,Float:vZ;
new Found=0;
new vid=0;
while ((vid<MAX_VEHICLES)&&(!Found))
{
vid++;
GetVehiclePos(vid,vX,vY,vZ);
if((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
Found=1;
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
}
if(!VehicleToPoint(vid, VehicleInfo[vid][Xcar], VehicleInfo[vid][Ycar], VehicleInfo[vid][Zcar], 30))
{
AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
SendClientMessage(playerid,COLOR_WHITE,"Towed, You can deliver it to the impound garage.");
SetPlayerCheckpoint(playerid,691.2448,-1570.8842,14.2422,5);
return 1;
}
else return SendClientMessage(playerid,COLOR_BRIGHTRED,"This vehicle is at its spawn, no need to tow it!");
}
}
if(!Found)
{
SendClientMessage(playerid,COLOR_BRIGHTRED,"There is nothing to tow!");
}
}
return 1;
}
|
Originally Posted by silvan
How is it possible to make Streamed in vehicles??
|
|
Originally Posted by V1ceC1ty
this is the only thing i understand, get a vehicle streamer.
Quote:
|