[Ajuda] NPC ou ActorS?
#5

Quote:
Originally Posted by Mnnny
Посмотреть сообщение
Tipo, tem como eu colocar um Actor com uma msg sobre ele ?
https://sampforum.blast.hk/showthread.php?tid=573408

Код:
CMD:criaractor(playerid, params[]) {
    if(!IsPlayerAdmin(playerid)) return 0;
    new skin_actor, Nome[32];
    if(sscanf(params, "is[32]", skin_actor, Nome)) return SendClientMessage(playerid, -1, "{FF0000}Use: /criaractor [skin id] [nome]");
    if(skin_actor < 0 || skin_actor > 311) return SendClientMessage(playerid, -1, "{FF0000}O id й invбlido!");
    new Float:pP[4], Msg[144], Actorid;
    GetPlayerPos(playerid, pP[0], pP[1], pP[2]);
    GetPlayerFacingAngle(playerid, pP[3]);
    Actorid = CreateActor(skin_actor, pP[0], pP[1], pP[2], pP[3]);
    if(!IsValidActor(Actorid)) return SendClientMessage(playerid, -1, "{FF0000}Ocorreu um erro. Provavelmente o mбximo de actors foi atingido!");
    ActorData[Actorid][ActorSkin] = skin_actor;
    format(ActorData[Actorid][ActorNome], 32, Nome);
    format(Msg, 144, "{FFFF00}Actor id: %i (Skin: %i) (Nome: %s)", Actorid, skin_actor, Nome);
    SendClientMessage(playerid, -1, Msg);
    SetActorVirtualWorld(Actorid, GetPlayerVirtualWorld(playerid));
    format(Msg, 144, "%s (%i)", Nome, Actorid);
    ActorData[Actorid][ActorLabel] = Create3DTextLabel(Msg, 0xFFFF00AA, pP[0], pP[1], pP[2] + 1.0, 30.0, GetPlayerVirtualWorld(playerid));
    SetPlayerPos(playerid, pP[0] + 1.0, pP[1] + 1.0, pP[2]);
    return 1;
}
Crйditos ao NicK_ .
Reply


Messages In This Thread
NPC ou ActorS? - by Mnnny - 20.09.2015, 00:21
Re: NPC ou ActorS? - by n0minal - 20.09.2015, 00:29
Re: NPC ou ActorS? - by Mnnny - 20.09.2015, 00:44
Re: NPC ou ActorS? - by n0minal - 20.09.2015, 01:29
Re: NPC ou ActorS? - by MacMillan_ - 20.09.2015, 01:31

Forum Jump:


Users browsing this thread: 1 Guest(s)