/getallnpc
#1

Hello people,

I have the dayz closed source zombie script and i just love to kill the zombies because it has the best zombie npc's in samp.

So i want a command /getallnpc wich will teleport every npc to me but a bit infront of me so i wont get gangbanged. basicly i want this so me and my friend can just have fun and kill these npc's. i was wondering if this is possible and if you could make this for me in a filterscript. there are 125 zombies npc's in totall.

thanks!
Reply
#2

Use ZCMD for this or convert it to whatever you're using.
pawn Код:
CMD:getallnpc(playerid, params)
{
    new DetectX, DetectY, Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerNPC(i))
        {
            if(DetectX > DetectY)
            {
                DetectY++;
                SetPlayerPos(i, pos[0], pos[1] + DetectY, pos[2]);
            }
            else if(DetectX < DetectY)
            {
                DetectX++;
                SetPlayerPos(i, pos[0] + DetectX, pos[1], pos[2]);
            }
            else
            {
                DetectY++;
                SetPlayerPos(i, pos[0] + DetectX, pos[1] + DetectY, pos[2]);
            }
        }
    }
    return 1;
}
Reply
#3

nothing happens...
Reply
#4

i made it

pawn Код:
if (strcmp("/getallnpc", cmdtext, true, 10) == 0)
    {
    new DetectX, DetectY, Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerNPC(i))
        {
            if(DetectX > DetectY)
            {
                DetectY++;
                SetPlayerPos(i, pos[0], pos[1] + DetectY, pos[2]);
            }
            else if(DetectX < DetectY)
            {
                DetectX++;
                SetPlayerPos(i, pos[0] + DetectX, pos[1], pos[2]);
            }
            else
            {
                DetectY++;
                SetPlayerPos(i, pos[0] + DetectX, pos[1] + DetectY, pos[2]);
            }
        }
    }
    return 1;
}
Reply
#5

anyone help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)