CHANGE walk style - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CHANGE walk style (
/showthread.php?tid=651219)
CHANGE walk style -
Zeus666 - 16.03.2018
Код:
public OnZombieRoam()
{
for(new npcid = 0; npcid < MAX_ZOMBIES; npcid++)
{
if(IsPlayerNPC(npcid))
{
if(GetRNPCHealth(npcid) > 0)
{
new victim = GetZombieVictim(npcid), Float:x, Float:y, Float:z;
GetPlayerPos(npcid, x, y, z);
if(victim == INVALID_PLAYER_ID)
{
new pos = random(4);
if(pos == 0) { x = x + 100.0; }
else if(pos == 1) { x = x - 100.0; }
else if(pos == 2) { y = y + 100.0; }
else if(pos == 3) { y = y - 100.0; }
GetZombieVictimID[npcid] = INVALID_PLAYER_ID;
RNPC_SetKeys(0);
MoveRNPC(npcid, x, y, z, RNPC_SPEED_WALK, 1);
}
}
}
}
return 1;
}
I want to change RNPC_SPEED_WALK into walk_old
Can you help me how ?
Re: CHANGE walk style -
NaS - 16.03.2018
From my knowledge you can only change the walking/running/sprinting speed, and not the type of animation (for example, a grandma skin walking like an old lady).
This is controlled by UsePlayerPedAnims(), this will not only apply the "CJ Run" to your skin, but to all other Players/NPCs as well (that's why it's a global setting).
The only way would be using Animations, so you'd move the NPC from A to B and apply an animation at the same time. I'm not sure how well that works though.