07.05.2011, 17:55
Consegui um pra vocк
, isto deve resolver o seu problema
:
Espero ter ajudado
.


pawn Код:
if(strcmp(cmd,"/rebocar",true)==0)
{
if(PlayerInfo[playerid][pMembro] == 14 || PlayerInfo[playerid][pLider] == 14)
{
if(IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
{
if(GetPlayerState(playerid)==2)
{
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)))
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
}
else
{
AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
}
}
}
}
}
}
return 1;
}
Espero ter ajudado
