Raised This Month: $32 Target: $400
 8% 

Deutsche Scripting-Hilfe


  
 
 
Thread Tools Display Modes
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-28-2007 , 07:20   Re: Deutsche Scripting-Hilfe
#21

Du musst die register_clcmd() in die "function" plugin_init() reinschreiben ;)
also

public plugin_init() {
register_plugin(PLUGINNAME, VERSION, AUTHOR)

register_event("TextMsg", "event_shieldsfort", "b", "2=#Alias_Not_Avail", "3=#TactShield_Desc")

register_clcmd()
...
...
}


Dann sollte das eigentlich funktionieren ;)
Hast wohl oben überlesen *G*
__________________
regalis is offline
ExKiLL
Senior Member
Join Date: Nov 2005
Location: Germany
Old 05-28-2007 , 07:55   Re: Deutsche Scripting-Hilfe
#22

ah stimmt

danke
__________________
193.192.59.43:27015 ----- italy ( 20 )
85.25.150.62:27015 ------ sHclachthaus ( 14 )
85.25.150.62:27055 ------ DeathMatch ( 20 )
85.25.150.62:27035 ------ Kreedz Hangout ( 18 )
85.214.100.160:27015 ---- 24/7 full house | **GG + DM** ( 32 )
93.190.64.150:27015 ----- Superhero (12)
ExKiLL is offline
ExKiLL
Senior Member
Join Date: Nov 2005
Location: Germany
Old 05-29-2007 , 16:42   Re: Deutsche Scripting-Hilfe
#23

ja, jetzt funktionierts
aber irgendwie ist da noch ein bug drin

wenn ich ak in der hand hab und schreib /schild in chat, wird mir 2200 abgezogen, aber ich krieg kein schild
nur wenn ich messer, he oder pistole in der hand hab
kannst du mir da noch nen code mit erklärung liefern? wäre echt nice
__________________
193.192.59.43:27015 ----- italy ( 20 )
85.25.150.62:27015 ------ sHclachthaus ( 14 )
85.25.150.62:27055 ------ DeathMatch ( 20 )
85.25.150.62:27035 ------ Kreedz Hangout ( 18 )
85.214.100.160:27015 ---- 24/7 full house | **GG + DM** ( 32 )
93.190.64.150:27015 ----- Superhero (12)
ExKiLL is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-29-2007 , 18:34   Re: Deutsche Scripting-Hilfe
#24

Ähm, das shield ersetzt die primäre Waffe ;)
Also wirst du mit AK in der Hand kein shield kaufen können..
Hast du mal ausprobiert die ak zu droppen ob dann das shield da ist?

greetz regalis
__________________
regalis is offline
ExKiLL
Senior Member
Join Date: Nov 2005
Location: Germany
Old 05-30-2007 , 12:01   Re: Deutsche Scripting-Hilfe
#25

ja, klappt nicht

primär in der hand, geld weg, schild nich da
primär danach weggeworfen, schild nicht da

*wunder*

probier selbst!
__________________
193.192.59.43:27015 ----- italy ( 20 )
85.25.150.62:27015 ------ sHclachthaus ( 14 )
85.25.150.62:27055 ------ DeathMatch ( 20 )
85.25.150.62:27035 ------ Kreedz Hangout ( 18 )
85.214.100.160:27015 ---- 24/7 full house | **GG + DM** ( 32 )
93.190.64.150:27015 ----- Superhero (12)
ExKiLL is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-30-2007 , 12:05   Re: Deutsche Scripting-Hilfe
#26

Das shield ist halt eigentlich nur für CT und die können keine Primäre Waffe kaufen wenn sie ein shield haben...
Man könnte vielleicht ne abfrage reinmachen ob ne Primäre Waffe vorhanden ist und dann das shield nicht zum kauf anbieten.
Oder man dropt die primäre Waffe*lol*
Ich würde es aber einfach so lassen...die spieler werden schon merken, dass wenn sie ne AK haben dass sie dann kein shield bekommen
__________________
regalis is offline
ExKiLL
Senior Member
Join Date: Nov 2005
Location: Germany
Old 05-30-2007 , 12:32   Re: Deutsche Scripting-Hilfe
#27

