Sample script of..
#1

i need a sample script..

I actually made an Driving NPC and i want to pause the npc i looked through wiki but no use and i want when a player gets in this NPC's car passenger seat the npc resumes...

Thanks in advance,

Whole Script:

Код:
    #include <a_samp>
    #include <a_npc>

    new Taxicar1; // The name of your vehicle


    public OnGameModeInit()
    {
            ConnectNPC("Taxi1","Taxi1"); // The name of your NPC and the record. The record need to match an record with the same name. The NPC name can be anything
        Taxicar1 = AddStaticVehicle(420,1638.7864,-2314.6626,13.2513,89.9884,6,1);  // Creating your vehicle, this can be done ingame by typing /save. Then go to your SA-MP folder and find the folder "savedpositions"

            return 1;
    }
    public OnPlayerSpawn(playerid)
    {
        if(!IsPlayerNPC(playerid)) return 0; // If the player is not a NPC, nothing will happend

            new playername[64]; //Player String
            Getplayername(playerid,playername,64); //This is to get the NPC's name

            if(!strcmp(playername, "Taxi1", true)) { // Detecting if the NPC is spawned. If it is not spawned or the name is wrong, nothing will happend
                            SetSpawnInfo( playerid, 0, 255, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );
                //SetSpawnInfo( playerid, Team, Skin, x, y, z, rotation, weapon1, ammo for weapon1, w2, ammo2, w3, ammo3 );
                SetPlayerColor(playerid,0xFFFFFFFF); // Chose any color you want, this is currently white
            PutPlayerInVehicle(playerid, Taxicar1, 0);

	    }
        return 1;
    }
Reply


Messages In This Thread
Sample script of.. - by Clergy - 22.04.2015, 15:04
Re: Sample script of.. - by fuckingcruse - 22.04.2015, 15:14
Re: Sample script of.. - by Clergy - 22.04.2015, 15:16
Re: Sample script of.. - by fuckingcruse - 22.04.2015, 15:26
Re: Sample script of.. - by Clergy - 22.04.2015, 15:34
Re: Sample script of.. - by Clergy - 23.04.2015, 13:15
Re: Sample script of.. - by Konstantinos - 23.04.2015, 13:18
Re: Sample script of.. - by Clergy - 23.04.2015, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)