local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('whiteSkullTime'))
function onKill(cid, target)
if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
local GUID = getPlayerGUID(cid)
local NAME = getPlayerName(cid)
local namet = getPlayerName(target)
local skull = getCreatureSkullType(cid)
local fragTime = getConfigInfo('timeToDecreaseFrags')
local amount = getPlayerRedSkullTicks(cid)
local frags = math.floor((amount / fragTime) + 1)
local playerPos = getPlayerPosition(cid)
local targetPos = getPlayerPosition(target)
local cidd = cid
local function removeFrag(cid)
local amountt = getPlayerRedSkullTicks(cidd)
local fragss = math.floor((amountt / fragTime) + 1)
if fragss > frags then
doPlayerSetRedSkullTicks(cidd, amount)
doPlayerSendTextMessage(cidd, 21, "Frag from "..namet.." wasn't counted.")
end
if skull == SKULL_WHITE then
if getCreatureSkullType(cidd) == SKULL_RED then
doCreatureSetSkullType(cidd, SKULL_WHITE)
doPlayerSetRedSkullTicks(cidd, 0)
end
end
end
local myGuild = getPlayerGuildId(cid)
local enemyGuild = getPlayerGuildId(target)
if myGuild ~= 0 and enemyGuild ~= 0 then
if enemyGuild == getGuildWarInfo(myGuild).With then
doAddCondition(cid, PZ)
if getTileZoneInfo(playerPos) == 0 and getTileZoneInfo(targetPos) == 0 then
if getShowInfo(myGuild).S == 1 then
registerDeathOne(myGuild, enemyGuild, cid, target)
else
registerDeathTwo(myGuild, enemyGuild, cid, target)
end
addEvent(removeFrag, 150)
else
doPlayerSendTextMessage(cid, 19, "Remember: in PvP zone the system doesn't register the frag.")
end
end
end
end
return TRUE
end
why some players kill one, add multiple frags for Guild?
Srry English
how i change structure for tables?
UPDATE `guilds` SET `invited_to` = 0, `invited_by` = 0, `in_war_with` = 0, `kills` = 0, `show` = 0, `war_time` = 0 WHERE `id` > 0;
else
{
$guild_errors[] = 'You are not a leader of guild!';
}
}
Parse error: syntax error, unexpected T_CASE in C: \ xampp \ htdocs \ index.php on line 5
case "buypoints";
$subtopic = "buypoints";
$topic = "Buy Points";
include("buypoints.php");
break;
case "wars";
$subtopic = "wars";
$topic = "Wars";
include("wars.php");
break;
Maps = {
["map1"] =
{
Guild1Pos = {x=238, y=442, z=12},
Guild2Pos = {x=244, y=442, z=12}
},
["map2"] =
{
Guild1Pos = {x=994, y=1004, z=6},
Guild2Pos = {x=1000, y=1003, z=6}
So the idea of 3 guilds v/s 2 guilds for example, isnt going to be added?
and BEFORE (line 1760~):
PHP:else { $guild_errors[] = 'You are not a leader of guild!'; } }
Can someone share guilds.php file ? I can't find this part of file.
x2 :SCode:Maps = { ["map1"] = { Guild1Pos = {x=238, y=442, z=12}, Guild2Pos = {x=244, y=442, z=12} }, ["map2"] = { Guild1Pos = {x=994, y=1004, z=6}, Guild2Pos = {x=1000, y=1003, z=6}
whats is this ? Should I make a map too lol ?