hello friends can anyone help me I have a problem I would like my players to make a little use of protection area for example, I would make is that another player from his area owner can add another player to his area is possible ? and what must I do to
tis is a litel script
Code
database:queryupdate("INSERT INTO rights ('areaID', 'playerID', 'group') VALUES ('".. areas[areaID]["areaID"] .."', '".. player.dbID .. "', '".. cmd[2] .. "')");
database:queryupdate("UPDATE rights SET 'group'='".. cmd[2] .."' WHERE 'playerID'='".. player.dbID .."'");
event.player:sendTextMessage("[#00FF00]Player \"" .. cmd[3] .. "\" successfully added to area (".. cmd[2] ..")!");
database:queryupdate("DELETE FROM rights WHERE playerID= '" .. player.dbID .. "' AND areaID='" .. areaID .. "'");
1st problem is that I have this to add without admin rights then each player can an area that does not belong to him, he can make him
How can I ensure that players only people of his own area can add