LinkVehicleToInterior
#5

pawn Код:
COMMAND:v(playerid, params[])
{
    if(!PLVL[playerid]) return 0;
    if(PlayerInfo[playerid][pAdminLevel] >=3)
    {
    if(sscanf(params,"s",params)) return SendClientMessage(playerid, Yellow, "Usage: /v <vehicle ID/name>");
    new vehicle = GetVehicleModelIDFromName(params);
    if(IsNumeric(params)) vehicle = strval(params);
    else vehicle = GetVehicleModelIDFromName(params);
    if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, Red, "Invalid vehicle ID/name");
    else
    {
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, a);
        GetXYInFrontOfPlayer(playerid, x, y, 5.0);
        CreateVehicle(vehicle, x, y, z, a, -1, -1, 100);
        LinkVehicleToInterior(vehicle, GetPlayerInterior(playerid));
      }
    } else if(PlayerInfo[playerid][pAdminLevel] == 0) return 0;
    return 1;
}
Reply


Messages In This Thread
LinkVehicleToInterior - by xir - 13.02.2011, 14:41
Re: LinkVehicleToInterior - by xir - 14.02.2011, 09:23
Re: LinkVehicleToInterior - by (SF)Noobanatior - 14.02.2011, 09:27
Re: LinkVehicleToInterior - by iggy1 - 14.02.2011, 09:28
Re: LinkVehicleToInterior - by xir - 14.02.2011, 09:31
Re: LinkVehicleToInterior - by (SF)Noobanatior - 14.02.2011, 09:35
Re: LinkVehicleToInterior - by iggy1 - 14.02.2011, 09:35
Re: LinkVehicleToInterior - by xir - 14.02.2011, 09:38
Re: LinkVehicleToInterior - by (SF)Noobanatior - 14.02.2011, 09:39
Re: LinkVehicleToInterior - by xir - 14.02.2011, 09:42

Forum Jump:


Users browsing this thread: 1 Guest(s)