Code:
// vaultdata: career_say_mode: hlguard, csguard, statsme
// Nachricht Zeit rot grün blau zentriert
// extsay(Message,20,200,160,80,1);
extsay(sMessage[],iTime,iRed,iGreen,iBlue,iCenter){
new career_mode[MAX_DATA_LENGTH];
new sMODform[MAX_DATA_LENGTH]; //mod_sayformat
new sMODnorm[MAX_DATA_LENGTH]; //normaler mod_sayformat
new sMODnew[MAX_DATA_LENGTH]; //verändertes mod_sayfotmat
new sMODsay[MAX_DATA_LENGTH]; //mod_say/tell message
get_vaultdata("career_say_mode",career_mode,MAX_DATA_LENGTH);
if(strcasecmp(career_mode,"hlguard")==0){
if(getvar("hlguard_version"))
{
getstrvar("hlg_sayformat",sMODform,MAX_DATA_LENGTH);
snprintf(sMODnorm, MAX_TEXT_LENGTH,"hlg_sayformat ^"%s^"",sMODform);
if(iCenter==1)
snprintf(sMODnew,MAX_TEXT_LENGTH,"hlg_sayformat ^"%d:%d:%d:-1:0.20:1:3:%d:3.0:4.0^"",iRed,iGreen,iBlue,iTime);
else
snprintf(sMODnew,MAX_TEXT_LENGTH,"hlg_sayformat ^"%d:%d:%d:0.025:0.65:1:3:%d:3.0:4.0^"",iRed,iGreen,iBlue,iTime);
snprintf(sMODsay,MAX_TEXT_LENGTH,"hlg_say ^"%s^"",sMessage);
exec(sMODnew);
exec(sMODsay);
exec(sMODnorm);
}else
c_t_say(sMessage,iTime,iRed,iGreen,iBlue,iCenter);
}else if(strcasecmp(career_mode,"csguard")==0){
if(getvar("csguard_version"))
{
getstrvar("csg_sayformat",sMODform,MAX_DATA_LENGTH);
snprintf(sMODnorm, MAX_TEXT_LENGTH,"csg_sayformat ^"%s^"",sMODform);
if(iCenter==1)
snprintf(sMODnew,MAX_TEXT_LENGTH,"csg_sayformat ^"%d:%d:%d:-1:0.20:1:3:%d:3.0:4.0^"",iRed,iGreen,iBlue,iTime);
else
snprintf(sMODnew,MAX_TEXT_LENGTH,"csg_sayformat ^"%d:%d:%d:0.025:0.65:1:3:%d:3.0:4.0^"",iRed,iGreen,iBlue,iTime);
snprintf(sMODsay,MAX_TEXT_LENGTH,"csg_say ^"%s^"",sMessage);
exec(sMODnew);
exec(sMODsay);
exec(sMODnorm);
}else
c_t_say(sMessage,iTime,iRed,iGreen,iBlue,iCenter);
}else if(strcasecmp(career_mode,"statsme")==0){
if(getvar("statsme_version"))
{
if(iCenter==1)
snprintf(sMODnew,MAX_TEXT_LENGTH,"sm_sayformat %d %d %d -1 0.25 0 6 %d 0.5 0.5 2",iRed,iGreen,iBlue,iTime);
else
snprintf(sMODnew,MAX_TEXT_LENGTH,"sm_sayformat %d %d %d 0.05 0.55 2 0.02 %d 0.01 0.1 2",iRed,iGreen,iBlue,iTime);
snprintf(sMODsay,MAX_TEXT_LENGTH,"sm_tell2 * ^"%s^"",sMessage);
exec(sMODnew);
exec(sMODsay);
}else
c_t_say(sMessage,iTime,iRed,iGreen,iBlue,iCenter);
}else
c_t_say(sMessage,iTime,iRed,iGreen,iBlue,iCenter);
return 1;
}
c_t_say(sMessage[],iTime,iRed,iGreen,iBlue,iCenter)
{
if(iCenter==1)
centersay(sMessage,iTime,iRed,iGreen,iBlue);
else
typesay(sMessage,iTime,iRed,iGreen,iBlue);
return 1;
}