Setar animaзгo ao usar certa skin -
bombomloko - 27.12.2013
Como faz pra quando o player troca pra uma certa skin, setar certa animaзгo?
Ex.:
Eu quero colocar pra setar a animaзгo de patins quando o player coloca as skins 92 ou 99 (patinadores)

As animaзхes de corrida leve de patins e corrida rбpida com patins sгo:
pawn Код:
ApplyAnimation(playerid,"SKATE","skate_run",4.0,1,1,1,1,500);
ApplyAnimation(playerid,"SKATE","skate_sprint",4.0,1,1,1,1,500);
Re: Setar animaзгo ao usar certa skin -
Tugamars - 27.12.2013
Nгo sei , mas talvez algo deste gйnero .
pawn Код:
forward Patinadores(playerid);
public Patinadores(playerid)
{
new skin[MAX_PLAYERS];
skin = GetPlayerSkin(playerid);
if(skin[playerid] == 92) return ApplyAnimation(playerid,"SKATE","skate_run",4.0,1,1,1,1,500);
if(skin[playerid] == 99) return ApplyAnimation(playerid,"SKATE","skate_sprint",4.0,1,1,1,1,500);
}
SetTimerEx("Patinadores", 100, true, "i", playerid);
Nгo tenho a certeza nem testei .
@Corrigido , vlw PT
Re: Setar animaзгo ao usar certa skin -
PT - 27.12.2013
pawn Код:
SetTimerEx("Patinadores", 100, true, "i", playerid);
forward Patinadores(playerid);
public Patinadores(playerid)
{
switch(GetPlayerSkin(playerid))
{
case 92: ApplyAnimation(playerid,"SKATE","skate_run",4.0,1,1,1,1,500);
case 99: ApplyAnimation(playerid,"SKATE","skate_sprint",4.0,1,1,1,1,500);
}
return 1;
}
@ tuga olha melhor o teu settimer...
Re: Setar animaзгo ao usar certa skin -
bombomloko - 27.12.2013
Й quase isso amigos, sу que nгo era pra setar uma animaзгo pra uma skin e outra animaзгo pra outra skin, era pra ser tipo, a animaзгo de "skate_run" setar quando o player ta correndo sem usar a tecla espaзo, e a "skate_sprint" setar quando ele estб correndo com a tecla espaзo, em ambas skins.
Re: Setar animaзгo ao usar certa skin -
LucaAllexandre - 27.12.2013
й so usar OnPlayerKeyState (Acho que й esse o nome)
ai vc pega o nome da animaзгo de correr, lб na wiki. e faz:
Ao botгo x ser apertado executar tal animaзгo.
Mas nгo se esqueзa de verificar as skins. o PT Fez ai o switch dele..
essa й minha lуgica, nгo vo codar, pq to em otro pc e й muito ruim aqui.
LINKS:
https://sampwiki.blast.hk/wiki/Animations
https://sampwiki.blast.hk/wiki/Keys
espero ter ajudado!
Re: Setar animaзгo ao usar certa skin -
bombomloko - 27.12.2013
Quote:
Originally Posted by Diksplay
й so usar OnPlayerKeyState (Acho que й esse o nome)
ai vc pega o nome da animaзгo de correr, lб na wiki. e faz:
Ao botгo x ser apertado executar tal animaзгo.
Mas nгo se esqueзa de verificar as skins. o PT Fez ai o switch dele..
essa й minha lуgica, nгo vo codar, pq to em otro pc e й muito ruim aqui.
LINKS:
https://sampwiki.blast.hk/wiki/Animations
https://sampwiki.blast.hk/wiki/Keys
espero ter ajudado! 
|
entгo, ficaria assim?
pawn Код:
if(newkeys & KEY_UP)
{
switch(GetPlayerSkin(playerid))
{
case 92: ApplyAnimation(playerid,"SKATE","skate_run",4.0,1,1,1,1,500);
case 99: ApplyAnimation(playerid,"SKATE","skate_run",4.0,1,1,1,1,500);
}
}
if(newkeys & KEY_SPRINT)
{
switch(GetPlayerSkin(playerid))
{
case 92: ApplyAnimation(playerid,"SKATE","skate_sprint",4.0,1,1,1,1,500);
case 99: ApplyAnimation(playerid,"SKATE","skate_sprint",4.0,1,1,1,1,500);
}
}
deu certo desse jeito, agora, pra ele ficar na animaзгo "skate_idle" quando estб PARADO, sem se mover, como faz?