Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tryb COOP
#21
main z client script:
function onInit()
{
enableGameNpcs(true);
}
{
addMessage(0, 255, 0, "Witaj " + getName() + " Smile");

setWeaponSkill(WEAPON_1H, 100);
setWeaponSkill(WEAPON_2H, 100);
setWeaponSkill(WEAPON_BOW, 100);
setWeaponSkill(WEAPON_CBOW, 100);

setMaxHealth(1000);
completeHeal();

setStrength(150);

setPosition(0, 250, 0);
equipMeleeWeapon("ITMW_1H_SWORD_05");
equipArmor("GRD_ARMOR_I");

function onRespawn()
{
completeHeal();
setPosition(0.0, 250.0, 0.0);
}

function onCommand(command, params)
{
switch (command)
{
case "walk_style1":
setOverlay("HumanS_Arrogance.mds");
break;

case "walk_style2":
setOverlay("Humans_Mage.mds");
break;

case "change_vis":
setAdditionalVisual("hum_body_Naked0", 3, "Hum_Head_Pony", 20);
sendVisual();
break;
}
}

main z folderu server script:
function onInit()
{
print("My Gamemode v0.1");
}

function onJoin(pid)
{
local message = getPlayerName(pid) + " dołacza do gry.";

for (local i = 0; i < getMaxSlots(); ++i)
if (pid != i && isConnected(i))
sendMessage(i, 0, 255, 0, message);
}

function onDisconnect(pid, reason)
{
local message = getPlayerName(pid) + " odłacza sie od gry.";

for (local i = 0; i < getMaxSlots(); ++i)
if (pid != i && isConnected(i))
sendMessage(i, 255, 0, 0, message);
}

function onUnconscious(pid, kid)
{
sendMessageToAll(255, 255, 0, getPlayerName(kid) + " omdlił (?) " + getPlayerName(pid));
}

function onDie(pid, kid)
{
sendMessageToAll(255, 0, 0, getPlayerName(kid) + " zabił " + getPlayerName(pid));
}

function onStandUp(pid)
{
sendMessageToAll(255, 255, 0, getPlayerName(pid) + " wstaje!");
}
Reply
#22
podmień to tak:
function onInit()
{
enableGameNpcs(true);

addMessage(0, 255, 0, "Witaj " + getName() + " Smile");

setWeaponSkill(WEAPON_1H, 100);
setWeaponSkill(WEAPON_2H, 100);
setWeaponSkill(WEAPON_BOW, 100);
setWeaponSkill(WEAPON_CBOW, 100);

setMaxHealth(1000);
completeHeal();

setStrength(150);

setPosition(0, 250, 0);
equipMeleeWeapon("ITMW_1H_SWORD_05");
equipArmor("GRD_ARMOR_I");
}
function onRespawn()
{
completeHeal();
setPosition(0.0, 250.0, 0.0);
}

function onCommand(command, params)
{
switch (command)
{
case "walk_style1":
setOverlay("HumanS_Arrogance.mds");
break;

case "walk_style2":
setOverlay("Humans_Mage.mds");
break;

case "change_vis":
setAdditionalVisual("hum_body_Naked0", 3, "Hum_Head_Pony", 20);
sendVisual();
break;
}
}
main z folderu server script:
function onInit()
{
print("My Gamemode v0.1");
}

function onJoin(pid)
{
local message = getPlayerName(pid) + " dołacza do gry.";

for (local i = 0; i < getMaxSlots(); ++i)
if (pid != i && isConnected(i))
sendMessage(i, 0, 255, 0, message);
}

function onDisconnect(pid, reason)
{
local message = getPlayerName(pid) + " odłacza sie od gry.";

for (local i = 0; i < getMaxSlots(); ++i)
if (pid != i && isConnected(i))
sendMessage(i, 255, 0, 0, message);
}

function onUnconscious(pid, kid)
{
sendMessageToAll(255, 255, 0, getPlayerName(kid) + " omdlił (?) " + getPlayerName(pid));
}

function onDie(pid, kid)
{
sendMessageToAll(255, 0, 0, getPlayerName(kid) + " zabił " + getPlayerName(pid));
}

function onStandUp(pid)
{
sendMessageToAll(255, 255, 0, getPlayerName(pid) + " wstaje!");
}
Reply
#23
Działa!!

Nie wrzuca na początek ale tyle to sobie dodreptam

Dziękuje za pomoc Smile)))
Reply
#24
Spoko, pamiętaj że ten coop jest zjebany i lubi znikać npc.
Reply
#25
to błąd z save game
[Image: 1_3.png]

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Gothic Coop (Potwory) Matnow24 5 5,780 21.04.2018, 22:13
Last Post: Profesores
  Zamiast MP włącza się tryb single player. Dracon 11 7,909 05.05.2016, 13:49
Last Post: Dracon
  Dodanie NPC do G2O COOP. Trevor 3 3,485 24.03.2016, 17:44
Last Post: Vesemir

Forum Jump:


Users browsing this thread: 1 Guest(s)