New Help Needed Animations OnPlayerRequestClass!
#1

PHP код:
if(classid == 0)
    {
        
gTeam[playerid] = BALLAS ;
        
SetPlayerInterior(playerid,0);
        
GameTextForPlayer(playerid,"~p~Glen Park Ballas",2000,5);
        
SetPlayerInterior(playerid,5);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerPos(playerid,319.9598,1122.3853,1083.8828);
        
InterpolateCameraPos(playerid316.3984371118.3192131084.228393325.0754081118.3048091084.2580564000);
        
InterpolateCameraLookAt(playerid319.9606321121.8278801084.244018321.3460081121.6329341084.1369624000);
        
SetPlayerFacingAngle(playerid180.9598);
        
ApplyAnimation(playerid,"CAMERA","camcrch_cmon",4.1,1,1,1,1,1,1);
        
SetPlayerColor(playerid,COLOR_PURPLE);
    }
    else if(
classid == 1)
    {
        
gTeam[playerid] = BALLAS;
        
SetPlayerInterior(playerid,0);
        
GameTextForPlayer(playerid,"~p~Glen Park Ballas",2000,5);
        
SetPlayerInterior(playerid,5);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerPos(playerid,319.9598,1122.3853,1083.8828);
        
InterpolateCameraPos(playerid316.3984371118.3192131084.228393325.0754081118.3048091084.2580564000);
        
InterpolateCameraLookAt(playerid319.9606321121.8278801084.244018321.3460081121.6329341084.1369624000);
        
SetPlayerFacingAngle(playerid,180.9598);
        
ApplyAnimation(playerid,"CAMERA","camcrch_cmon",4.1,1,1,1,1,1,1);
        
SetPlayerColor(playerid,COLOR_PURPLE);
    }
    else if(
classid == 2)
    {
         
gTeam[playerid] = BALLAS;
         
SetPlayerInterior(playerid,0);
        
GameTextForPlayer(playerid,"~p~Glen Park Ballas",2000,5);
        
SetPlayerInterior(playerid,5);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerPos(playerid,319.9598,1122.3853,1083.8828);
        
InterpolateCameraPos(playerid316.3984371118.3192131084.228393325.0754081118.3048091084.2580564000);
        
InterpolateCameraLookAt(playerid319.9606321121.8278801084.244018321.3460081121.6329341084.1369624000);
        
SetPlayerFacingAngle(playerid,180.9598);
        
ApplyAnimation(playerid,"CAMERA","camcrch_cmon",4.1,1,1,1,1,1,1);
        
SetPlayerColor(playerid,COLOR_PURPLE);
    }
    else if(
classid == 3)
    {
        
gTeam[playerid] = GROVE;
        
SetPlayerInterior(playerid,3);
        
GameTextForPlayer(playerid,"~g~Grove Street Families",2000,5);
        
ApplyAnimation(playerid,"LOWRIDER""RAP_C_Loop",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,2495.7937,-1711.2596,1014.7422);
        
InterpolateCameraPos(playerid2499.992187, -1704.4291991017.9583122495.894775, -1703.3154291015.7488404000);
        
InterpolateCameraLookAt(playerid2499.214111, -1709.3066401018.7363892495.842529, -1708.2834471015.1863404000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_GREEN);
    }
    else if(
classid == 4)
    {
        
gTeam[playerid] = GROVE;
        
SetPlayerInterior(playerid,3);
        
GameTextForPlayer(playerid,"~g~Grove Street Families",2000,5);
        
ApplyAnimation(playerid,"LOWRIDER""RAP_C_Loop",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,2495.7937,-1711.2596,1014.7422);
           
InterpolateCameraPos(playerid2499.992187, -1704.4291991017.9583122495.894775, -1703.3154291015.7488404000);
        
InterpolateCameraLookAt(playerid2499.214111, -1709.3066401018.7363892495.842529, -1708.2834471015.1863404000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_GREEN);
    }
    else if(
classid == 5)
    {
        
gTeam[playerid] = GROVE;
        
SetPlayerInterior(playerid,3);
        
GameTextForPlayer(playerid,"~g~Grove Street Families",2000,5);
        
ApplyAnimation(playerid,"LOWRIDER""RAP_C_Loop",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,2495.7937,-1711.2596,1014.7422);
        
InterpolateCameraPos(playerid2499.992187, -1704.4291991017.9583122495.894775, -1703.3154291015.7488404000);
        
InterpolateCameraLookAt(playerid2499.214111, -1709.3066401018.7363892495.842529, -1708.2834471015.1863404000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_GREEN);
    }
    else if(
classid == 6)
    {
        
gTeam[playerid] = VAGOS;
        
SetPlayerInterior(playerid,5);
        
GameTextForPlayer(playerid,"~y~Los Santos Vagos",2000,5);
        
ApplyAnimation(playerid,"LOWRIDER""Sit_relaxed",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,2322.8955,-1180.1904,1028.4030);
        
InterpolateCameraPos(playerid2330.416259, -1180.7692871028.6345212323.020751, -1188.9018551028.6345214000);
        
InterpolateCameraLookAt(playerid2325.468505, -1180.4461661027.9906002323.338623, -1183.9378661028.1263424000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_ORANGE);
    }
    else if(
classid == 7)
    {
        
gTeam[playerid] = VAGOS;
        
SetPlayerInterior(playerid,5);
        
GameTextForPlayer(playerid,"~y~Los Santos Vagos",2000,5);
        
ApplyAnimation(playerid,"LOWRIDER""Sit_relaxed",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,2322.8955,-1180.1904,1028.4030);
        
InterpolateCameraPos(playerid2330.416259, -1180.7692871028.6345212323.020751, -1188.9018551028.6345214000);
        
InterpolateCameraLookAt(playerid2325.468505, -1180.4461661027.9906002323.338623, -1183.9378661028.1263424000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_ORANGE);
    }
    else if(
classid == 8)
    {
        
gTeam[playerid] = VAGOS;
        
SetPlayerInterior(playerid,5);
        
GameTextForPlayer(playerid,"~y~Los Santos Vagos",2000,5);
        
ApplyAnimation(playerid,"LOWRIDER""Sit_relaxed",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,2322.8955,-1180.1904,1028.4030);
        
InterpolateCameraPos(playerid2330.416259, -1180.7692871028.6345212323.020751, -1188.9018551028.6345214000);
        
InterpolateCameraLookAt(playerid2325.468505, -1180.4461661027.9906002323.338623, -1183.9378661028.1263424000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_ORANGE);
    }
    else if(
classid == 9)
    {
        
gTeam[playerid] = AZTECA;
        
SetPlayerInterior(playerid,0);
        
GameTextForPlayer(playerid,"~b~~h~Varrios Los Azteca",2000,5);
        
ApplyAnimation(playerid,"GRAVEYARD""mrnF_loop",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,1939.2917,-2061.9709,13.5469);
        
InterpolateCameraPos(playerid1917.295898, -2056.65600514.2085051940.432861, -2055.47534114.5353144000);
        
InterpolateCameraLookAt(playerid1919.270996, -2061.22192314.7091071940.286743, -2060.47216714.4352004000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
    }
    else if(
classid == 10)
    {
        
gTeam[playerid] = AZTECA;
        
SetPlayerInterior(playerid,0);
        
GameTextForPlayer(playerid,"~b~~h~Varrios Los Azteca",2000,5);
        
ApplyAnimation(playerid,"GRAVEYARD""mrnF_loop",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,1939.2917,-2061.9709,13.5469);
        
InterpolateCameraPos(playerid1917.295898, -2056.65600514.2085051940.432861, -2055.47534114.5353144000);
        
InterpolateCameraLookAt(playerid1919.270996, -2061.22192314.7091071940.286743, -2060.47216714.4352004000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
    }
    else if(
classid == 11)
    {
        
gTeam[playerid] = AZTECA;
        
SetPlayerInterior(playerid,0);
        
GameTextForPlayer(playerid,"~b~~h~Varrios Los Azteca",2000,5);
        
ApplyAnimation(playerid,"GRAVEYARD""mrnF_loop",4.1,1,1,1,1,1,1);
        
SetPlayerPos(playerid,1939.2917,-2061.9709,13.5469);
        
InterpolateCameraPos(playerid1917.295898, -2056.65600514.2085051940.432861, -2055.47534114.5353144000);
        
InterpolateCameraLookAt(playerid1919.270996, -2061.22192314.7091071940.286743, -2060.47216714.4352004000);
        
SetPlayerFacingAngle(playerid,252.4717);
        
SetPlayerVirtualWorld(playerid1);
        
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
    } 
So I cant figure out..

1st classid animation isn't working, second working, 3rd too.

But rest of them isn't woring why?
Reply
#2

Try this:
pawn Код:
switch(classid)
{
    ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
    case: 0
    {
        gTeam[playerid] = BALLAS;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
        SetPlayerInterior(playerid, 5);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
        InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
        InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
        SetPlayerFacingAngle(playerid, 180.9598);
        SetPlayerColor(playerid, COLOR_PURPLE);
        ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
    }
    case: 1
    {
        gTeam[playerid] = BALLAS;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
        SetPlayerInterior(playerid, 5);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
        InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
        InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
        SetPlayerFacingAngle(playerid, 180.9598);
        ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_PURPLE);
    }
    case: 2
    {
         gTeam[playerid] = BALLAS;
         SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
        SetPlayerInterior(playerid, 5);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
        InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
        InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
        SetPlayerFacingAngle(playerid, 180.9598);
        ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_PURPLE);
    }
    case: 3
    {
        gTeam[playerid] = GROVE;
        SetPlayerInterior(playerid, 3);
        GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
        ApplyAnimation(playerid, "LOWRIDER", "RAP_C_Loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
        InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
        InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    case: 4
    {
        gTeam[playerid] = GROVE;
        SetPlayerInterior(playerid, 3);
        GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
        SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
        InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
        InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "RAP_C_Loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    case: 5
    {
        gTeam[playerid] = GROVE;
        SetPlayerInterior(playerid, 3);
        GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
        SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
        InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
        InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "RAP_C_Loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    case: 6
    {
        gTeam[playerid] = VAGOS;
        SetPlayerInterior(playerid, 5);
        GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
        ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
        InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
        InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerColor(playerid, COLOR_ORANGE);
    }
    case: 7
    {
        gTeam[playerid] = VAGOS;
        SetPlayerInterior(playerid, 5);
        GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
        SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
        InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
        InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_ORANGE);
    }
    case: 8
    {
        gTeam[playerid] = VAGOS;
        SetPlayerInterior(playerid, 5);
        GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
        SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
        InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
        InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_ORANGE);
    }
    case: 9
    {
        gTeam[playerid] = AZTECA;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
        ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
        InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
        InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerColor(playerid, COLOR_LIGHTBLUE);
    }
    case: 10
    {
        gTeam[playerid] = AZTECA;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
        SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
        InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
        InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_LIGHTBLUE);
    }
    case: 11
    {
        gTeam[playerid] = AZTECA;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
        SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
        InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
        InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_LIGHTBLUE);
    }
}
Reply
#3