das mit der abfrage wäre geil!
und dann die ausgabe
You have to drop your primary Weapon before buying a shield!

oder irgendso was

ist das einfach?
__________________
193.192.59.43:27015 ----- italy ( 20 )
85.25.150.62:27015 ------ sHclachthaus ( 14 )
85.25.150.62:27055 ------ DeathMatch ( 20 )
85.25.150.62:27035 ------ Kreedz Hangout ( 18 )
85.214.100.160:27015 ---- 24/7 full house | **GG + DM** ( 32 )
93.190.64.150:27015 ----- Superhero (12)
ExKiLL is offline
SeToY
SourceMod Donor
Join Date: Jul 2006
Location: Germany
Old 05-30-2007 , 12:45   Re: Deutsche Scripting-Hilfe
#28

hey

wie kann ich hier scripten, dass die Disconnect message rot angezeigt wird?

Code:
#include <amxmodx>

#define    PLUGIN    "Connect Announce"
#define    VERSION    "0.3b"
#define    AUTHOR    "v3x"

new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    register_cvar("announce_mode","3");
    register_cvar("announce_sound","0");
    g_iMsgSayText = get_user_msgid("SayText");
}

/*
announce_mode <0|1|2|3>
0 - Off
1 - Connect announce only
2 - Disconnect announce only
3 - Both

announce_sound <0|1>
0 - No sound
1 - Sound
*/

public plugin_precache()
{
    precache_sound(g_szSoundFile);
}

public client_authorized(id)
{
    new iMode = get_cvar_num("announce_mode");
    
    if(is_user_bot(id) || iMode == 0 || iMode == 2) 
        return PLUGIN_CONTINUE;

    new szUserName[33];
    get_user_name(id,szUserName,32);

    new szAuthID[33];
    get_user_authid(id,szAuthID,32);

    new iPlayers[32], iNum, i;
    get_players(iPlayers,iNum);

    for(i = 0; i <= iNum; i++)
    {
        new x = iPlayers[i];

        if(!is_user_connected(x) || is_user_bot(x)) continue;

        if(get_cvar_num("announce_sound") == 1)
            client_cmd(x, "spk %s", g_szSoundFile);

        new szMessage[164];
        format(szMessage, 163, "^x04%s (^x01%s^x04) connected", szUserName , szAuthID);

        message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
        write_byte  ( 3 );
        write_string( szMessage );
        message_end ();
    }

    return PLUGIN_CONTINUE;
}

public client_disconnect(id)
{
    new iMode = get_cvar_num("announce_mode");
    
    if(is_user_bot(id) || iMode == 0 || iMode == 1) 
        return PLUGIN_CONTINUE;

    new szUserName[33];
    get_user_name(id, szUserName, 32);

    new szAuthID[33];
    get_user_authid(id , szAuthID , 32);

    new iPlayers[32], iNum, i;
    get_players(iPlayers, iNum);

    for(i = 0; i <= iNum; i++)
    {
        new x = iPlayers[i];

        if(!is_user_connected(x) || is_user_bot(x)) continue;

        if(get_cvar_num("announce_sound") == 1)
            client_cmd(x, "spk %s", g_szSoundFile);

        new szMessage[164];
        format(szMessage, 163, "^x04%s (^x01%s^x04) disconnected", szUserName , szAuthID);

        message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
        write_byte  ( 3 );
        write_string( szMessage );
        message_end ();
    }

    return PLUGIN_CONTINUE;
}
__________________
Success is a lousy teacher. It seduces smart people into thinking they can't lose.
- Bill Gates

