/goto problem.
#3

Quote:
Originally Posted by x3378
Посмотреть сообщение
At a glance the command seems to be fine, but try with this command .

Код:
CMD:goto(playerid, params[])
{
    new targetid = INVALID_PLAYER_ID;
    if (sscanf(params, "u", targetid))
        return SendClientMessage(playerid,-1,"{FF9900}Usage:{FFFFFF} /goto [Playerid]");

    if (IsPlayerConnected(targetid) && targetid != INVALID_PLAYER_ID)
    {
        if (IsPlayerInDMgoto[playerid])
        return SendClientMessage(playerid, -1, "{FFFFFF}You{FF0000} can't{FFFFFF} goto this player while on DM!");

        if (!P_DATA[targetid][Agoto])
            return SendClientMessage(playerid, -1, "{FFFFFF}You{FF0000} can't{FFFFFF} goto to this player because he disabled it.");

        new Float:pos[4];
        GetPlayerFacingAngle(targetid, pos[3]);
        GetPlayerPos(targetid, pos[0], pos[1], pos[2]);

        if (IsPlayerInAnyVehicle(playerid)){
            SetVehiclePos(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
        }
        else{
            SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
            SetPlayerFacingAngle(playerid, pos[3]);
        }
        new str[67], name[MAX_PLAYER_NAME];
        GetPlayerName(targetid, name, sizeof(name));
        format(str, sizeof(str), "You have teleported to '{FFFF00}%s{FFFFFF}'.", name);
        SendClientMessage(playerid, -1, str);
    }
    else SendClientMessage(playerid,-1,"Player{FF0000} not{FFFFFF} found"); 
    return 1;
}
Sorry mate. Tested but not working.
Reply


Messages In This Thread
/goto problem. - by ChristolisTV - 31.07.2015, 18:55
Re: /goto problem. - by x3378 - 31.07.2015, 19:09
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:14
Re: /goto problem. - by SFA7X - 31.07.2015, 19:15
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:27
Re: /goto problem. - by Abagail - 31.07.2015, 19:32
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:38
Re: /goto problem. - by ChristolisTV - 31.07.2015, 19:57
AW: /goto problem. - by Macronix - 31.07.2015, 20:00
Re: AW: /goto problem. - by ChristolisTV - 31.07.2015, 20:03
Re: /goto problem. - by Variable™ - 31.07.2015, 20:05
Re: /goto problem. - by 025Tadija - 31.07.2015, 22:25

Forum Jump:


Users browsing this thread: 1 Guest(s)