Bugged after selecting textdraws?...
#1

The players of my server have problems in moving their player (they can move but the players stop in halfway jumps, and cannot run properly) after closing selectable textdraw menus.
I tried SetPlayerPos back to the original pos, and tried to freeze and then unfreeze the player, but the problem still occurs

Any idea what's causing this?....
Reply
#2

I haven't seen this before. Could you get one of your players to make a video and post it here?
Reply
#3

I couldn't understand the problem... The camera freezes and don't follow the player?

pawn Code:
SetCameraBehindPlayer(playerid);
Or they don't run like CJ?

pawn Code:
// At OnGameModeInit
UsePlayerPedAnims(); // They must run like CJ now.
Reply
#4

The camera is normal, and the player anims are fine.
It gets bugged, like, I try to run, and after 1 second of running, my player gets to normal standing-position, while I'm still holding the running button.

I'll post a video.
Reply
#5

http://www.youtube.com/watch?v=eGI2K...ature=*********
Reply
#6

It appears as though the player's controllability is being toggled constantly between true and false. Look for "TogglePlayerControllable" in the code that brings up the textdraw or anywhere related to it; then post it here.
Reply
#7

Quote:
Originally Posted by JonnyDeadly
View Post
It appears as though the player's controllability is being toggled constantly between true and false. Look for "TogglePlayerControllable" in the code that brings up the textdraw or anywhere related to it; then post it here.
pawn Code:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid == INVALID_TEXT_DRAW)
    {
        for(new x = 0; x  <  9; x++)
        {
            TextDrawHideForPlayer(playerid, Bank[x]);
            TogglePlayerControllable(playerid, true);
            TextDrawHideForPlayer(playerid, Market_BLACK[x]);
        }
        HideBizzMenu(playerid);

        new Float:Pos[3];
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        TogglePlayerControllable(playerid, false);
        SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        TogglePlayerControllable(playerid, true);
    }
pawn Code:
CMD:buy(playerid, params[])
{
    new bizzid = Tmp_P[playerid][InsideBizz];
    if(bizzid != -1)
    {
        new Float:Pos[3];
        GetBizzBuyingPoint(bizzid, Pos[0], Pos[1], Pos[2]);
        if(IsPlayerInRangeOfPoint(playerid, 2.0, Pos[0], Pos[1], Pos[2]))
        {
            new type = Bizz[bizzid][BizzType];
            ShowBizzMenu(playerid, type);
        }
        else return SendClientMessage(playerid, RED, "[ERROR]"COL_WHITE"You need to be near the cashier to use this command! ");
    }
    else
    {
        for(new x=0; x < MAX_BUSINESSES; x++)
        {
            if(Bizz[x][BizzType] == BIZZ_TYPE_VENDOR)
            {
                if(IsPlayerInRangeOfPoint(playerid, 2.0, Bizz[x][BizzEntry][0], Bizz[x][BizzEntry][1], Bizz[x][BizzEntry][2]))
                {
                    ShowBizzMenu(playerid, BIZZ_TYPE_VENDOR);
                }
            }
        }
    }
    return 1;
}
pawn Code:
stock ShowBizzMenu(playerid, bizztype)
{
    for(new x=0; x < 5; x++)
    {
        TextDrawShowForPlayer(playerid, Shopping[x]);
    }
    if(bizztype == BIZZ_TYPE_VENDOR)
    {
        for(new x=0; x <6; x++)
        {
            TextDrawShowForPlayer(playerid, VendorItems[x]);
        }
    }
    else if(bizztype == BIZZ_TYPE_24X7)
    {
        for(new x=0; x < 6; x++)
        {
            TextDrawShowForPlayer(playerid, HoursItems[x]);
        }
    }
    else if(bizztype == BIZZ_TYPE_FASTFOOD)
    {
        for(new x=0; x < 6; x++)
        {
            TextDrawShowForPlayer(playerid, FastfoodItems[x]);
        }
    }
    SelectTextDraw(playerid, GREEN);
    return 1;
}

stock HideBizzMenu(playerid)
{
    for(new x=0; x < 5; x++)
    {
        TextDrawHideForPlayer(playerid, Shopping[x]);
    }
    for(new x=0; x < 6; x++)
    {
        TextDrawHideForPlayer(playerid, HoursItems[x]);
        TextDrawHideForPlayer(playerid, VendorItems[x]);
        TextDrawHideForPlayer(playerid, FastfoodItems[x]);
    }
    CancelSelectTextDraw(playerid);
    return 1;
}
Reply
#8

this is happening for ALL clickable textdraws, after closing the menu, it bugs me :/ even filterscripts, even VSPAWNER
Reply
#9

need a fast reply, this bug is causing too many problems :/
Reply
#10

pawn Code:
new Float:Pos[3];
        GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        TogglePlayerControllable(playerid, false);
        SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
        TogglePlayerControllable(playerid, true);
I think that code is the contributor to the problem. It doesn't make any sense why it's there, so... comment it out and give it a shot?

By the way, go read the forum rules.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)