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

Cant attack & cant change outfit/colour when got specific storage number

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,488
Solutions
18
Reaction score
199
Location
Sweden
Is it able to make so two different players with one same storage cant attack each other?

Lets say two people walk into a teleport and gain a storage so they cant attack each other then they walk out another teleport and the storage turns away.

Would be really happy if someone at least helped me with this script and also made the two characters who walks into same teleport gain the blue colours at their outfit and cant change it when they are in that specific room, could mabye make something with storages there also, like you cant change outfit/colours when you got specific storage.

Hope its understand able, regards; Mjmackan
 
Yes it's possible, perhaps you need to add a new function in the source code to the "not-attacking-each-other-if-same-storage-part"
 
LUA:
local storage = 1000
function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, storage) == 1 and getPlayerStorageValue(cid, storage) == 1 then
			return doPlayerSendCancel(cid, "Sorry, you can not attack this person.") and false
		end
	end
return true
end
 
LUA:
local storage = 1000
function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) then
		if getPlayerStorageValue(cid, storage) == 1 and getPlayerStorageValue(cid, storage) == 1 then
			return doPlayerSendCancel(cid, "Sorry, you can not attack this person.") and false
		end
	end
return true
end

And how can i do the players get the same storage after pass the teleport?
 
And how can i do the players get the same storage after pass the teleport?
save as whatever in movements
LUA:
function onStepIn(cid, item, position, position)
	if getPlayerStorageValue(cid, 20001) == -1 then
		setPlayerStorageValue(cid, 20001, 1)
		end
	return TRUE
end
movements.xml
XML:
<movevent type="StepIn" actionid="20001" event="script" value="setstoragesocannotattackplayeranymore.lua"/>
 
Back
Top