C++ Skulls

Discussion in 'Requests' started by beliar34, Jan 13, 2018.

  1. beliar34

    beliar34 Member

    Joined:
    Feb 28, 2012
    Messages:
    240
    Likes Received:
    6
    Best Answers:
    8
    Sup, why this script dont work on tfs 0.4 3777 rev (no errors in console)
    Code (Text):
    1. local storage = 20233
    2. function onKill(cid, target, flags, damage)
    3. if isPlayer(target) then
    4. if getPlayerIp(cid) ~= getPlayerIp(target) then
    5. local frags = math.max(0, getPlayerStorageValue(cid, storage))
    6. doCreatureSetStorage(cid, storage, frags+1)
    7. if(frags >= 5000) then
    8. doCreatureSetGuildEmblem(cid, EMBLEM_RED)
    9. elseif(frags >= 1500) then
    10. doCreatureSetGuildEmblem(cid, EMBLEM_BLUE)
    11. elseif(frags >= 250) then
    12. doCreatureSetGuildEmblem(cid, EMBLEM_GREEN)
    13. end
    Can i set skulss ?
    which funciton ?
    doPlayerSetSkullEnd(cid, 0, SKULL_RED)
    doPlayerSetRedSkullTicks(cid, x)
    ?
     
  2. Best Answer:
    Post #2 by beliar34, Jan 13, 2018
  3. beliar34

    beliar34 Member

    Joined:
    Feb 28, 2012
    Messages:
    240
    Likes Received:
    6
    Best Answers:
    8
    Best Answer
    Code (Lua):
    1. function onLogin(cid)
    2.     local cfg = {
    3.         [1] = {6001, 1},
    4.         [2] = {6002, 20},
    5.         [3] = {6003, 50},
    6.         [4] = {6004, 100},
    7.         [5] = {6005, 150}
    8.     }
    9.      
    10.     for s, d in ipairs(cfg) do
    11.         if(getPlayerStorageValue(cid, 20233) > d[2]) then
    12.             doCreatureSetSkullType(cid, s)
    13.         end
    14.     end
    15.     return true
    16. end
    and delete some "skull" in player.cpp
     

Share This Page

Loading...