[DUVIDA]Rapido, como guinchar?
#2

pawn Код:
if (strcmp("/rebocar", cmdtext, true, 9) == 0)
{
    if ((IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
        if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
        {
            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;
                    AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
                    SendClientMessage(playerid,COLOR_BLUE,"[Veiculo:] Carro Rebocado");
                    Tow[playerid] = 1;
                }
            }
            if (!Found)
            {
                SendClientMessage(playerid,COLOR_RED,"[Serveridor:] Nгo ha carros perto de ti!");
            }
        }
    }
    return 1;
}
Tenta
Reply


Messages In This Thread
[DUVIDA]Rapido, como guinchar? - by Caio_Cartaxo - 14.03.2010, 21:29
Re: [DUVIDA]Rapido, como guinchar? - by SlashPT - 14.03.2010, 21:33
Re: [DUVIDA]Rapido, como guinchar? - by Caio_Cartaxo - 14.03.2010, 21:39
Re: [DUVIDA]Rapido, como guinchar? - by SlashPT - 14.03.2010, 21:45
Re: [DUVIDA]Rapido, como guinchar? - by Caio_Cartaxo - 14.03.2010, 21:59
Re: [DUVIDA]Rapido, como guinchar? - by SlashPT - 14.03.2010, 22:00
Re: [DUVIDA]Rapido, como guinchar? - by jcs14 - 15.03.2010, 11:46
Re: [DUVIDA]Rapido, como guinchar? - by Caio_Cartaxo - 15.03.2010, 13:04
Re: [DUVIDA]Rapido, como guinchar? - by SlashPT - 15.03.2010, 17:01
Re: [DUVIDA]Rapido, como guinchar? - by jcs14 - 16.03.2010, 10:40

Forum Jump:


Users browsing this thread: 9 Guest(s)