Garry's Mod Wiki

Garry's Mod Wiki

  cookie.Delete( string key )

Description

Removes any cookie with the given name.

Does nothing if the cookie doesn't exist.

Arguments

1 string key
The name of the cookie that you want to delete.




Example

Sets & deletes a cookie & print it's values on every step.

cookie.Set('My-Cookie','Hello World') print('Set My-Cookie') print('My-Cookie:',cookie.GetString('My-Cookie')) cookie.Delete('My-Cookie') print('Deleted My-Cookie') print('My-Cookie:',cookie.GetString('My-Cookie'))
Output:
Set My-Cookie My-Cookie: Hello World Deleted My-Cookie My-Cookie: nil

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...