Raised This Month: $51 Target: $400
 12% 

Should be removed caused by a license violation ?!?!


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2009 , 13:35   Re: CS Tutor Message
Reply With Quote #11

precache_generic() works perfectly fine with such files. Just tested.
Arkshine is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2009 , 13:51   Re: CS Tutor Message
Reply With Quote #12

Quote:
Originally Posted by xPaw View Post
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?
Arkshine is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 04-17-2009 , 13:52   Re: CS Tutor Message
Reply With Quote #13

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.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-17-2009 , 13:52   Re: CS Tutor Message
Reply With Quote #14

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( );
    }

Attached Files
File Type: zip Files.zip (8.0 KB, 237 views)
__________________

Last edited by xPaw; 04-17-2009 at 14:05.
xPaw is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 04-17-2009 , 13:52   Re: CS Tutor Message
Reply With Quote #15

I believe filenames (graphics) are hardcoded in czero... so cstrike use tutorscheme, but dont know anything about additional files.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-17-2009 , 13:52   Re: CS Tutor Message
Reply With Quote #16

Quote:
Originally Posted by DruGzOG View Post
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 View Post
precache_generic() works perfectly fine with such files. Just tested.
oh oki. didnt pllayed cz
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-17-2009 , 13:54   Re: CS Tutor Message
Reply With Quote #17

I'm using the same plugin and files is well precached, but still no textures and text. Oo
Attached Thumbnails
Click image for larger version

Name:	Tutor.JPG
Views:	297
Size:	5.9 KB
ID:	40828  

Last edited by Arkshine; 04-17-2009 at 13:58.
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-17-2009 , 13:58   Re: CS Tutor Message
Reply With Quote #18

OMG... this loooks awesome :-O is there a way to use it in 1.6???
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 04-17-2009 , 13:58   Re: CS Tutor Message
Reply With Quote #19

Quote:
OMG... this loooks awesome :-O is there a way to use it in 1.6???
No comments.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-17-2009 , 13:59   Re: CS Tutor Message
Reply With Quote #20

One we used it in cs 1.6 :/ for me it works, for arkshine some magic gray window
__________________
xPaw 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 03:24.


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