30.04.2017, 15:59
Criando actors com animaзгo (nгo sei se jб postei)
Exemplos de Uso
PHP код:
// Utilizando nativa
stock CreateActorEx(skinid, Float:x, Float:y, Float:z, Float:rot, virtualworld = 0, bool:invuneravel = true, animlib[] = "", animname[] = "", Float:fDelta = 4.0, loop = 1, lockx = 0, locky = 0, freeze = 0, time = 0) {
static actorid; actorid = CreateActor(skinid, x, y, z, rot);
if(IsValidActor(actorid)) {
SetActorVirtualWorld(actorid, virtualworld);
SetActorInvulnerable(actorid, invuneravel);
ApplyActorAnimation(actorid, animlib, animname, fDelta, loop, lockx, locky, freeze, time);
}
return actorid;
}
// Utilizando streamer
stock CreateDynamicActorAnim(skinid, Float:x, Float:y, Float:z, Float:r, w = -1, bool:inv = true, animlib[] = "", animname[] = "", Float:fD = 4.0, loop = 0, lx = 0, ly = 0, freeze = 0, time = 0, Float:h = 100.0) {
static actorid; actorid = CreateDynamicActor(skinid, x, y, z, r, inv, h, w);
if(IsValidDynamicActor(actorid)) {
ApplyDynamicActorAnimation(actorid, animlib, animname, fD, loop, lx, ly, freeze, time);
}
return actorid;
}
PHP код:
// Caso vocк use as nativas
new MeuActor = CreateActorEx(299, 0.0, 0.0, 3.0, 90.0, _, _, "PED", "SEAT_idle", 1.0, 1, 0, 0, 0, 0);
// Caso use streamer v2.9++
new ActorDyn = CreateDynamicActorAnim(311, 10.0, 5.0, 3.0, 180.0, _, _, "PED", "SEAT_idle", 1.0, 1, 0, 0, 0, 0);