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

Compiling doPlayerExecuteCommand? please help me

Rebine

New Member
Joined
Feb 10, 2010
Messages
69
Reaction score
2
Location
Chile
hello, well first of all, I apologize for my spelling, I do not speak much English XD.

Well based on the code from C + + "doPlayerCastSpell", I wondered if maybe someone could help me with a code like that, but to fulfill the function of executing a command (talkaction), maybe something like "doPlayerExecuteCommand" or something like that .. .

the idea is that I serve with this script:

Code:
local t = {
    [11420] = {text= "!points add, axe, 1"},
    [11421] = {text= "!points add, club, 1"},
    [11422] = {text= "!points add, distance, 1"},
    [11423] = {text= "!points add, magic, 1"},
    [11424] = {text= "!points add, shielding, 1"},
    [11425] = {text= "!points add, sword, 1"}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
   local v = t[item.itemid]
   if v then
        doPlayerExecuteCommand(cid, v.text)
    return true
end
end
 
Back
Top