What's new

Skrypty & Kody logout.lua

Status
Not open for further replies.

buuuszek

Active User
Joined
Aug 27, 2012
Messages
71
Reaction score
0
Witam.
Naprawd? d?ugo szuka?em jakiego? konkretnego logout.lua, ale nie potrafi?em znale??, dlatego prosze was o jaki? skrypt kt?ry polega? bedzi? na usuni?ciu dodatkowej ilo?ci Hp i Many, kt?r? dostajemy podczas transformacji.

Z g?ry bardzo dzi?kuje :D
 

Restles

Senior User
Joined
Aug 31, 2012
Messages
616
Reaction score
51
Odp: logout.lua

[LUA]-- [id profesji] = {-hp, -mana}
local transform =
{
[1] = {0, 0},
[2] = {2000, 2000},
[3] = {5000, 5000},
[4] = {8500, 8500},
[5] = {13500, 13500},
}
function onLogout(cid)
local Player = transform[getPlayerVocation(cid)]
if (Player == nil) then
return true
end

setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-Player[1])
doCreatureAddHealth(cid, -Player[1])
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-Player[2])
doCreatureAddMana(cid, -Player[2])
return true
end[/LUA]
 
Status
Not open for further replies.
Top