What is wrong with this ?
#9

pawn Код:
CMD:goto(playerid, params[])
{
    if(LoggedIN[playerid] == 0) return SCM(playerid, GREY, "YOu have to be logged-in first.");

    new id, veh = GetPlayerVehicleID(playerid), Float:X, Float:Y, Float:Z;
    if(!PI[playerid][Admin] || !PI[playerid][GameMaster]) return SCM(playerid, GREY, "Not allowed.");
    if(sscanf(params, "u", id)) return SCM(playerid, GREY, "Use: /goto [ID / Part of Name]");
    if(!IsPlayerConnected(id)) return SCM(playerid, GREY, "That player is not online.");

    if(IsPlayerInAnyVehicle(playerid))
    {
        GetPlayerPos(id, X, Y, Z);
        SetVehiclePos(veh, X, Y+2, Z);
        LinkVehicleToInterior(veh, GetPlayerInterior(id));
        SetPlayerVirtualWorld(veh, GetPlayerVirtualWorld(id));
    }
    else
    {
        GetPlayerPos(id, X, Y, Z);
        SetPlayerPos(playerid, X, Y+2, Z);
        SetPlayerInterior(playerid, GetPlayerInterior(id));
        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
    }

    SCM(playerid, GREY, "You have been teleported.");
    return 1;
}
Reply


Messages In This Thread
What is wrong with this ? - by ShoortyFl - 24.10.2014, 11:13
Re: What is wrong with this ? - by Rudy_ - 24.10.2014, 11:22
Re: What is wrong with this ? - by ShoortyFl - 24.10.2014, 11:24
Re: What is wrong with this ? - by Rudy_ - 24.10.2014, 11:26
Re: What is wrong with this ? - by ShoortyFl - 24.10.2014, 11:29
Re: What is wrong with this ? - by ShoortyFl - 24.10.2014, 11:45
Re: What is wrong with this ? - by Rudy_ - 24.10.2014, 11:48
Re: What is wrong with this ? - by ShoortyFl - 24.10.2014, 11:51
Re: What is wrong with this ? - by gurmani11 - 24.10.2014, 12:02
Re: What is wrong with this ? - by ShoortyFl - 24.10.2014, 12:27

Forum Jump:


Users browsing this thread: 1 Guest(s)