Quote:
Originally Posted by Hawk552
SeToY is a retard, scumbag and asshole and you shouldn't pretend that he isn't.
SeToY is offline
lumbsta
Veteran Member
Join Date: Jun 2006
Location: Germany
Old 05-30-2007 , 12:50   Re: Deutsche Scripting-Hilfe
#29

Eins vorweg: Ich kann nicht scripten xD

Code:
#include <amxmodx>

#define    PLUGIN    "Connect Announce"
#define    VERSION    "0.3b"
#define    AUTHOR    "v3x"

new g_iMsgSayText, g_szSoundFile[] = "buttons/blip1.wav";

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    register_cvar("announce_mode","3");
    register_cvar("announce_sound","0");
    g_iMsgSayText = get_user_msgid("SayText");
}

/*
announce_mode <0|1|2|3>
0 - Off
1 - Connect announce only
2 - Disconnect announce only
3 - Both

announce_sound <0|1>
0 - No sound
1 - Sound
*/

public plugin_precache()
{
    precache_sound(g_szSoundFile);
}

public client_authorized(id)
{
    new iMode = get_cvar_num("announce_mode");
    
    if(is_user_bot(id) || iMode == 0 || iMode == 2) 
        return PLUGIN_CONTINUE;

    new szUserName[33];
    get_user_name(id,szUserName,32);

    new szAuthID[33];
    get_user_authid(id,szAuthID,32);

    new iPlayers[32], iNum, i;
    get_players(iPlayers,iNum);

    for(i = 0; i <= iNum; i++)
    {
        new x = iPlayers[i];

        if(!is_user_connected(x) || is_user_bot(x)) continue;

        if(get_cvar_num("announce_sound") == 1)
            client_cmd(x, "spk %s", g_szSoundFile);

        new szMessage[164];
        format(szMessage, 163, "^x04%s (^x01%s^x04) connected", szUserName , szAuthID);

        message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
        write_byte  ( 3 );
        write_string( szMessage );
        message_end ();
    }

    return PLUGIN_CONTINUE;
}

public client_disconnect(id)
{
    new iMode = get_cvar_num("announce_mode");
    
    if(is_user_bot(id) || iMode == 0 || iMode == 1) 
        return PLUGIN_CONTINUE;

    new szUserName[33];
    get_user_name(id, szUserName, 32);

    new szAuthID[33];
    get_user_authid(id , szAuthID , 32);

    new iPlayers[32], iNum, i;
    get_players(iPlayers, iNum);

    for(i = 0; i <= iNum; i++)
    {
        new x = iPlayers[i];

        if(!is_user_connected(x) || is_user_bot(x)) continue;

        if(get_cvar_num("announce_sound") == 1)
            client_cmd(x, "spk %s", g_szSoundFile);

        new szMessage[164];
        format(szMessage, 163, "^x04%s (^x01%s^x04) disconnected", szUserName , szAuthID);

        message_begin( MSG_ONE, g_iMsgSayText, {0,0,0}, x );
        write_byte  ( 3 );
        write_string( szMessage );
        message_end ();
    }

    return PLUGIN_CONTINUE;
}
Grob geraten an rot-markierter Stelle
__________________
Empty your mind. Be formless, shapeless, like water. Now, you put water into a cup - it becomes the cup. Putting it into a tea-pot - it becomes the teapot. Look, water can flow, or creep, or drip or crash. Be water, my friend.

by Bruce Lee
lumbsta is offline
Send a message via ICQ to lumbsta Send a message via MSN to lumbsta Send a message via Skype™ to lumbsta
SeToY
SourceMod Donor
Join Date: Jul 2006
Location: Germany
Old 05-30-2007 , 13:16   Re: Deutsche Scripting-Hilfe
#30

ich möchts ja haben wenn er DISconnectet ;)
__________________
Success is a lousy teacher. It seduces smart people into thinking they can't lose.
- Bill Gates

Quote:
Originally Posted by Hawk552
SeToY is a retard, scumbag and asshole and you shouldn't pretend that he isn't.
SeToY is offline
 



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 03:42.


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