------- -
Mean - 09.09.2010
-----
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
gamer931215 - 09.09.2010
i think this will fix it (im not sure, i never used animations for myself, but wiki ftw!)
pawn Код:
OnPlayerSpawn(playerid)
{
ClearAnimations(playerid);
}
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
Nero_3D - 09.09.2010
Didnt used animations often, too but I think you need to use
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
and do you know that SetPlayerToTeamColor(playerid); is never called ? (In OnPlayerSpawn)
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
Mean - 09.09.2010
0.0 i used all of this lol
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
Mean - 09.09.2010
Quote:
Originally Posted by Nero_3D
Didnt used animations often, too but I think you need to use
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
and do you know that SetPlayerToTeamColor(playerid); is never called ? (In OnPlayerSpawn)
|
And where is it called then?
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
Nero_3D - 09.09.2010
Quote:
Originally Posted by Mean
And where is it called then?
|
Never because your OnPlayerSpawn code stops before it
The compiler doesnt give the "Unreachable code" error because gTeam[playerid] could be something else than TEAM_ARMY or TEAM_LSPD but that would never happen because you only have two teams
And I dont see that you used
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
Mean - 09.09.2010
Quote:
Originally Posted by Nero_3D
Never because your OnPlayerSpawn code stops before it
The compiler doesnt give the "Unreachable code" error because gTeam[playerid] could be something else than TEAM_ARMY or TEAM_LSPD but that would never happen because you only have two teams
And I dont see that you used
pawn Код:
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
|
I used it scrool up ^^^^^^^^^
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);//It is here||||||||||||||||||||||||
return 1;
}
Re: Problem with animation (please help) |||||||||||||||||||||||||||||||||||||||||||||||||| ||||| -
Nero_3D - 09.09.2010
Quote:
Originally Posted by Mean
I used it scrool up ^^^^^^^^^
|
yes with SPECIAL_ACTION_DANCE2 but I suggested to try it with SPECIAL_ACTION_NONE to stop it afterwards in OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
GameTextForPlayer(playerid, "Welcome to hell", 2000, 6);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); //here I meant
switch(gTeam[playerid])
{
case TEAM_ARMY:
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1553.3546, -1675.4446, 16.1953);
GivePlayerWeapon(playerid, 26, 100);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 30, 300);
SetPlayerColor(playerid, COLOR_BRIGHTRED);
}
case TEAM_LSPD:
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 116.6943, 1933.8201, 18.9704);
GivePlayerWeapon(playerid, 27, 100);
GivePlayerWeapon(playerid, 31, 300);
GivePlayerWeapon(playerid, 35, 2);
SetPlayerColor(playerid, COLOR_BLUE);
}
default:
printf("*** OnPlayerSpawn: Team [%d] not defined!", gTeam[playerid]);
}
return 1;
}
- -
Mean - 09.09.2010
Thanks, it stops looping anim now =)