їPor que la primera ves no se ve la animacion?
#1

Hola їCiudadanos de forum samp? , en fin, Tengo un problema, tengo un job de minero en el cual a la hora de minar , la primera ves que hacen click en la posicion para minar no se ve la animacion pero termina dandole la piedra..(Ejecutando las otras funciones), Les dejare el codigo de onplayerkeystatechange y el stock para que vean que puede ser:

pawn Код:
if(newkeys == 4)
    {
    if(GetPVarInt(playerid,"Trabajando") == 1)
    {
    if(GetPVarInt(playerid,"EntregandoEscombros") == 0)
    {
    GoMinerDob(playerid);
    return 1;
    }
    }
    }
STOCK:
pawn Код:
stock GoMinerDob(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, -1763.5941,-1610.6669,22.3242)) // #1 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1778.5166,-1603.9552,21.7769)) // #2 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1785.5968,-1598.1969,24.4882)) // #3 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1798.0114,-1592.3922,26.8688)) // #4 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1810.9763,-1589.6498,28.3392)) // #5 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1817.1907,-1595.2559,21.7564)) // #6 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1819.3347,-1587.7004,31.1699)) // #7 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1825.1913,-1578.8744,31.2846)) // #8 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1831.9711,-1586.9738,22.8931)) // #9 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1851.2284,-1565.3884,29.9624)) // #10 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1837.8835,-1571.1504,28.8614)) // #11 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1863.9000,-1565.9049,24.6525)) // #12 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1871.2863,-1547.3298,27.6689)) // #13 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1887.5006,-1538.0570,30.0058)) // #14 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, -1895.8088,-1533.2218,21.7500)) // #15 Checkpoint
{
ApplyAnimation(playerid,"SWORD","sword_4",4.1,1,1,1,0,0);
SetPVarInt(playerid,"EntregandoEscombros",1);
SetTimerEx("minertimer",5000,0,"%d",playerid);
return 1;
}
return 1;
}
Saludos
Reply
#2

Es porque la anim no se ha cargado antes, entonces la primera vez se carga (no aparece), y a partir de ahн sн aparecerб. Para cargar anims antes de usarlas puedes usar PreloadAnimLib para cargar la librerнa de anims que contiene la anim que tu quieres (en este caso serнa "PreloadAnimLib(playerid,"SWORD");").
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=285665
Reply
#4

Muchas Gracias , es algo que yo no sabia , cada dia aprendo mas
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)