potřeboval bych pomoc jak dostat NPC do auta mám na recordingovaný vše atd ... npc mi chodí ale aby jezdilo v autě to ne potřeboval bych právě pomoct kde je ta chyba ono mi to píše že je to bez chyby jinak když se připojim tak npc stojí jen na spawnu a neni v autě kde jsem recordingoval
//-------------------------------------------------
//
// NPC initialisation for Grand Larceny
//
//-------------------------------------------------
#pragma tabsize 0
#include <a_samp>
new ee;
//-------------------------------------------------
public OnFilterScriptInit()
{
//ConnectNPC("TrainDriverLV","train_lv");
//ConnectNPC("TrainDriverLS","train_ls");
//ConnectNPC("TrainDriverSF","train_sf");
//ConnectNPC("PilotLV","at400_lv");
ee=ConnectNPC("testbot","ahoj");
//ConnectNPC("PilotSF","at400_sf");
//ConnectNPC("PilotLS","at400_ls");
// Testing
//ConnectNPC("Jumper1","onfoot_test");
//ConnectNPC("DriverTest2","driver_test2");
//ConnectNPC("DriverTest3","driver_test3");
}
//-------------------------------------------------
// IMPORTANT: This restricts NPCs connecting from
// an IP address outside this server. If you need
// to connect NPCs externally you will need to modify
// the code in this callback.
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) {
new ip_addr_npc[64+1];
new ip_addr_server[64+1];
GetServerVarAsString("bind",ip_addr_server,64);
GetPlayerIp(playerid,ip_addr_npc,64);
if(!strlen(ip_addr_server)) {
ip_addr_server = "10.0.0.8";
}
if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {
// this bot is remote connecting
printf("NPC: Got a remote NPC connecting from %s and I'm kicking it.",ip_addr_npc);
Kick(playerid);
return 0;
}
printf("NPC: pripojeni z %s je povoleno.",ip_addr_npc);
}
return 1;
}
//-------------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
if(!IsPlayerNPC(playerid)) return 0; // We only deal with NPC players in this script
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"testbot",true)) {
PutPlayerInVehicle(ee,250,0);
SetSpawnInfo(playerid,69,255,1462.0745,2630.8787,10.8203,0.0,-1,-1,-1,-1,-1,-1);
}
return 0;
}
//-------------------------------------------------
//-------------------------------------------------
public OnPlayerSpawn(playerid)
{
ee=PutPlayerInVehicle(playerid,265,0);
}
//-------------------------------------------------
// EOF
Dotaz
PowerCZ 0
potřeboval bych pomoc jak dostat NPC do auta mám na recordingovaný vše atd ... npc mi chodí ale aby jezdilo v autě to ne potřeboval bych právě pomoct kde je ta chyba ono mi to píše že je to bez chyby jinak když se připojim tak npc stojí jen na spawnu a neni v autě kde jsem recordingoval
Link to comment
Share on other sites
2 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now