What's new

Skrypty & Kody Pomoc ze skryptem

Status
Not open for further replies.

Kolokim

User
Joined
Jun 23, 2011
Messages
28
Reaction score
0
mianowicie mam skrypt na premium rune kt?ra daj pkt do sms shopu, ale 100 runek mog? zjecha? w 4 sec. Chcia?bym dodac do tego exhaust ale nie da rady. Prosze aby dodac wasz skrypt do mojego, zeby dac mi odpowiedz w calosci a nie pojedynczym skryptem.
[lua]
function onUse(cid, item, fromPosition, itemEx, toPosition)
local points = 1 -- amount of premium points
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 3000)

if isPlayer(cid) == TRUE then
local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(Sql)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 1 Premium Point")
doAddCondition(cid, exhaust)
doRemoveItem(item.uid,1)
end
return true
end[/lua]

Notka moderatorska:
U?ywaj znaczniki
 

Restles

Senior User
Joined
Aug 31, 2012
Messages
616
Reaction score
51
Odp: Pomoc ze skryptem

[lua] function onUse(cid, item, fromPosition, itemEx, toPosition)
local points = 1 -- amount of premium points
if os.time() >= getPlayerStorageValue(cid, 1998) then
setPlayerStorageValue(cid, 1998, os.time()+5)
if isPlayer(cid) == TRUE then
local Sql = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(Sql)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You Have Received 1 Premium Point")
doRemoveItem(item.uid,1)
end
end
return true
end[/lua]
 
Last edited:
Status
Not open for further replies.
Top