22.04.2015, 15:04
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:
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; }