AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   this going me crazy! (https://forums.alliedmods.net/showthread.php?t=187927)

StepZeN 06-19-2012 19:38

this going me crazy!
 
Hello there!,i was like hmm,i maybe can make so v.i.p gets more money on moneyblock in blockmaker.. ,so i asking u guys if u can help me out with this now BEFORE i will throw my computer out of the window!:)

this is all i can do:

PHP Code:

ActionMoney(ident)
{
    if ( 
cs_get_user_team(id) == CS_TEAM_T )
    {
        if(
get_user_flags(id) & ADMIN_CHAT && ( !g_money_used[id] );
        {    
            new 
property[5];
            
GetProperty(ent1property);
            
mm_add_user_money(idstr_to_num(property) + 10);
            
g_money_used[id] = true
            
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
ColorChat 0GREY"^x03 You got %i more money!"str_to_num(property) + 10);
            
            
emit_sound(idCHAN_STATICg_sound_money1.0ATTN_NORM0PITCH_NORM);
        }
        else if(!(
get_user_flags(id) & ADMIN_CHAT && ( !g_money_used[id] );
        {
            new 
property[5];
            
GetProperty(ent1property);
            
mm_add_user_money(idstr_to_num(property));
            
g_money_used[id] = true
            
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
ColorChat 0GREY"^x03 You got %i more money!"str_to_num(property));
            
            
emit_sound(idCHAN_STATICg_sound_money1.0ATTN_NORM0PITCH_NORM)
        }
        else
        {
            
set_hudmessage(025500.010.1800.01.00.250.252);
            
show_hudmessage(id"Only Terrorists can take Money Block!");
    }


what i need help with is:
when people with flag ADMIN_CHAT going on the block he will get the property on the block + 10 money:)

i am happy for all help i can get!:)

Regards StepZ!

Exolent[jNr] 06-20-2012 09:39

Re: this going me crazy!
 
Code:
ActionMoney(id, ent) {     if ( cs_get_user_team(id) == CS_TEAM_T )     {         if( !g_money_used[id] )         {                 new property[5], money;             GetProperty(ent, 1, property);                         if(get_user_flags(id) & ADMIN_CHAT)                 money = str_to_num(property) + 10;             else                 money = str_to_num(property);                         mm_add_user_money(id, money)                         g_money_used[id] = true;                         set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);             ColorChat ( 0, GREY, "^x03 You got %i more money!", money);                         emit_sound(id, CHAN_STATIC, g_sound_money, 1.0, ATTN_NORM, 0, PITCH_NORM);         }         else         {             set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2);             show_hudmessage(id, "Only Terrorists can take Money Block!");         }     } }

StepZeN 06-21-2012 11:48

Re: this going me crazy!
 
Quote:

Originally Posted by Exolent[jNr] (Post 1732369)
Code:
ActionMoney(id, ent) { if ( cs_get_user_team(id) == CS_TEAM_T ) { if( !g_money_used[id] ) { new property[5]; GetProperty(ent, 1, property); if(get_user_flags(id) & ADMIN_CHAT) mm_add_user_money(id, str_to_num(property) + 10); else mm_add_user_money(id, str_to_num(property)); g_money_used[id] = true; set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2); ColorChat ( 0, GREY, "^x03 You got %i more money!", str_to_num(property) + 10); emit_sound(id, CHAN_STATIC, g_sound_money, 1.0, ATTN_NORM, 0, PITCH_NORM); } else { set_hudmessage(0, 255, 0, 0.01, 0.18, 0, 0.0, 1.0, 0.25, 0.25, 2); show_hudmessage(id, "Only Terrorists can take Money Block!"); } }

thank u,u are the man dude!:D
EDIT!: but it doesent work:s,there is many errors,i can't write or take a picture becouse it's to much but almost every error is "undefined symbol" :/

Exolent[jNr] 06-21-2012 12:04

Re: this going me crazy!
 
You were missing a closing brace in your original code. My code is now fixed.


All times are GMT -4. The time now is 06:10.

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