Yeah I will try it.. But what I need to do with rest of animations?
Reply
#4

Put them after you set the position and angle...
Reply
#5

Then animation doesn't work at all!
Reply
#6

Try this then:
pawn Код:
switch(classid)
{
    case: 0
    {
        gTeam[playerid] = BALLAS;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
        SetPlayerInterior(playerid, 5);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
        InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
        InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
        SetPlayerFacingAngle(playerid, 180.9598);
        SetPlayerColor(playerid, COLOR_PURPLE);
        ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
    }
    case: 1
    {
        gTeam[playerid] = BALLAS;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
        SetPlayerInterior(playerid, 5);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
        InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
        InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
        SetPlayerFacingAngle(playerid, 180.9598);
        ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_PURPLE);
    }
    case: 2
    {
         gTeam[playerid] = BALLAS;
         SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
        SetPlayerInterior(playerid, 5);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
        InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
        InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
        SetPlayerFacingAngle(playerid, 180.9598);
        ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_PURPLE);
    }
    case: 3
    {
        gTeam[playerid] = GROVE;
        SetPlayerInterior(playerid, 3);
        GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
        ApplyAnimation(playerid, "LOWRIDER", "RAP_C_Loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
        InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
        InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    case: 4
    {
        gTeam[playerid] = GROVE;
        SetPlayerInterior(playerid, 3);
        GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
        SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
        InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
        InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "RAP_C_Loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    case: 5
    {
        gTeam[playerid] = GROVE;
        SetPlayerInterior(playerid, 3);
        GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
        SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
        InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
        InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "RAP_C_Loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_GREEN);
    }
    case: 6
    {
        gTeam[playerid] = VAGOS;
        SetPlayerInterior(playerid, 5);
        GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
        ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
        InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
        InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerColor(playerid, COLOR_ORANGE);
    }
    case: 7
    {
        gTeam[playerid] = VAGOS;
        SetPlayerInterior(playerid, 5);
        GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
        SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
        InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
        InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_ORANGE);
    }
    case: 8
    {
        gTeam[playerid] = VAGOS;
        SetPlayerInterior(playerid, 5);
        GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
        SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
        InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
        InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_ORANGE);
    }
    case: 9
    {
        gTeam[playerid] = AZTECA;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
        ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
        InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
        InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerColor(playerid, COLOR_LIGHTBLUE);
    }
    case: 10
    {
        gTeam[playerid] = AZTECA;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
        SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
        InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
        InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_LIGHTBLUE);
    }
    case: 11
    {
        gTeam[playerid] = AZTECA;
        SetPlayerInterior(playerid, 0);
        GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
        SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
        InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
        InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
        SetPlayerFacingAngle(playerid, 252.4717);
        SetPlayerVirtualWorld(playerid, 1);
        ApplyAnimation(playerid, "GRAVEYARD", "mrnF_loop", 4.1, 1, 1, 1, 1, 1, 1);
        SetPlayerColor(playerid, COLOR_LIGHTBLUE);
    }
}
Reply
#7

