AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   getvault_exists - else write to vault (https://forums.alliedmods.net/showthread.php?t=29178)

jeppelykke 05-31-2006 12:19

getvault_exists - else write to vault
 
Hey Hey ;)

Code:
public plugin_init() {     register_plugin(GH_PLUGIN, GH_VERSION, GH_AUTHOR)     register_clcmd("amx_ghmenu","gh_checkmenu",ADMIN_ALL, "- Shows Gamehotel Menu")         /*** NEED HELP WITH THIS PART *****/     new gh_vaultcheck[64]     vaultdata_exists("gh_servermode",gh_vaultcheck[64])     if(!equali(gh_vaultcheck,"TRUE"))     {           set_vaultdata("gh_servermode","FFA")        }          /*** NEED HELP WITH THIS PART *****/ }

How do i write that part of the code, where the script checks if vault have the vault data of: gh_servermode and if it don't it sets the vault to FFA. And if it do have the Vault data it just don't do anything and happly moves along :D

p3tsin 05-31-2006 12:27

id think it goes something like this
Code:
    if(!vaultdata_exists("gh_servermode") )       {             set_vaultdata("gh_servermode","FFA")         }

jeppelykke 05-31-2006 12:52

Cool that's so simple,

I give it a try! ;)


All times are GMT -4. The time now is 16:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.