Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: totalkills
1. Totalkills nie działa
Witam, zn?w przychodz? z pytaniem czemu nie dzia?a mi totalkills ?
Mam w skrypcie zrobione zab?jstwo jak np. na jednym ?yciu zabije osobe to wyswietla mi sie to ale niestety nie dziala mi to, ?e zapisuje do totalkills mi tego ;/

[lua] getElementData ( element, "murders" ) [/lua] - to funkcja od killi na jednym ?yciu

[lua] peds = getElementsByType("ped")
players = getElementsByType("player")
addEventHandler ( "onPlayerWasted", root,
function( totalAmmo, killer, killerWeapon, bodypart, stealth )
if killer == players and killer ~= peds and source == players and source ~= peds then
local account = getPlayerAccount ( killer )
if killer ~= source then
setAccountData( account,"totalkillsdeaths.Kills",tonumber( getAccountData( account,"totalkillsdeaths.Kills" ) or 0 ) +1 )
setElementData( killer, "Kills", tonumber( getAccountData( account,"totalkillsdeaths.Kills" ) ) )
setElementData( killer, "Ratio", tonumber(getElementData( killer, "Kills" )/getElementData( source, "Deaths") ) )
end
else
local accountSource = getPlayerAccount ( source )
setAccountData( accountSource,"totalkillsdeaths.Deaths",tonumber( getAccountData(accountSource,"totalkillsdeaths.Deaths") or 0 ) +1 )
setElementD...