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
#2

Take a look here

https://sampforum.blast.hk/showthread.php?tid=170545

Would help you..
Reply
#3

Quote:
Originally Posted by fuckingcruse
Посмотреть сообщение
Checked that already.. Not useful as their is no Pause Or Resume thingy's involved
Reply
#4

Try googling some other tutorials.. and show us codes without that , how can you expect help?
Reply
#5

Quote:
Originally Posted by fuckingcruse
Посмотреть сообщение
Try googling some other tutorials.. and show us codes without that , how can you expect help?
Uploaded the script..
Reply
#6

BUMP
Reply
#7

Not sure if that is actually what you need:

https://sampwiki.blast.hk/wiki/NPC:PauseRecordingPlayback
https://sampwiki.blast.hk/wiki/NPC:ResumeRecordingPlayback
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Told you i didnt get it on wiki, So i loved to hear it from a scripter..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)