Give this a try:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0 .. 2:
        {
            gTeam[playerid] = BALLAS;
            GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
            SetPlayerInterior(playerid, 5);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
            InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
            InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
            SetPlayerFacingAngle(playerid, 180.9598);
            SetPlayerColor(playerid, COLOR_PURPLE);
        }
        case 3 .. 5:
        {
            gTeam[playerid] = GROVE;
            SetPlayerInterior(playerid, 3);
            GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
            SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
            InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
            InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_GREEN);
        }
        case 6 .. 8:
        {
            gTeam[playerid] = VAGOS;
            SetPlayerInterior(playerid, 5);
            GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
            SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
            InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
            InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_ORANGE);
        }
        case 9 .. 11:
        {
            gTeam[playerid] = AZTECA;
            SetPlayerInterior(playerid, 0);
            GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
            SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
            InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
            InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_LIGHTBLUE);
        }
    }
    ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
    return 1;
}
Also make sure you're getting the parameters for ApplyAnimation correctly.
https://sampwiki.blast.hk/wiki/ApplyAnimation
Reply
#8

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Give this a try:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0 .. 2:
        {
            gTeam[playerid] = BALLAS;
            GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
            SetPlayerInterior(playerid, 5);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
            InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
            InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
            SetPlayerFacingAngle(playerid, 180.9598);
            SetPlayerColor(playerid, COLOR_PURPLE);
        }
        case 3 .. 5:
        {
            gTeam[playerid] = GROVE;
            SetPlayerInterior(playerid, 3);
            GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
            SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
            InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
            InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_GREEN);
        }
        case 6 .. 8:
        {
            gTeam[playerid] = VAGOS;
            SetPlayerInterior(playerid, 5);
            GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
            SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
            InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
            InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_ORANGE);
        }
        case 9 .. 11:
        {
            gTeam[playerid] = AZTECA;
            SetPlayerInterior(playerid, 0);
            GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
            SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
            InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
            InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_LIGHTBLUE);
        }
    }
    ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
    return 1;
}
Also make sure you're getting the parameters for ApplyAnimation correctly.
https://sampwiki.blast.hk/wiki/ApplyAnimation
I never thought about what you did there.. I was wasting the lines..
Reply
#9

