AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Scripting problem need help (https://forums.alliedmods.net/showthread.php?t=95380)

Maloonka 06-23-2009 06:17

Scripting problem need help
 
my awp block only lets me get it once every map, whats the script that lets me get it every round ?

Xellath 06-23-2009 06:23

Re: Scripting problem need help
 
Use a bool, then set it to true everytime you touch it, then reset it at round start.

Maloonka 06-23-2009 06:38

Re: Scripting problem need help
 
Bool?....sry im new at scripting

Xellath 06-23-2009 06:49

Re: Scripting problem need help
 
http://forums.alliedmods.net/showthr...4381#variables

Well I'll explain shortly, then check that tutorial.

PHP Code:

new bool:gHasAWP[33]; //Bool created, it's automaticly set to false if you don't set it to true
 
...
 
public 
your_function(id)
{
    if(
gHasAWP[id] == false)
    {
        
//Do stuff here..
        //then set the bool to true
        
gHasAWP[id] = true;
    }
    else 
// true
    
{
        return;
    }


To reset it at spawn, hook new round or player spawn, look at this tutorial. http://forums.alliedmods.net/showthread.php?t=42159


All times are GMT -4. The time now is 15:31.

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