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

Help with a script please.

Elizabeth

New Member
Joined
Jul 3, 2009
Messages
115
Reaction score
2
Hello!!


I need know if someone can help me with next scrit:

If a player enter in a sqm and that sqm have some actionid, change the player group only if that player are in that sqm and when the player move from that sqm the player get back normal group (1)

only that, can someone help me please?


Thanks
 
Just add them to movements.xml ,place such tile with action id 16669 on map and enjoy ! ;d If you get any errors write! ;d

Code:
function onStepIn(cid, item, position, fromPosition)

	if (item.aid == 16669) then
		if (getThingFromPos(position) isPlayer(cid) == true) then
			konto = getPlayerAccountId(cid) 
			db.executeQuery("UPDATE 'accounts' WHERE 'id' = " ..konto.. " SET 'group_id'=3;" )
		end
	end
return TRUE
else
return FALSE
end

Code:
function onStepOut(cid, item, position, fromPosition)

	if (item.aid == 16669) then
		if (getThingFromPos(position) isPlayer(cid) == true) then
			konto = getPlayerAccountId(cid) 
			db.executeQuery("UPDATE 'accounts' WHERE 'id' = " ..konto.. " SET 'group_id'=1;" )
		end
	end
return TRUE
else
return FALSE
end
 
Back
Top