AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   BlockMaker - Action Scripts (https://forums.alliedmods.net/showthread.php?t=149602)

HBxander 02-09-2011 09:58

BlockMaker - Action Scripts
 
HBxander - BlockMaker ActionScripts


Why i made this thread?

I made this thread, because i think its usefull, and think alot of new up started scripters, a bit like me, needs some help with it, and so on!
Remember, if your a ' pro ' scripter, like there is alot of people who are in here, then please, stop spamming me, and just let me make my thread..
But tell me to edit, if you fell something is wrong !


Good..
Here there is some Action Scripts..
<span _mce_style="font-size: small;" style="font-size: small;"><span _mce_style="font-size: x-small;" style="font-size: x-small;">
PHP Code:

ActionDeagle(ident)
{
        if ( 
is_user_alive(id) && !g_dgl_used[id] )
        {
            if ( 
cs_get_user_team(id) == CS_TEAM_T )
            {
                if ( !
user_has_weapon(idCSW_DEAGLE) )
                {
                    new 
property1[33];
                    new 
property2[33];
                    
GetProperty(ent1property1);
                    
GetProperty(ent2property2);
                    
                    
g_dgl_used[id] = true;
                    
                    new 
name[32];
                    
get_user_name(idname32);
                    
                    
give_item(id"weapon_deagle");
                    
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_deagle"id), str_to_num(property1));
                    
cs_set_user_bpammo(idCSW_DEAGLEstr_to_num(property2));
                
                    
ColorChat(0GREEN"[%s]^x01 Watch Out CTs!^x04'%s'^x01 where given  a^x04 Deagle^x01 with^x04 %i^x01 bullets!"name,  str_to_num(property1));
                }
            }
            else
            {
                
set_hudmessage(gHudRedgHudGreengHudBluegfTextX,  gfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTime,  gfHudFadeOutTimegHudChannel);
                
show_hudmessage(id"Only Terrorists can take Deagle!");
            }
        }
        else if ( 
g_dgl_used[id] )
        {
            
set_hudmessage(gHudRedgHudGreengHudBluegfTextX,  gfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTime,  gfHudFadeOutTimegHudChannel);
            
show_hudmessage(id"Wait until next round before taking Deagle block again!");
        }



Arkshine 02-09-2011 10:11

Re: BlockMaker - Action Scripts
 
How it's useful ? You explain nothing.

Exolent[jNr] 02-09-2011 10:40

Re: BlockMaker - Action Scripts
 
http://forums.alliedmods.net/showthread.php?t=131183

ot_207 02-09-2011 13:50

Re: BlockMaker - Action Scripts
 
Quote:

Originally Posted by HBxander (Post 1410851)
I made this thread, because i think its usefull, and think alot of new up started scripters, a bit like me, needs some help with it, and so on!

This is not a good thing. You must become an experienced scripter before doing tuts. I suggest learning firstly to use the forum (using search functions, using tags, private messaging, etc.). After that learn scripting and post tuts because if you donīt do them right new scripters will end up not knowing what to do with your code.
And again, this is the second tut where I am saying this, organize what you are doing.
And seeing what Exolent posted your tut is redundant, really search to see if a tut exists before doing one.


All times are GMT -4. The time now is 01:45.

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