Jump to content

hledám NPC vlak


michalpta

Recommended Posts

Dobrý den, Chtěl bych na server NPC train(aby vlak jezdil mezi mesty sam) a zrůzných návodů na internetu to vytváření nemůžu pochopit 

:( a chtěl bych tedy tento FS udělat. Vím že musí být NPC record atd... ale SA-MP Hraju 5 a neco let a nikdy jsem ty NPC nepochopil .

Tak prosím o pomoc Děkuji......

Link to comment
Share on other sites

Jo moc díky :) a můžu se jen tak zeptat jdou stahnout npc nahravky lidi aby chodili po ulicich kdyz by se zabili vypadli by z nich prachy atd...Ale to by asi bylo velmi složité nebo ani nereálné nwm.

Link to comment
Share on other sites

Jo moc díky :) a můžu se jen tak zeptat jdou stahnout npc nahravky lidi aby chodili po ulicich kdyz by se zabili vypadli by z nich prachy atd...Ale to by asi bylo velmi složité nebo ani nereálné nwm.

pokud myslíš zabít npc tak to nejde. npc nemá život. (no lifer) ne joke :d u npc bys musel kontrolovat jestli donej hráč střilí a ubírat hpčka z proměné a pak jenom dát animaci smrti. 

Link to comment
Share on other sites

Ne tam jsou recordings

a ja na to chci jeden rec.

jeden rec je jedna nahravka pro npc. a mám takový pocit že nedáš víc nahravek do jednoho rec. fakt nevím ale myslím si že ne.

Link to comment
Share on other sites

gl_npcs

a připojí to tyto npcčka:

        ConnectNPC("TrainDriverLV","train_lv");
	ConnectNPC("TrainDriverLS","train_ls");
	ConnectNPC("TrainDriverSF","train_sf");
	ConnectNPC("PilotLV","at400_lv");
	ConnectNPC("PilotSF","at400_sf");
	ConnectNPC("PilotLS","at400_ls");
Edited by GaRGoyLeS
Link to comment
Share on other sites


//Dáváš ty npc třeba do vozidla s id 1 což u tebe na serveru může bejt klidně elegy
//řešení je jednoduché: vytvoř si 3 vlaky a 2 letadla a pak tam ty npcčka putni
//např.:
//new VlakSF = CreateVehicle(...)
//PutPlayerInVehicle(playerid, VlakSF, 0); //pouze to změň níže:

public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 1; // We only deal with NPC players in this script

new playername[64];
GetPlayerName(playerid,playername,64);

if(!strcmp(playername,"TrainDriverLV",true)) {
PutPlayerInVehicle(playerid,1,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
else if(!strcmp(playername,"TrainDriverSF",true)) {
PutPlayerInVehicle(playerid,5,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
else if(!strcmp(playername,"TrainDriverLS",true)) {
PutPlayerInVehicle(playerid,9,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
else if(!strcmp(playername,"PilotLV",true)) {
PutPlayerInVehicle(playerid,13,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
else if(!strcmp(playername,"PilotSF",true)) {
PutPlayerInVehicle(playerid,14,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
else if(!strcmp(playername,"PilotLS",true)) {
PutPlayerInVehicle(playerid,15,0);
SetPlayerColor(playerid,0xFFFFFFFF);
}
return 1;
}
Link to comment
Share on other sites

  • 4 weeks later...

Vytvoří vozidlo

 

new vozidlo;

public OnGameModeInit()

{

print("my gamemode");

ConnectNPC("jmeno bota","název souboru");

vozidlo = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);

return 1;

}

 

Vložíš bota do auta

 

public OnPlayerSpawn(playerid)

{

if(IsPlayerNPC(playerid))

{

new npcname[MAX_PLAYER_NAME];

GetPlayerName(playerid, npcname, sizeof(npcname));

if(!strcmp(npcname, "jmenobota", true))

{

PutPlayerInVehicle(playerid, vozidlo, 0);

}

}

return 1;

}

 

Omlouvám se že to není jak by mělo ale nudim se ve škole a prohledávám na mobilu pawno :d

Link to comment
Share on other sites

Zdravím a jak si psal stím zabijením NPC. 

Sice psali FNPC který je trošku lepší ale zas RNPC by měl fungovat i po updatech sampu.

Ale můžu ti poradit includ RNPC.

Výhoda v jednom s posledních novinek je že nemusíš nahrávat žádné NPC.

Vytvoří se bez nahrávky.

Trošku si prostuduj toto:

Plugin a Includ

Informace o funkcích

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...