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

[CZ][INC&NATIVE] Czero Tutor


Post New Thread Reply   
 
Thread Tools Display Modes
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 04-21-2012 , 12:08   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #21

Demon81>> include the include in the script.

I'm having some difficulties running a plugin with that include
my dedicated testserver sais the following when i start a game with a plugin using his previous tutor.

error log:

L 04/21/2012 - 17:57:29: -------- Mapchange to de_dust --------
L 04/21/2012 - 17:57:29: [AMXX] Plugin "tutor-test.amxx" failed to load: Plugin uses an unknown function (name "czerotutor_create") - check your modules.ini.

does this need an extra module?
I have the basic modules running on the dedicated server :
Code:
fun
engine
fakemeta
geoip
sockets
regex
nvault
cstrike
csx
hamsandwich
I tryed with ConnorMcleods version too but that gave me this error:

L 04/21/2012 - 19:14:51: -------- Mapchange to de_dust --------
L 04/21/2012 - 19:14:52: [AMXX] Plugin "tutor-test.amxx" failed to load: Module/Library "cztutor" required for plugin. Check modules.ini.

Last edited by striker07; 04-21-2012 at 13:20.
striker07 is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 05-28-2012 , 15:46   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #22

Spoiler

Hey connor, You're version for the czero tutor doesnt work i dont know why, maybe you can tell me.
this is what i have:
PHP Code:
#include <amxmodx>
//#include <czerotutor>
#define VERSION "0.0.1"
#define PLUGIN "TutorText"
#define TASK_OFFSET 1354897
 
enum TutorSounds {
    
DefaultTutor,
    
FriendDied,
    
EnemyDied,
    
TaskComplete,
    
TutorNoSound
}
new const 
g_szTutorSounds[TutorSounds][] = 
{
    
"sound/events/tutor_msg.wav"// Yellow, Green
    
"sound/events/friend_died.wav"// Red
    
"sound/events/enemy_died.wav"// Blue
    
"sound/events/task_complete.wav"// Green
    
""
};
enum TutorColors ( <<= )
{
    
TutorGreen 1,
    
TutorRed,
    
TutorBlue,
    
TutorYellow
}
new 
g_iTutorTextg_iTutorClose
public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
g_iTutorText get_user_msgid("TutorText")
    
g_iTutorClose get_user_msgid("TutorClose")
 
    
set_task(360.0"tutor_spam"0__"b")
}
public 
plugin_natives()
{
    
register_native("client_tutor""client_tutor")
}
public 
plugin_precache()
{
    new 
szModName[9]
    
get_modname(szModNamecharsmax(szModName))
    if( !
equal(szModName"czero") )
    {
        
set_fail_state("Tutor only works on condition zero")
    }
}
// client_tutor(id, TutorColors:iColor, TutorSounds:iSound, Float:flCloseDelay=8.0, fmt[], any:...)
public client_tutor(iPluginiParams)
{
    new 
id get_param(1)
    new 
TutorColors:iColor TutorColors:get_param(2)
    new 
TutorSounds:iSound TutorSounds:get_param(3)
    new 
Float:flDelay get_param_f(4)
    new 
szText[256]
    if( 
iParams == )
    {
        
get_string(5szTextcharsmax(szText))
        
Send_TutorText(idiColoriSoundflDelayszText)
    }
    else if( 
id || iParams == )
    {
        
vdformat(szTextcharsmax(szText), 56)
        
Send_TutorText(idiColoriSoundflDelayszText)
    }
    else 
// iParams > 6
    
{
        new 
iPlayers[32], iNum
        get_players
(iPlayersiNum"ch")
        if( !
iNum )
        {
            return 
0
        
}
        new 
ij, Array:aStoreML ArrayCreate(), iMlCount
        
for(i=6i<iParamsi++)
        {
            if( 
get_param_byref(i) == LANG_PLAYER )
            {
                
get_string(i+1szTextcharsmax(szText))
                if( 
GetLangTransKey(szText) != TransKey_Bad )
                {
                    
ArrayPushCell(aStoreMLi++)
                    
iMlCount++
                }
            }
        }
        if( !
iMlCount )
        {
            
vdformat(szTextcharsmax(szText), 56)
            
Send_TutorText(idiColoriSoundflDelayszText)
        }
        else
        {
            for(
i=0i<iNumi++)
            {
                
id iPlayers[i]
                for(
j=0j<iMlCountj++)
                {
                    
set_param_byref(ArrayGetCell(aStoreMLj), id)
                }
                
vdformat(szTextcharsmax(szText), 56)
                
Send_TutorText(idiColoriSoundflDelayszText)
            }
        }
        
ArrayDestroy(aStoreML)
    }
    return 
1
}
Send_TutorText(idTutorColors:iTypeTutorSounds:iSoundFloat:flDelay, const szText[])
{
    if( 
iSound != TutorNoSound )
    {
        
client_cmd(id"spk %s"g_szTutorSounds[iSound])
    }
    
message_begin(id MSG_ONE_UNRELIABLE MSG_BROADCASTg_iTutorText, .player=id)
    
write_string(szText)
    
write_byte(0)
    
write_short(-1// TutorMessageEventI
    
write_shortid && !is_user_alive(id) ) 
    
write_short_:iType )
    
