[HELP] Goto Problem
#2

pawn Код:
dcmd_goto(playerid, params[])
{
    new ID;
    if(IsInDM[playerid] == 1) SendClientMessage(playerid,COLOR_RED,"ERROR: {FFFFFF}You can not use commands in DM use /leavedm");
    else if(sscanf(params, "u", ID)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /goto [ID]");
    else if(!IsPlayerConnected(ID) || ID == playerid) SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player is offline or it is yourself");
    else if(toggoto[ID] == 1) SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player has DISABLED goto command or is in DM /toggoto");
    else if(GetPlayerVirtualWorld(ID) != GetPlayerVirtualWorld(playerid)) // SendClientMessage That player is in different world
    else
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(ID, x, y, z);
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
            SetVehiclePos(GetPlayerVehicleID(playerid), x+4, y, z);
        else
            SetPlayerPos(playerid, x+2, y, z);

        SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(ID));
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Goto Problem - by martin3644 - 13.03.2013, 22:49
Re: [HELP] Goto Problem - by Jefff - 14.03.2013, 00:08
Re: [HELP] Goto Problem - by martin3644 - 14.03.2013, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)