14.10.2016, 15:04
hey guys how can i do if a player didn't connect for 5 min something to count and auto sell his house?
i created something like this
UPDATE houses h LEFT JOIN players p ON p.Name=h.Owner SET h.Owner='The State', h.Owned=0 WHERE UNIX_TIMESTAMP() >= UNIX_TIMESTAMP(STR_TO_DATE(p.LastLogin, '%d/%m/%Y - %H:%i:%s'))+300 AND p.Status = 0
i want to add it to gamemode not in database like an event
i created something like this
UPDATE houses h LEFT JOIN players p ON p.Name=h.Owner SET h.Owner='The State', h.Owned=0 WHERE UNIX_TIMESTAMP() >= UNIX_TIMESTAMP(STR_TO_DATE(p.LastLogin, '%d/%m/%Y - %H:%i:%s'))+300 AND p.Status = 0
i want to add it to gamemode not in database like an event