• 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!

[web]siteLiczba graczy z storage. [ots] Item za Zabicie playera

PATrar

New Member
Joined
Jun 11, 2009
Messages
88
Reaction score
0
Wszystko pod 8.50

Czy kto mogłby mi zrobić skrypt lub podać link do tematu z nim na:
1.Liczbe graczy oraz liczbe graczy aktualnie online z danym Storage na Unnamed Acc(wiem ze gesior ma tą funcjke a na tym nie jestem pewny wiec jak niema to czy da się ją dodać a jak tak to jak ;p).
2.Skrypt że ktoś dostaje item za zabicie playera Btw.


Bardzo Proszę o pomoc
 
Z danymi storage? hmm? nie rozumiem...

Tutaj masz status graczy... ale z storage to nie wiem..
Code:
<?PHP
			if($config['status']['serverStatus_online'] == 1)
				echo $config['status']['serverStatus_players'].'<br />Players Online';
			else
				echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
			?></div>
        </div>
 
Chodzi mi o (setPlayerStorageValue(cid,21444,1)


@edit
MAm vip pod tym storage i che na stronce wstawic ile jest vipów ogólnie oraz ile jest aktualnie vipów online
 
Dobra to ja ci w tym nie pomogę bo sie nie znam na php..
Ale co do 2 to tak:

Otwórz plik:
Lua:
data/creaturescripts/scripts/playerdeath.lua
I tam przed ostatnim:
Lua:
end
Dodaj
Lua:
if isPlayer(lastHitKiller) == TRUE then
doPlayerAddItem(lastHitKiller,5805,1)
end

5805 - puchar ;')
 
local config = {
deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')),
sqlType = getConfigInfo('sqlType'),
maxDeathRecords = getConfigInfo('maxDeathRecords')
}

config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if(config.deathListEnabled ~= TRUE) then
return
end

local hitKillerName = "field item"
local damageKillerName = ""
if(lastHitKiller ~= FALSE) then
if(isPlayer(lastHitKiller) == TRUE) then
hitKillerName = getPlayerGUID(lastHitKiller)
else
hitKillerName = getCreatureName(lastHitKiller)
end

if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
if(isPlayer(mostDamageKiller) == TRUE) then
damageKillerName = getPlayerGUID(mostDamageKiller)
else
damageKillerName = getCreatureName(mostDamageKiller)
end
end
end

db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
if(rows:getID() ~= -1) then
local amount = rows:getRows(true) - config.maxDeathRecords
if(amount > 0) then
if(config.sqlType == DATABASE_ENGINE_SQLITE) then
for i = 1, amount do
db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
end
else
db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
end
end
end
end


Mam coś takiego
 
Back
Top