Code don't work, - Please help!
#2

pawn Код:
dcmd_tow(playerid, cmdtext[]) {
    #pragma unused cmdtext
    new VID = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(VID) != 525) return  SendClientMessage(playerid, COLOR_RED,"You have to be in a tow truck");
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED,"You have to be the driver to tow a car.");
    new Float:vX,Float:vY,Float:vZ;
    for(new c = 0; c < MAX_VEHICLES; c++)
    {
        GetVehiclePos(c, vX, vY, vZ);
        if(IsPlayerInRangeOfPoint(playerid, 20.0, vX, vY, vZ) && c != VID)
        {
                AttachTrailerToVehicle(c, VID);
                SendClientMessage(playerid, COLOR_RED,"You have succesfully attached a vehicle!");
                break;
        }
    }
}
Reply


Messages In This Thread
Code don't work, - Please help! - by Danny - 30.09.2010, 13:41
Re: Code don't work, - Please help! - by wups - 30.09.2010, 14:37
Re: Code don't work, - Please help! - by samgreen - 01.10.2010, 01:14

Forum Jump:


Users browsing this thread: 1 Guest(s)