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

A vocation can't attack another vocation? NEED THIS!

marszalikusowy

New Member
Joined
Jun 5, 2012
Messages
8
Reaction score
0
Hi.
I've made a Dragon Ball ots but it's still in beta and I have a reborn system but the only problem I have left is that poeple that are after reborn can attack the ones before reborn. I wanted to make a script that makes it impossible to attack other vocations. (The ones before reborn)
If anyone could make a sample script.. I'll be very thankfull.
If it's possible actualy. What I mean is that vocation 1 2 and 3 cant attack 4 5 and 6. Is it possible to make?
I hope someone can help me.
Cya.
 
Which server do you use? How do you check for this reborn, is it by storage or vocation?
If you use TFS 0.3/0.4, you can do something like this.
Code:
function onCombat(cid, target)
     if isInArray({1, 2, 3}, getRebornLevel(cid)) and isInArray({4, 5, 6}, getRebornLevel(target)) then
         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't attack other vocations.")
         return false
     end
     return true
end

Instead of getRebornLevel, the function you use to get the reborn level of the player.
 
Back
Top