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

Problem with Talkaction.

mike

Banned User
Joined
Jun 12, 2008
Messages
150
Reaction score
0
Location
Caracas Venezuela
Since I can do that this script does not change the vocation but only it(he,she) adds the days of premium?


Code:
function onSay(cid, words, param)
--Set vip by Dark Rat/CHF -> http://www.metachicken.org !
if getPlayerItemCount(cid, 5865) > 0 then
dark = getPlayerVocation(cid)
if dark == 1 then
doPlayerSetVocation(cid, 5)
elseif dark == 2 then
doPlayerSetVocation(cid, 6)
elseif dark == 3 then
doPlayerSetVocation(cid, 7)
elseif dark == 4 then
doPlayerSetVocation(cid, 8)
else
doPlayerSendCancel(cid, "Tu Necesitas Una Vocacion!")
return 0
end
doPlayerRemoveItem(cid, 5865, 1)
doPlayerAddPremiumDays(cid, 30)
doPlayerSendCancel(cid, "Ya eres vip.")
else
doPlayerSendCancel(cid, "Para poder comprar tu vip account di el comando needvip.")
end
end
 
Since I can do that this script does not change the vocation but only it(he,she) adds the days of premium?


Code:
function onSay(cid, words, param)
--Set vip by Dark Rat/CHF -> http://www.metachicken.org !
if getPlayerItemCount(cid, 5865) > 0 then
dark = getPlayerVocation(cid)
if dark == 1 then
doPlayerSetVocation(cid, 5)
elseif dark == 2 then
doPlayerSetVocation(cid, 6)
elseif dark == 3 then
doPlayerSetVocation(cid, 7)
elseif dark == 4 then
doPlayerSetVocation(cid, 8)
else
doPlayerSendCancel(cid, "Tu Necesitas Una Vocacion!")
return 0
end
doPlayerRemoveItem(cid, 5865, 1)
doPlayerAddPremiumDays(cid, 30)
doPlayerSendCancel(cid, "Ya eres vip.")
else
doPlayerSendCancel(cid, "Para poder comprar tu vip account di el comando needvip.")
end
end

you want a script that only adds premium days? hard to understand kinda
 
Here you go:

PHP:
local vocs = {5, 6, 7, 8}
function onSay(cid, words, param)
	if getPlayerItemCount(cid, 5865) > 0 then
		voc = getPlayerVocation(cid)
		if isInArray(vocs, voc) == FALSE
			doPlayerSetVocation(cid, voc+4)
			doPlayerRemoveItem(cid, 5865, 1)
			doPlayerAddPremiumDays(cid, 30)
			doPlayerSendCancel(cid, "You are now a VIP")
		else
			doPlayerSendCancel(cid, "You are already promoted!")
		end
	else
		doPlayerSendCancel(cid, "You need the requiered item to use this command.")
	end
return TRUE
end
 
Back
Top