Can someone make these commands for me please?

Results 1 to 10 of 10
  1. #1
    Elite Member therehere3 is offline
    Member +Rank
    Sep 2013 Join Date
    166Posts

    Can someone make these commands for me please?

    /tpall - teleport every player to your location

    /tp2p NAME- teleport to a players location

    /tp2m NAME - teleport a player to me

    If someone can make these for me, It would be super appreciated!:)


  2. #2
    Member Connor1224 is offline
    MemberRank
    Dec 2013 Join Date
    36Posts

    Re: Can someone make these commands for me please?

    Quote Originally Posted by therehere3 View Post
    /tpall - teleport every player to your location

    /tp2p NAME- teleport to a players location

    /tp2m NAME - teleport a player to me

    If someone can make these for me, It would be super appreciated!:)
    how about you do it yourself? short answer - no.

    Edit: Or you could check amosin his source, and learn from it and create it yourself. Little bit like education:)
    Last edited by Connor1224; 13-12-13 at 11:04 PM.

  3. #3
    Elite Member therehere3 is offline
    Member +Rank
    Sep 2013 Join Date
    166Posts

    Re: Can someone make these commands for me please?

    Quote Originally Posted by Connor1224 View Post
    how about you do it yourself? short answer - no.

    Edit: Or you could check amosin his source, and learn from it and create it yourself. Little bit like education:)
    I have no idea why you posted.. you helped none.
    And I know other programming languages just not C++ so I learn from the code people give me and I will read it and know it inside and out after I see it.

  4. #4
    Member Connor1224 is offline
    MemberRank
    Dec 2013 Join Date
    36Posts

    Re: Can someone make these commands for me please?

    Quote Originally Posted by therehere3 View Post
    I have no idea why you posted.. you helped none.
    And I know other programming languages just not C++ so I learn from the code people give me and I will read it and know it inside and out after I see it.
    I'm sure I helped "none". What I'm saying is, you should code it yourself.
    Last edited by Connor1224; 14-12-13 at 04:36 AM.

  5. #5
    Harro Syxn is offline
    Grand MasterRank
    Mar 2013 Join Date
    767Posts

    Re: Can someone make these commands for me please?

    Here you go enjoy.

    if(strncmp(cmd, "/tome", 5) == 0 && plr->profile_.ProfileData.isDevAccount)
    return Cmd_TeleportToPlayerMe(plr, cmd);

    if(strncmp(cmd, "/goto", 4) == 0 && plr->profile_.ProfileData.isDevAccount)
    return Cmd_TeleportToPlayer(plr, cmd);

    int ServerGameLogic::Cmd_TeleportToPlayer(obj_ServerPlayer* plr, const char* cmd)
    {
    char buf[128];
    char find[64];
    if(2 != sscanf(cmd, "%s %63c", buf, find))
    return 2;
    obj_ServerPlayer* tplr = FindPlayer(find);
    if(tplr)
    {
    r3dPoint3D NewPos = tplr->loadout_->GamePos;
    PKT_S2C_MoveTeleport_s n;
    n.teleport_pos = NewPos;
    p2pBroadcastToActive(plr, &n, sizeof(n));
    plr->SetLatePacketsBarrier("teleport");
    plr->TeleportPlayer(NewPos);
    }
    else
    {
    r3dOutToLog("%s Not Found\n", find);
    return 3;
    }

    return 0;
    }

    int ServerGameLogic::Cmd_TeleportToPlayerMe(obj_ServerPlayer* plr, const char* cmd)
    {
    char buf[128];
    char find[64];
    if(2 != sscanf(cmd, "%s %63c", buf, find))
    return 2;
    obj_ServerPlayer* tplr = FindPlayer(find);
    if(tplr)
    {
    r3dPoint3D NewPos = plr->loadout_->GamePos;
    PKT_S2C_MoveTeleport_s n;
    n.teleport_pos = NewPos;
    p2pBroadcastToActive(tplr, &n, sizeof(n));
    tplr->SetLatePacketsBarrier("teleport");
    tplr->TeleportPlayer(NewPos);
    }
    else
    {
    r3dOutToLog("%s Not Found\n", find);
    return 3;
    }
    return 0;
    }
    obj_ServerPlayer* ServerGameLogic::FindPlayer(char* Name)
    {
    FixedString c(Name);
    c.ToLower();
    obj_ServerPlayer* tplr;
    for(int i=0; i<ServerGameLogic::MAX_NUM_PLAYERS; i++)
    {
    tplr = gServerLogic.GetPlayer(i);
    if(!tplr) continue;
    FixedString pn( tplr->userName);
    pn.ToLower();
    if(strstr(c,pn)) return tplr;
    }
    return NULL;
    }
    int Cmd_TeleportToPlayerMe(obj_ServerPlayer* plr, const char* cmd);
    int Cmd_TeleportToPlayer(obj_ServerPlayer* plr, const char* cmd);
    obj_ServerPlayer* FindPlayer(char* Name);

  6. #6
    Elite Member therehere3 is offline
    Member +Rank
    Sep 2013 Join Date
    166Posts

    Re: Can someone make these commands for me please?

    Thank you so much DragonKon!
    Now I can learn from reading all this to understand more:)
    Very appreciated.

  7. #7
    Harro Syxn is offline
    Grand MasterRank
    Mar 2013 Join Date
    767Posts

    Re: Can someone make these commands for me please?

    No problem therehere3 enjoy.

  8. #8
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: Can someone make these commands for me please?

    what is file?

  9. #9
    Member crysis55 is offline
    MemberRank
    Apr 2013 Join Date
    RussiaLocation
    80Posts

    Re: Can someone make these commands for me please?

    Quote Originally Posted by javaz97 View Post
    what is file?
    ServerGameLogic source file, in server.

    PS Ctrl + F - for you ;)

  10. #10
    Grand Master javaz97 is offline
    Grand MasterRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: Can someone make these commands for me please?

    thank crysis55



Advertisement