---
title: "DeleteSVar | open.mp"
description: "Deletes a previously set server variable."
canonical: https://open.mp/docs/scripting/functions/DeleteSVar
language: en
---

# DeleteSVar

## Description

Deletes a previously set server variable.

| Name | Description |
| --- | --- |
| const svar\[\] | The name of the server variable to delete. |

## Returns

**true** - The function executed successfully.

**false** - The function failed to execute. There is no variable set with the given name.

## Examples

```pawn
SetSVarInt("SomeVarName", 69);

// Later on, when the variable is no longer needed...

DeleteSVar("SomeVarName");
```

## Good to know

**note**

Once a variable is deleted, attempts to retrieve the value will return **0** for integers and 0.0 for floats and **NULL** for strings.

## Related Functions

-   [SetSVarInt](https://open.mp/docs/scripting/functions/SetSVarInt): Set an integer for a server variable.
-   [GetSVarInt](https://open.mp/docs/scripting/functions/GetSVarInt): Get a player server as an integer.
-   [SetSVarString](https://open.mp/docs/scripting/functions/SetSVarString): Set a string for a server variable.
-   [GetSVarString](https://open.mp/docs/scripting/functions/GetSVarString): Get the previously set string from a server variable.
-   [SetSVarFloat](https://open.mp/docs/scripting/functions/SetSVarFloat): Set a float for a server variable.
-   [GetSVarFloat](https://open.mp/docs/scripting/functions/GetSVarFloat): Get the previously set float from a server variable.
