Talk help
#1

Hello, i need some help with my /settalk code, The code is meant to set the player talking animation, but it dosent do the animation. Just the text shows up, here is the realchat code:

pawn Код:
if (realchat)
    {
        if(gPlayerLogged[playerid] == 0)
        {
            return 0;
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(!IsPlayerInAnyVehicle(playerid))
        {
            if(settalk1[playerid] == 1)
            {
                ApplyAnimation(playerid,"PED","factalk",4.1,1,1,1,1,1);
            }
            if(PlayerInfo[playerid][pMaskuse] == 1)
            {
                format(string, sizeof(string), "Stranger Says: %s", text);
                ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            }
            else
            {
                format(string, sizeof(string), "%s Says: %s", sendername, text);
                ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            }
        }
        else
        {
            new carid = GetPlayerVehicleID(playerid);
            new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
            if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
            {
                if(PlayerInfo[playerid][pMaskuse] == 1)
                {
                    format(string, sizeof(string), "Stranger Says: %s", text);
                    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                }
                else
                {
                    format(string, sizeof(string), "%s Says: %s", sendername, text);
                    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                }
            }
            else
            {
                if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
                {
                    if(PlayerInfo[playerid][pMaskuse] == 1)
                    {
                        format(string, sizeof(string), "(Windows Shut) Stranger Says: %s", text);
                        ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                    }
                    else
                    {
                        format(string, sizeof(string), "(Windows Shut) %s Says: %s", sendername, text);
                        ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                    }
                }
                else
                {
                    if(PlayerInfo[playerid][pMaskuse] == 1)
                    {
                        format(string, sizeof(string), "(Windows Open) Stranger Says: %s", text);
                        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                    }
                    else
                    {
                        format(string, sizeof(string), "(Windows Open) %s Says: %s", sendername, text);
                        ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                    }
                }
            }
        }
    }
    return 1;
}
And this is the settalk command :

pawn Код:
if(strcmp(cmd, "/settalk", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new settalk[128];
            settalk = strtok(cmdtext, idx);
            if(!strlen(settalk)) {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /settalk 1-5");
                return 1;
        }
        else if(strcmp(settalk,"1", true) == 0)
        {
            if(settalk1[playerid] >= 0)//Fix made by Alex
            {
                settalk1[playerid] = 1;
                SendClientMessage(playerid, COLOR_WHITE, " Chat style has been set!");
                return 1;
            }
        }
    }
}
I cant figure out the problem. Any help would be appreciated,

Thanks, Alex
Reply
#2

Doesnt anyone know ? :S tried really hard, but i dont get it to work :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)