04.04.2012, 22:20
Problema e quando faco comando /garagem o carro que й rebocado ao reboque nao entra na garagem mais o reboque 
qual e o erro?
ajudem me por favor!

qual e o erro?
ajudem me por favor!
pawn Код:
if(strcmp(cmd, "/garagem", true) == 0) //
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][aFaction] != 255 && DynamicFactions[PlayerInfo[playerid][aFaction]][aType] == 1)
{
if(PlayerToPoint(10.0,playerid, -1398.9775,2615.2415,55.8359)) //Garagem {
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2328.3291,2445.8433,4.5318);
if(GetVehicleModel(vehicleid) == 525)
new vehicleid = 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!=vehicleid))
{
Found=1;
AttachTrailerToVehicle(vid,vehicleid);
}
}
else
{
SetPlayerPos(playerid, 2328.3291,2445.8433,4.5318);
}
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[ERRO:] Voзe nao esta a frente da garagem!");
}
}
}
return 1;
}