wow! thanks for that it's in now and i'm going to test, the code i got now is:
function GameLoad ()
ped = createPed(0,0,0,10)
local x,y,z = getElementPosition(player);
local tx,ty,tz = getElementPosition(ped);
setPedRotation(ped, findRotation(x,y,tx,ty) );
setPedAnimation(ped, "ped", "WALK_old", 0, 1, 1, 0)
setTimer ( SetPedRot, 1000, 0, ped , player )
end
addEventHandler ( "onResourceStart", getRootElement(), GameLoad )
function SetPedRot( ped , player)
local x,y,z = getElementPosition(player);
local tx,ty,tz = getElementPosition(ped);
setPedRotation(ped, findRotation(x,y,tx,ty) );
end
so i got a repeating time that sets the rotation of the ped to the player so the ped is following the player
i'm making a zombie game just for fun as the npcs are a bit messed up on sa-mp