Now animations are working only --> case 0, case 3 , case 6 and case 9 isn't loading animation!
Reply
#10

Try this:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
    {
        case 0, 1, 2:
        {
            gTeam[playerid] = BALLAS;
            GameTextForPlayer(playerid, "~p~Glen Park Ballas", 2000, 5);
            SetPlayerInterior(playerid, 5);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerPos(playerid, 319.9598, 1122.3853, 1083.8828);
            InterpolateCameraPos(playerid, 316.398437, 1118.319213, 1084.228393, 325.075408, 1118.304809, 1084.258056, 4000);
            InterpolateCameraLookAt(playerid, 319.960632, 1121.827880, 1084.244018, 321.346008, 1121.632934, 1084.136962, 4000);
            SetPlayerFacingAngle(playerid, 180.9598);
            SetPlayerColor(playerid, COLOR_PURPLE);
        }
        case 3, 4, 5:
        {
            gTeam[playerid] = GROVE;
            SetPlayerInterior(playerid, 3);
            GameTextForPlayer(playerid, "~g~Grove Street Families", 2000, 5);
            SetPlayerPos(playerid, 2495.7937, -1711.2596, 1014.7422);
            InterpolateCameraPos(playerid, 2499.992187, -1704.429199, 1017.958312, 2495.894775, -1703.315429, 1015.748840, 4000);
            InterpolateCameraLookAt(playerid, 2499.214111, -1709.306640, 1018.736389, 2495.842529, -1708.283447, 1015.186340, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_GREEN);
        }
        case 6, 7, 8:
        {
            gTeam[playerid] = VAGOS;
            SetPlayerInterior(playerid, 5);
            GameTextForPlayer(playerid, "~y~Los Santos Vagos", 2000, 5);
            SetPlayerPos(playerid, 2322.8955, -1180.1904, 1028.4030);
            InterpolateCameraPos(playerid, 2330.416259, -1180.769287, 1028.634521, 2323.020751, -1188.901855, 1028.634521, 4000);
            InterpolateCameraLookAt(playerid, 2325.468505, -1180.446166, 1027.990600, 2323.338623, -1183.937866, 1028.126342, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_ORANGE);
        }
        case 9, 10, 11:
        {
            gTeam[playerid] = AZTECA;
            SetPlayerInterior(playerid, 0);
            GameTextForPlayer(playerid, "~b~~h~Varrios Los Azteca", 2000, 5);
            SetPlayerPos(playerid, 1939.2917, -2061.9709, 13.5469);
            InterpolateCameraPos(playerid, 1917.295898, -2056.656005, 14.208505, 1940.432861, -2055.475341, 14.535314, 4000);
            InterpolateCameraLookAt(playerid, 1919.270996, -2061.221923, 14.709107, 1940.286743, -2060.472167, 14.435200, 4000);
            SetPlayerFacingAngle(playerid, 252.4717);
            SetPlayerVirtualWorld(playerid, 1);
            SetPlayerColor(playerid, COLOR_LIGHTBLUE);
        }
    }
    ApplyAnimation(playerid, "CAMERA", "camcrch_cmon", 4.1, 1, 1, 1, 1, 1, 1);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)