Setproperty
From SA-MP Wiki
Setproperty
Add a new property or change an existing property.
Parameters:(id=0, const name[]="", value=cellmin, const string[]="")
| id=0 | The virtual machine to use, you should keep this zero. |
| const name[]="" | The property's name, you should keep this "". |
| value=cellmin | The property's unique ID. Use the hash-function to calculate it from a string. |
| const string[]="" | The value of the property, as a string. |
This function does not return a specific value.
setproperty(0, "", 123984334, ":)"); new value[4]; getproperty(0, "", 123984334, value); print(value); //should print :)
Or... seeing as all the parameters are optional, a piece of code like this similar:
setproperty(.value = 123984334, .string = ":)"); // The rest is the same as above.
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- Getproperty: Get the value of a property.
- Deleteproperty: Delete a property.
- Existproperty: Check if a property exists.
