[HELP] Problem with ApplyAnimation.
#1

Hi. I got this problem: when i talk i can see myself doing the animation, but i cant see others players doing the animation, also they cant see me doing the animation either. Any ideas?
The code:
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
    new Length = strlen(text);
    new aTime = Length*100;
    ApplyAnimation(playerid,"PED","IDLE_CHAT",4.1,1,1,0,0,aTime);
}

BTW, another problem here:

I want to remove players weapon by giving him that weapon with 0 ammo, i tried this code:

pawn Код:
new wID = GetPlayerWeapon(playerid);
GivePlayerWeapon(playerid,wID,0);
But it doesnt work.

Thanks in advice!
Reply
#2

Look at the wiki it will tell you the right syntax, there's a parameter called forcesync. Hook it up.
Reply
#3

Quote:
Originally Posted by _rAped
Посмотреть сообщение
Look at the wiki it will tell you the right syntax, there's a parameter called forcesync. Hook it up.
the sync is only for 0.3b, im using 0.3c
Reply
#4

Quote:
Originally Posted by Universal
Посмотреть сообщение
the sync is only for 0.3b, im using 0.3c
Look at the wiki.
Reply
#5

Quote:
Originally Posted by _rAped
Посмотреть сообщение
Look at the wiki.
i really did.
Reply
#6

this is what it says
Код:
This function has been modified in SA-MP 0.3b. Documentation for the 0.3b version is below.
so i understand that its not capable in 0.3c ?
Reply
#7

well, any ideas how to fix this??
Reply
#8

Look at the wiki.

pawn Код:
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync);
Reply
#9

Ok thanks i will try, but:

BTW, another problem here:

I want to remove players weapon by giving him that weapon with 0 ammo, i tried this code:

pawn Code:

new wID = GetPlayerWeapon(playerid);
GivePlayerWeapon(playerid,wID,0);

But it doesnt work.
Reply
#10

1) Give the whole code.

2)
pawn Код:
stock RemovePlayerWeapon(playerid, weaponid)
{
    new pWeap[12], pAmmo[12];
    for(new slot = 0; slot != 12; slot++)
    {
        new wep, ammo;
        GetPlayerWeaponData(playerid, slot, wep, ammo);
        if(wep != weaponid) GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot]);
    }
    ResetPlayerWeapons(playerid);
    for(new slot = 0; slot != 12; slot++) GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot]);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)