[Help] How to spawn a NPC by cmd
#1

Ok from the title I think you get the ideea ... I want to spawn a NPC using a cmd like /npcspawn.

Here is the ideea:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/npcspawn", true)==0)
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        SetPlayerPos(What to do here??, x, y, z);
        SetPlayerSkin(What to do here??,171);

    }
    return 0;
}
Or something like that... to spawn the NPC on my position or at a coordonate... but dont know how to name the NPC id
Reply
#2

No one knows ?
Reply
#3

you could use ConnectNPC with a command
BUT..
Asuming the npc already excists ingame and you want it somewhere else with a command then i suggest
beginning to make an npc without any recording.
Reply
#4

Yeah but lets say the server has 54 persons online, and I use the cmd to spawn the npc, and the npc wasn't on the server...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)