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

Skrypt

Status
Not open for further replies.

Kurczok

Newbie
Joined
Oct 22, 2009
Messages
497
Reaction score
4
Sorry że trochę bez sensu temat ale jeden typ kłóci się ze mną o działanie skryptu.
Jak możecie to wytłumaczcie mi jak takie coś może działać skoro błędami sypie już podczas odpalania silnika.

Jego skrypt:

Lua:
  local cost =  50000,
local experience = 5000,
local player:end = {}
function onUse(cid, item, frompos, item2, topos)
   if getPlayerMoney(cid, .. cost ..) then
      doPlayerRemoveMoney(cid, .. cost ..)   AND doPlayerAddExperience(cid, .. experience ..)
          doPlayerSendMessage(cid, You got ".. experience .." and you lost ".. cost ..")
            else
               doPlayerSendCancel(cid, Sorry you dont have the money to make this.)
                   return player:end
                       end

Mój skrypt:

Lua:
  local cost =  50000,
local experience = 5000,
function onUse(cid, item, frompos, item2, topos)
        if doPlayerRemoveMoney(cid, cost) == true then
                doPlayerAddExperience(cid, experience)
                doPlayerSendMessage(cid, "You got " .. experience .. " and you lost " .. cost .. ".")
        else
                doPlayerSendCancel(cid, Sorry you dont have the money to make this.)   
        end
return true    
end

Support
 
Miałem nadzieję że może poznam coś nowego co potem może się przydać przy pisaniu skryptów ale jak widzę to on chyba sam nie wiedział co piszę :D
 
Hehe bo on preferuje rozbudowane skrypty, nie ważne czy działa ważne że zastosował wszystko co mu przyszło do głowy :)
 
Status
Not open for further replies.
Back
Top