Animaзгo -
lucasbjs0 - 09.02.2013
Aew Galera Tava Aki Tentando Colocar Um Anim No meu sistema de roubos Mais o Problema e que Nгo Esta reproduzindo a animaзгo ate o fim do roubo a gente so digitar /roubar e a animaзгo da dois loop e para!
Vo Mandar o Anim.
PHP Code:
ApplyAnimationEx(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 0, 1, 0);
e Agora o Comando /Roubar
PHP Code:
if(strcmp(cmd,"/roubar",true)==0)
{
if(PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
&& PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
&& PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
&& PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
&& PlayerInfo[playerid][pMembro] != 19 && PlayerInfo[playerid][pLider] != 19
&& PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20
&& PlayerInfo[playerid][pMembro] != 21 && PlayerInfo[playerid][pLider] != 21
&& PlayerInfo[playerid][pMembro] != 22 && PlayerInfo[playerid][pLider] != 22
&& PlayerInfo[playerid][pMembro] != 23 && PlayerInfo[playerid][pLider] != 23
&& PlayerInfo[playerid][pMembro] != 24 && PlayerInfo[playerid][pLider] != 24
&& GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 8
&& GetPlayerOrg(playerid) != 9 && GetPlayerOrg(playerid) != 12
&& GetPlayerOrg(playerid) != 13 && GetPlayerOrg(playerid) != 15
&& GetPlayerOrg(playerid) != 26 && GetPlayerOrg(playerid) != 29)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar !");
return true;
}
if(roubando[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
return true;
}
if(PlayerToPoint(2.0,playerid, 2144.4177,1641.5360,993.5761))
{
if(roubobanco == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
return true;
}
if(temporoubobanco == 1)
{
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do banco espere 3 minutos para roubar de novo !");
return true;
}
if (PlayerInfo[playerid][pDinamite] == 0)
{
SendClientMessage(playerid, COR_VAGOS, "Vocк nгo Possui Dinamites Para Roubar!");
return 1;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
SendClientMessageToAll(COLOR_WHITE, "(=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=({FFD700}Assalto ao Banco{BFC0C2})=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)");
format(string, sizeof(string), "%s e os %s estгo tentando roubar o cofre banco! ID:[%d]", playername, NomeORG(playerid) , playerid);
SendClientMessageToAll(GetPlayerColor(playerid), string);
SendClientMessage(playerid, COLOR_GRAD5, "Espere 90 Segundos para terminar de roubar o banco.");
CreateExplosion(2306.5127,-6.1166,26.7422, 12, 10.0);
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
roubando[playerid] = 1;
ProvocoBanco[playerid] = 1;
roubobanco = 1;
temporoubobanco = 1;
SetTimer("Aroubo", 220000, 0);
PlayerInfo[playerid][pDinamite] -= 1;
tempobanco = SetTimerEx("RouboBanco", 90000, 0, "i", playerid);
SetTimerEx("AnimRouboBanco", 900, 0, "i", playerid);
ApplyAnimationEx(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 0, 1, 0);
SetPlayerAttachedObject(playerid, 0, 1550, 1, 0.000000, -0.313611, 0.021003, 0.445490, 86.754409, 355.370239, 0.926815, 1.000000, 1.000000);
SetTimerEx("AcabarMochila", 100000, 0, "i", playerid);
TempoContagem[playerid] = SetTimerEx("ContagemHospital", 1000, 1, "i", playerid);
Contagem[playerid] = 88;
GetPlayerHealth(playerid, Health_Roubo);
SetPlayerHealth(playerid, 99999999);
SetTimerEx("DarLife", 3000, false, "i", playerid);
return 1;
}
Re: Animaзгo -
davi54723 - 09.02.2013
Code:
ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 0, 1, 0);
Caso nгo for coloque no topo do seu Gamemode:
pawn Code:
static animLibName[MAX_PLAYERS][2][32];
ApplyPlayerAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0) {
ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync);
forcesync = 1;
ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync);
format(animLibName[playerid][0], 32, animlib );
format(animLibName[playerid][1], 32, animname );
return SetTimerEx("PlayerSetAnimation", 273, false, "ifdddddd", playerid, fDelta, loop, lockx, locky, freeze, time, forcesync);
}
PlayerSetAnimation(playerid, Float:fDelta, loop, lockx, locky, freeze, time, forcesync) ;
public PlayerSetAnimation(playerid, Float:fDelta, loop, lockx, locky, freeze, time, forcesync) {
return ApplyAnimation(playerid, animLibName[playerid][0], animLibName[playerid][1], fDelta, loop, lockx, locky, freeze, time, forcesync);
}
#define ApplyAnimation ApplyPlayerAnimation
Crйditos do cуdigo acima IpsBruno!
Re: Animaзгo -
ViniBorn - 09.02.2013
Jб tentou usar apenas ApplyAnimation ?
Re: Animaзгo -
lucasbjs0 - 09.02.2013
Quote:
Originally Posted by Viniborn
Jб tentou usar apenas ApplyAnimation ?
|
Eu Usava ApplyAnimation Mais ficava bugado pq as vezes a animaзгo nгo funcionava! Agora eu Estou Usando a Funзгo de ApplyAnimationEx Que Funciona legal mais o problema e que nun esta repetindo a animaзгo ela so funciona uma vez e para!
Re: Animaзгo -
lucasbjs0 - 09.02.2013
Acho Que Ja Concertei Mais Vlw aew!