Raised This Month: $ Target: $400
 0% 

Scripting problem need help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Maloonka
Junior Member
Join Date: Jun 2009
Old 06-23-2009 , 06:17   Scripting problem need help
Reply With Quote #1

my awp block only lets me get it once every map, whats the script that lets me get it every round ?
Maloonka is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-23-2009 , 06:23   Re: Scripting problem need help
Reply With Quote #2

Use a bool, then set it to true everytime you touch it, then reset it at round start.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Maloonka
Junior Member
Join Date: Jun 2009
Old 06-23-2009 , 06:38   Re: Scripting problem need help
Reply With Quote #3

Bool?....sry im new at scripting
Maloonka is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-23-2009 , 06:49   Re: Scripting problem need help
Reply With Quote #4

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
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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