Teleporting to wrong vehicle ID?
#5

Код:
CMD:tptov(playerid, params[])
{
    new id;
    new Float:x, Float: y, Float: z;
    if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
    if(AdminLevel[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You are not authorized to use this command.");
    if(sscanf(params, "i", id)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /tptov [vehicleid]");
    if(id == INVALID_VEHICLE_ID) return SendClientMessage(playerid, COLOUR_GREY, "That vehicle does not exist.");

    GetVehiclePos(id, x, y, z);

    SetPlayerVirtualWorld(playerid, GetVehicleVirtualWorld(id));
    SetPlayerPos(playerid, x, y, z);
    new string[128];
    format(string, sizeof(string), "You have teleported to Vehicle ID: %d", id);
    SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
    return 1;
}
Reply


Messages In This Thread
Teleporting to wrong vehicle ID? - by Dokins - 17.03.2014, 19:42
Re: Teleporting to wrong vehicle ID? - by CuervO - 17.03.2014, 19:44
Re: Teleporting to wrong vehicle ID? - by Matess - 17.03.2014, 19:46
Re: Teleporting to wrong vehicle ID? - by Dokins - 17.03.2014, 19:50
Re: Teleporting to wrong vehicle ID? - by VishvaJeet - 18.03.2014, 04:42

Forum Jump:


Users browsing this thread: 1 Guest(s)