[HELP] Goto Problem
#1

Hello!

I have a problem with my goto command...I have a world system. Drift world, Stunt world and RP world. But I dont want, when a player is in Drift world (world id 0) he can tele to a player, who is in RP(world id 2) or in Stunt world(world id 1). Player can not tele to player, who is in other world. How to do that?

+rep, who can help me and when it works!

Thank you!

Goto Command.
pawn Код:
dcmd_goto(playerid, params[])
    {
    if(IsInDM[playerid] ==1)
    {
    SendClientMessage(playerid,COLOR_RED,"ERROR: {FFFFFF}You can not use commands in DM use /leavedm");
    return 1;
    }
    #pragma unused params
    new ID;
    if(sscanf(params, "u", ID)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /goto [ID]");
    else if(!IsPlayerConnected(ID) || ID == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player is offline or it is yourself");
    if(toggoto[ID] == 1)
    {
    SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player has DISABLED goto command or is in DM /toggoto");
    return 1;
    }
    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;
    }
This command is with /toggoto...
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: 4 Guest(s)