AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Should be removed caused by a license violation ?!?! (https://forums.alliedmods.net/showthread.php?t=90345)

Arkshine 04-17-2009 13:35

Re: CS Tutor Message
 
precache_generic() works perfectly fine with such files. Just tested.

Arkshine 04-17-2009 13:51

Re: CS Tutor Message
 
Quote:

Originally Posted by xPaw (Post 807620)
just tested this, really works, just need to precache the files, but how...

Even by copying manually it doesn't work for me. I see a grey rectangle, that's all. I don't see textures and text. Any ideas?

DruGzOG 04-17-2009 13:52

Re: CS Tutor Message
 
thats the same error im getting, the thing is he hasn't precached the text or textures yet because he doesn't know as well as us.

xPaw 04-17-2009 13:52

Re: CS Tutor Message
 
1 Attachment(s)
arkshine i'm used this code
PHP Code:

#include <amxmodx>
#include <amxmisc>

new gMsgTutorClose;
new 
gMsgTutorText;

public 
plugin_init(){
    
register_plugin"CS Tutor Messages""1.0""Leon McVeran" );

    
// Create a tutor message
    // name or userid: Client who get this msg
    // type:
    //
     //    1    // (1<<0) Default
    //     2    // (1<<1) Friend died
    //     4    // (1<<2) Enemy died
    //     8    // (1<<3) Scenario
    //     16    // (1<<4) Buy
    //     32    // (1<<5) Career
    //     64    // (1<<6) Hint
    //     128    // (1<<7) InGameHint
    //     256    // (1<<8) EndGame
    
register_concmd"tutor""cmdAdminTutorMessage"0"<name or userid> <type>" );
    
    
gMsgTutorClose    get_user_msgid"TutorClose" );
    
gMsgTutorText    get_user_msgid"TutorText" );
}

public 
plugin_precached() {
    
precache_sound"events/enemy_died.wav" );
    
precache_sound"events/friend_died.wav" );
    
precache_sound"events/task_complete.wav" );
    
precache_sound"events/tutor_msg.wav" );
    
    
precache_generic"resource/TutorScheme.res" );
    
precache_generic"resource/UI/TutorTextWindow.res" );
    
    
precache_generic"gfx/career/icon_!.tga" );
    
precache_generic"gfx/career/icon_!-bigger.tga" );
    
precache_generic"gfx/career/icon_i.tga" );
    
precache_generic"gfx/career/icon_i-bigger.tga" );
    
precache_generic"gfx/career/icon_skulls.tga" );
    
precache_generic"gfx/career/round_corner_ne.tga" );
    
precache_generic"gfx/career/round_corner_nw.tga" );
    
precache_generic"gfx/career/round_corner_se.tga" );
    
precache_generic"gfx/career/round_corner_sw.tga" );
}

public 
cmdAdminTutorMessageid ) {
    new 
szArg132 ], szArg2];
    
read_argv1szArg131 );
    
read_argv2szArg2);
    
    new 
iTarget cmd_targetidszArg110 );
    if( !
iTarget )
        return 
PLUGIN_HANDLED;
    
    new 
iType str_to_numszArg2 );
    
    switch( 
iType ) {
        case 
2emit_soundiTargetCHAN_ITEM"events/friend_died.wav"VOL_NORMATTN_NORM0PITCH_HIGH );
        case 
4emit_soundiTargetCHAN_ITEM"events/enemy_died.wav"VOL_NORMATTN_NORM0PITCH_LOW );
        case 
32emit_soundiTargetCHAN_ITEM"events/task_complete.wav"VOL_NORMATTN_NORM0PITCH_NORM );
        default: 
emit_soundiTargetCHAN_ITEM"events/tutor_msg.wav"VOL_NORMATTN_NORM0PITCH_NORM );
    }
    
    new 
szMessage256 ];
    
copyszMessage255"xPaw was here.\nAnd this is new line." );
    
    
replace_allszMessage255"\n""^n" );
    
    
create_TutorMsgiTargetszMessage000iType );
    
    return 
PLUGIN_HANDLED;
}

stock create_TutorMsgidszMessage[], iByteiShort1iShort2iType ) {
    
// Close a displayed tutor message
    // I think we don't need this but in CZ will be called before shown a new message
    
message_beginMSG_ONE_UNRELIABLEgMsgTutorClose_id );
    
message_end( );
    
    
/*
     *    MessageBegin (TutorText "115") (Destination "One<1>") (Args "5") (Entity "1") (Classname "player") (Netname "EagleOne") (Orign "0.000000 0.000000 0.000000")
     *    Arg 1 (String "#Cstrike_Tutor_You_See_Hostage_T")
     *    Arg 2 (Byte "0")
     *    Arg 3 (Short "42")
     *    Arg 4 (Short "0")
     *    Arg 5 (Short "8")
     *    MessageEnd (TutorText "115")
     */
    
    
message_beginMSG_ONE_UNRELIABLEgMsgTutorText_id );
    
write_stringszMessage );
    
write_byteiByte );
    
write_shortiShort1 );
    
write_shortiShort2 );
    
write_shortiType );
    
message_end( );
    
    
remove_taskid );
    
set_task8.0"fnRemoveMessage"id );
}

public 
fnRemoveMessageid ) {
    if( 
is_user_connectedid ) ) {
        
message_beginMSG_ONE_UNRELIABLEgMsgTutorClose_id );
        
message_end( );
    }


http://pic.ipicture.ru/uploads/090417/V7xNRiTFPT.png

Sn!ff3r 04-17-2009 13:52

Re: CS Tutor Message
 
I believe filenames (graphics) are hardcoded in czero... so cstrike use tutorscheme, but dont know anything about additional files.

One 04-17-2009 13:52

Re: CS Tutor Message
 
Quote:

Originally Posted by DruGzOG (Post 807665)
What do you mean if there included to a map?

The tutor in condition zero can be setup to any map, all it does is teach you how to play, tells you the enemies you killed, the amount are left and so on

Quote:

Originally Posted by arkshine (Post 807675)
precache_generic() works perfectly fine with such files. Just tested.

oh oki. didnt pllayed cz:oops:

Arkshine 04-17-2009 13:54

Re: CS Tutor Message
 
1 Attachment(s)
I'm using the same plugin and files is well precached, but still no textures and text. Oo

One 04-17-2009 13:58

Re: CS Tutor Message
 
:shock::shock::shock::shock::shock: OMG... this loooks awesome :-O is there a way to use it in 1.6???

Sn!ff3r 04-17-2009 13:58

Re: CS Tutor Message
 
Quote:

:shock::shock::shock::shock::shock: OMG... this loooks awesome :-O is there a way to use it in 1.6???
No comments.

xPaw 04-17-2009 13:59

Re: CS Tutor Message
 
One we used it in cs 1.6 :/ for me it works, for arkshine some magic gray window


All times are GMT -4. The time now is 04:44.

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