Dimos7 Posted May 11, 2015 Posted May 11, 2015 Its posible make a car not spawn when player is quit and spawn when player login?
AMARANT Posted May 11, 2015 Posted May 11, 2015 Almost everything is possible including this. Please give more details about what you want to do.
Dimos7 Posted May 11, 2015 Author Posted May 11, 2015 I want do the vehicle i own despawn when i quit and spawn when i loggin
Walid Posted May 11, 2015 Posted May 11, 2015 I want do the vehicle i own despawn when i quit and spawn when i loggin post your code here
AMARANT Posted May 11, 2015 Posted May 11, 2015 Then destroy it when you quit and spawn when log in. It's simple. These are the functions you're gonna need: destroyElement createVehicle Events: onPlayerQuit onPlayerLogin
Dimos7 Posted February 26, 2016 Author Posted February 26, 2016 How i can get in client side the time a player play like this? function playTime() local time = getRealTime() local hours = time.hour local minutes = time.minute end
Bonus Posted February 27, 2016 Posted February 27, 2016 onClientResourceStart save the time with getTickCount() Then just use getTickCount()-savedtime to get the time in ms the player is playing.
Dimos7 Posted March 2, 2016 Author Posted March 2, 2016 Hello guys i make a anticheat system and i want ban player and addBan but in resposible element idk what to put any ideas?
Bonus Posted March 2, 2016 Posted March 2, 2016 responsibleElement: The element that is responsible for banning the IP/username/serial. This can be a player or the root (getRootElement()).
Dimos7 Posted March 10, 2016 Author Posted March 10, 2016 (edited) I create a script that jailed a player is offline and put a timer and i want to know if the the timer iwll killed if player is off? function oflinejailPlayer(thePlayer, name, minutes, , reason , ..., _) local query = dbQuery(connection, "SELECT * FROM accounts WHERE name=?", name) local result, num_affected_rows = dbPoll(query, -1) local adminlevel = getElementData(thePlayer, "adminlevel") local minutes = tonumber(minutes) local reason = table.concat({...}, "") if num_affected_rows == 1 then if adminlevel >= 1 then if minutes >= 1 and minutes <= 60 then if reason ~= "" then target = getPlayerFromName(name) dbExec(connection, "UPATE punishments SET type=? and name=? and serial=? and by=? and reason=? and starttime=? and finishtime=?", "jail", name, getPlayerSerial(target), getPlayerName(thePlayer), reason, getRealTime().timestamp, getRealTime().timestamp + minutes * 60) jailPlayer(thePlayer, target, minutes, reason ) else outputChatBox("Use /ojail [name] [minutes] [reason]", thePlayer, 255, 0, 0) return false end else outputChatBox("Jail time is min 1 minute and max 60 minutes", thePlayer, 255, 0, 0) return false end else outputChatBox("You aren't a admin.", thePlayer, 255, 0, 0) return false end else outputChatBox("Name not found!", thePlayer, 255, 0, 0) return false end end addCommandHandler("ojail", oflinejailPlayer) Edited March 12, 2016 by Guest
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now