• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

War system frags

swordman

Member
Joined
Jun 5, 2011
Messages
394
Reaction score
7
I tryed to make the server work so when two guilds are in war-mode and they kill a player from another team
they dont get frags on !frags. Because this frags are counted as a unjust.

Anyone have clue how to fix this?
A friend told me its somewhere in player.cpp

I have tryed a few thing, now it doesnt give frags anymore. But it also doesnt add score. And it gave this error:

PHP:
[1:52:06.521] mysql_real_query(): INSERT INTO `guild_kills` (`guild_id`, `war_id`, `death_id`) VALUES (0, 0, 13); - MYSQL ERROR: Cannot add or update a child row: a foreign key constraint fails (`zerena`.`guild_kills`, CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE) (1452)
 
Test insert in sql in database:
CREATE TABLE IF NOT EXISTS `guild_kills` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`guild_id` INT NOT NULL,
`war_id` INT NOT NULL,
`death_id` INT NOT NULL
) ENGINE = InnoDB;

PHP:
ALTER TABLE `guild_kills`
  ADD CONSTRAINT `guild_kills_ibfk_1` FOREIGN KEY (`war_id`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `guild_kills_ibfk_2` FOREIGN KEY (`death_id`) REFERENCES `player_deaths` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `guild_kills_ibfk_3` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;

- - - Updated - - -

Work?
 
Back
Top