anim's not working, only id 0 spectating? -
Seven. - 09.01.2011
Nobody will do the animation when this get's called.. and only id 0 will be spectating
Hope someone can help me
pawn Код:
EndTheGame(WinID)
{
PlaySoundForAll(1183);
if(WinID == team1)
{
GameTextForAll("~b~team1 win the game!",5000, 5);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == team1)
{
ApplyAnimation(i, "DANCING", "dance_loop", 4.0, 1, 0, 0, 0, 0);
}
else if(gTeam[i] == team2)
{
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
}
}
else if(WinID == team2)
{
GameTextForAll("~r~team 2 win the game!",5000, 5);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i] == team2)
{
ApplyAnimation(i, "DANCING", "dance_loop", 4.0, 1, 0, 0, 0, 0);
}
else if(gTeam[i] == team1)
{
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
}
}
SetTimer("Spectate",10000, false);
}
pawn Код:
public Spectate()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerSpectating(i, true);
}
}
}
}
Re: anim's not working, only id 0 spectating? -
blackwave - 09.01.2011
pawn Код:
public Spectate()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TogglePlayerSpectating(i, true);
}
}
return 1;
}
Your SetTimer will work just 10sec after that action, though. Since it's 10000. You had to wait 10sec.
Re: anim's not working, only id 0 spectating? -
Seven. - 09.01.2011
Thanks allot, Do you know the mistake of the animation to?
Re: anim's not working, only id 0 spectating? -
alpha500delta - 09.01.2011
Anims bug sometimes... Put them in the script 2 times, works with me
Re: anim's not working, only id 0 spectating? -
Seven. - 09.01.2011
Ok, i also discovered that the spectating still only works for id 0 :S
Re: anim's not working, only id 0 spectating? -
ғαιιοцт - 09.01.2011
https://sampwiki.blast.hk/wiki/PlayerSpectatePlayer
would also need to be used?
and for the animations, first set player controllable to false, and then it should work better
https://sampwiki.blast.hk/wiki/TogglePlayerControllable
who do you want the players to spectate?
Re: anim's not working, only id 0 spectating? -
Seven. - 09.01.2011
They should spectate nobody. Just look at the river xD
Re: anim's not working, only id 0 spectating? -
ғαιιοцт - 09.01.2011
then use SetPlayerCameraPos and SetPlayerCameraLookat
Re: anim's not working, only id 0 spectating? -
Seven. - 09.01.2011
Yes but when you have nobody to spectate it will just simply look at the bridge.
Re: anim's not working, only id 0 spectating? -
ғαιιοцт - 09.01.2011
oh yes I see what you want