message_end()
    
id += TASK_OFFSET
    remove_task
(id)
    if( 
flDelay 0.0 )
    {
        
set_task(flDelay"TutorClose"id)
    }
}
public 
TutorClose(id)
{
    
id -= TASK_OFFSET
    
if( id )
    {
        
message_begin(MSG_ONE_UNRELIABLEg_iTutorClose, .player=id)
        
message_end()
    }
    else
    {
        new 
iPlayers[32], iNum
        get_players
(iPlayersiNum"ch")
        for(new 
ii<iNumi++)
        {
            
id iPlayers[i]
            if( !
task_exists(id+TASK_OFFSET) )
            {
                
message_begin(MSG_ONE_UNRELIABLEg_iTutorClose, .player=id)
                
message_end()
            }
        }
    }

public 
tutor_spam()
{
 new 
Random
 
Random random_num);
 switch( 
Random 
 {     
  case 
1:
  {
   
client_tutor(0TutorYellowTaskComplete12.3"test"); //line 178
  
}
  case 
2:
  {
   
client_tutor(0TutorYellowTaskComplete12.3"test"); //line 182
  
}
 }

and these are my errors:
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Tag mismatch on line 178
Error: Number of arguments does not match definition on line 178
Warning: Tag mismatch on line 182
Error: Number of arguments does not match definition on line 182
2 Errors.
It doesnt work without the #include<czerotutor> and defenitly not with it
Why is it saying that the number of parameters is wrong?
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]
striker07 is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 05-13-2014 , 14:35   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #23

Is there a way to do tutor support UTF8 related letters and symbols (é à è for exemple) ?

I guess not, it should be hardcoded, but i prefer asking, maybe...
Fr33m@n is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-20-2014 , 06:33   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #24

Quote:
Originally Posted by Fr33m@n View Post
Is there a way to do tutor support UTF8 related letters and symbols (é à è for exemple) ?

I guess not, it should be hardcoded, but i prefer asking, maybe...
Why not trying to read lines from a file encoded in UTF-8 w/ o BOM? Check Notepad++.
__________________

Last edited by claudiuhks; 05-20-2014 at 06:33.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 06-04-2015 , 11:28   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #25

Do you guys think it's possible to create your own tutor ? using the default one as a base to a recreation ?

Last edited by Fr33m@n; 06-04-2015 at 11:29.
Fr33m@n is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 08-04-2016 , 08:55   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #26

Quote:
Originally Posted by Fr33m@n View Post
Is there a way to do tutor support UTF8 related letters and symbols (é à è for exemple) ?

I guess not, it should be hardcoded, but i prefer asking, maybe...
For those who still want.

Just add:
Quote:
"range" "0x0000 0x017F"
to "1" (Fonts) in TutorScheme.res
Syturi0 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 08-04-2016 , 08:56   Re: [CZ][INC&NATIVE] Czero Tutor
Reply With Quote #27

Quote:
Originally Posted by Fr33m@n View Post
Do you guys think it's possible to create your own tutor ? using the default one as a base to a recreation ?
It is not possible.
Syturi0 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 12:36.


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