SA-MP Forums Archive
Bot - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bot (/showthread.php?tid=508338)



Bot - Ananisiki - 21.04.2014

Hi i have question, i need return 1; after each or just the end


pawn Код:
if(IsPlayerNPC(playerid))
    {
        new NPCName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, NPCName, sizeof NPCName);
        if(!strcmp(NPCName, "Dragan", true))
        {
            PutPlayerInVehicle(playerid, Dragancheetah, 0);
        }
        if(!strcmp(NPCName, "Kyrko", true))
        {
            GivePlayerWeapon(playerid, 38, 5000);
            SetPlayerSkin(playerid, 32);
        }
        if(!strcmp(NPCName, "Petrovich", true))
        {
            SetPlayerSkin(playerid, 109);
        }
        return 1;
    }



Re: Bot - Blast3r - 21.04.2014

Just the end would be enough


Re: Bot - Bingo - 21.04.2014

Just at end.

Edit:- You beat me! :@ ^^^


Re: Bot - Ananisiki - 21.04.2014

Ok thxx but the Kyrko giveplayerweapon dont work, why


Re: Bot - Bingo - 21.04.2014

Quote:
Originally Posted by Ananisiki
Посмотреть сообщение
Ok thxx but the Kyrko giveplayerweapon dont work, why
Sorry, i didn't get, Show us the codes.


Re: Bot - Ananisiki - 21.04.2014

pawn Код:
if(!strcmp(NPCName, "Kyrko", true))
        {
            GivePlayerWeapon(playerid, 38, 5000); // not work
            SetPlayerSkin(playerid, 32);
        }



Re: Bot - Ananisiki - 23.04.2014

Bump


Re: Bot - Ari - 23.04.2014

GivePlayerWeapon doesn't work with NPC's.

You must record the NPC file equipping the weapon you want.


Re: Bot - Ananisiki - 23.04.2014

I done that but it dont work