Npc With Player In One Car
#2

pawn Код:
new PickupNPC;
new BotVehicle;

public OnGameModeInit()
{
    ConnectNPC("YourBotName", "YourRecordName");
    BotVehicle = CreateVehicle(405, 0, 0, 0, 0, -1, -1, 0);

    PickupNPC = CreatePickup((YourPickupModel YourPickupType, X, Y, Z, -1);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "YourBotName", true))
        {
            PutPlayerInVehicle(playerid, BotVehicle, 0);
        }
    }
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == PickupNPC)
    {
        PutPlayerInVehicle(playerid, BotVehicle, 1);
    }
    return 1;
}
YourPickupModel > https://sampwiki.blast.hk/wiki/Game_Object_ID_List
YourPickupType > https://sampwiki.blast.hk/wiki/PickupTypes
Reply


Messages In This Thread
Npc With Player In One Car - by wheelman_WM - 11.03.2011, 03:50
Re : Npc With Player In One Car - by Shoko Lacho - 11.03.2011, 04:21
Re: Npc With Player In One Car - by wheelman_WM - 11.03.2011, 04:33
Re : Npc With Player In One Car - by Shoko Lacho - 11.03.2011, 04:40
Re: Npc With Player In One Car - by wheelman_WM - 11.03.2011, 08:32
Re: Npc With Player In One Car - by Roomeo - 11.03.2011, 09:59
Re: Npc With Player In One Car - by [WF]Demon - 11.03.2011, 10:20
Re: Npc With Player In One Car - by Roomeo - 11.03.2011, 10:34
Re: Npc With Player In One Car - by wheelman_WM - 11.03.2011, 12:10
Re: Npc With Player In One Car - by wheelman_WM - 11.03.2011, 14:22

Forum Jump:


Users browsing this thread: 1 Guest(s)