AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Help me again. With this code. (https://forums.alliedmods.net/showthread.php?t=314000)

edimilton2018 01-30-2019 22:32

Help me again. With this code.
 
But once again I am here again.
now I bring this challenge to you who are geniuses.
I downloaded a vip plugin on the internet, it has a command called / wantvip
which displays a MotoD menu on the screen, but giving the command appears the most written menu.
ML_NOTFOUND_LINE_1
ML_NOTFOUND_LINE_2
ML_NOTFOUND_LINE_3
ML_NOTFOUND_LINE_4
ETC...

I opened the .sma and noticed this

public client_putinserver(id)
{
if (!task_exists(id + 1000)) set_task(30.0, "PrintText", id + 1000) //Checks if task already exist, if not print text set in public PrintText
}

public PrintText(id)
{
if(color_msg == 1)
{
client_print_color( id, "%L", id, "PRINT_TEXT_COLORED" ); //Message which is sent
}
else
{
client_print_color( id, "%L", id, "PRINT_TEXT" ); //Message which is sent
}
}

public print_adminlist(user)
{
new id, count, x, len, adminnames[33][32];
for(id = 1 ; id <= MAXPLAYERS ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & VIP_FLAG)
get_user_name(id, adminnames[count++], 31)

if(vips_list == 2 || vips_list == 3)
{
new contact[112];
get_cvar_string("vip_contactinfo", contact, 63)
new price[112];
get_cvar_string("vip_price", price, 63)
new Data[g_Buffer];

len = formatex(Data[len], g_Buffer - len, "<html><center><font color=yellow>%L <font color=green>%s.<font color=yellow> %L <font color=green>%s</font><body bgcolor=Black>", user, "CONTACT", contact, user, "MOTD_LINE_15", price);
len += formatex(Data[len], g_Buffer - len, "<br><table border=1 width=300 cellspacing=0 bordercolor=#4A4344 style=color:#56A5EC;text-align:center;>");
len += formatex(Data[len], g_Buffer- len, "<tr><td><b>#</b></td><td><b>%L</b></td></tr>", user, "VIPS_ONLINE");

if(count > 0)
{
for(x = 0 ; x < count ; x++)
{
len += formatex(Data[len], g_Buffer - len, "<tr><td><font color=Red>%d</font></td>", x + 1);
len += formatex(Data[len], g_Buffer - len, "<td>%s</td></tr>", adminnames[x]);
}
}
len += formatex(Data[len],g_Buffer - len,"</center></body></html>");
new motd_name[64];
format(motd_name, 64, "%L", user, "WANTVIP_MOTD_NAME");
show_motd(user, Data, motd_name);


}
if(vips_list == 1 || vips_list == 3)
{
new message[256], contact[112]

if(color_msg == 1)
{
len = format(message, 255, "%L", user, "VIPS_ONLINE_COLORED", COLOR)
}
else
{
len = format(message, 255, "%L", user, "VIPS_ONLINE")
}
if(count > 0)
{
for(x = 0 ; x < count ; x++)
{
len += format(message[len], 255-len, " %s%s ", adminnames[x], x < (count-1) ? ", ":"")
if(len > 96 )
{
client_print_color(user, message)
if(color_msg == 1)
{
len = format(message, 255, "%s",COLOR)
}
else
{
len = format(message, 255, "")
}
}
}
client_print_color(user, message)
}
else
{
len += format(message[len], 255-len, " %L", id, "NO_VIPS_ONLINE")
client_print_color(user, message)
}

get_cvar_string("vip_contactinfo", contact, charsmax(contact))
if(contact[0])
{
if(color_msg == 1)
{
client_print_color(user, "%L %s", user, "CONTACT_COLORED", contact)
}
else
{
client_print_color(user, "%L %s", user, "CONTACT", contact)
}
}
}
}


What do I do to add something there? type information about vips.

SHIELD755 01-31-2019 03:32

Re: Help me again. With this code.
 
1st : try to post code in PHP or CODE tag
2nd : ML_NOTFOUND it means that the Vip.txt or other text file is missing . so search that text file and place it into right folder (send me the link of vip plugin you are using)

edimilton2018 01-31-2019 18:45

Re: Help me again. With this code.
 
R: 1º I'd like to know how to do this, but I'm new to amx mod x, script or something.

R: 2º Ok, I'll see where I downloaded it and I'll give you the link.

edimilton2018 01-31-2019 18:50

Re: Help me again. With this code.
 
here is the link, it has been downloaded here. The file Tenhoo vip.txt is installed in the lang folder.

https://forums.alliedmods.net/showthread.php?t=209501

edimilton2018 02-03-2019 22:13

Re: Help me again. With this code.
 
Does anybody know how to solve this?

Nutu_ 02-04-2019 02:25

Re: Help me again. With this code.
 
if you put vip.txt on data/lang folder it should work!
PHP Code:

public ShowMotd(id)
{
    new 
contact[112];
    
get_cvar_string("vip_contactinfo"contact63)
    new 
price[112];
    
get_cvar_string("vip_price"price63)
    static 
MOTD[1501];
    new 
len formatex(MOTD1500,"<style type=text/css>body{background-color: #000000;font-family:Verdana,Tahoma;}</style>");
    
len += formatex(MOTD[len],1500-len,"<font size=2 color=#e0a518><b><center>%L</center></b></font><br /><font size=1 color=#c0c0ff><UL>"id"MOTD_LINE_01");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_02");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_03");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_04");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_05");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_06");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_07");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_08");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI>"id"MOTD_LINE_09");
    
len += formatex(MOTD[len],1500-len,"%L"id"MOTD_LINE_10");
    
len += formatex(MOTD[len],1500-len,"<br>%L"id"MOTD_LINE_11");
    
len += formatex(MOTD[len],1500-len,"<br>%L"id"MOTD_LINE_12");
    
len += formatex(MOTD[len],1500-len,"<LI>%L</LI><br>"id"MOTD_LINE_13");
    
len += formatex(MOTD[len],1500-len,"<font size=1 color=#00c000><strong>%L</strong></font>"id"MOTD_LINE_14")
    
len += formatex(MOTD[len],1500-len,"<br>%L %s"id"MOTD_LINE_15"price)
    
len += formatex(MOTD[len],1500-len,"<br>%L <font color=#FF6600>%s</font>"id"MOTD_LINE_16"contact);

    new 
motd_name[64];
    
format(motd_name64"%L"id"WANTVIP_MOTD_NAME");
    
show_motd(id,MOTDmotd_name);    
    return 
PLUGIN_HANDLED


Code:

WANTVIP_MOTD_NAME = VIP
MOTD_LINE_01 = What you get when you are VIP?
MOTD_LINE_02 = Free grenade set every round. (HE,2FB,SG)
MOTD_LINE_03 = Free armor, helmet and defuse kit every round.
MOTD_LINE_04 = 500$ per kill and 800$ per head shot kill.
MOTD_LINE_05 = 15HP per kill and 30HP per head shot kill.
MOTD_LINE_06 = VIP members can see bullet damage.
MOTD_LINE_07 = Only VIP members can buy snipers. (AWP, G3SG1, SG550).
MOTD_LINE_08 = VIP members can write in admin chat (example: "@Hello").
MOTD_LINE_09 = From second round VIP will get VIP menu which contains:
MOTD_LINE_10 = 1. M4A1 with Deagle.
MOTD_LINE_11 = 2. AK47 with Deagle.
MOTD_LINE_12 = 3. AWP with Deagle. (If there are 5 people in each team and map is large enough)
MOTD_LINE_13 = Write /vips to see if there are any VIP members online.
MOTD_LINE_14 = How much VIP costs?
MOTD_LINE_15 = VIP price is:
MOTD_LINE_16 = If you want to buy VIP, contact us through:
CONTACT_COLORED = !g[VIP]!n Contact Server Admin --!g
CONTACT = [VIP] Contact Server Admin --

i guess you need to change from here, they should work

edimilton2018 02-04-2019 09:45

Re: Help me again. With this code.
 
Okay, I'll test and tell you if it worked.

another question rsrsrsrs.

I want to add a multijump plugin, so I want to add flag levels in it so that only people with such flag level can have the multi jump

Ex: custom level a

then everyone who has this level will be able to use multi jump

Can you answer me here or should I create a new topic?

or is there something like that?

edimilton2018 02-04-2019 09:46

Re: Help me again. With this code.
 
and complementing the vip plugin issue, I think this code should I put in the correct wantvip.txt file?

Oops9499 02-04-2019 11:30

Re: Help me again. With this code.
 
What language is your server set on? It may happen that the vip.txt file doesn't support it.

DjSoftero 02-04-2019 14:34

Re: Help me again. With this code.
 
Quote:

Originally Posted by Oops9499 (Post 2638120)
What language is your server set on? It may happen that the vip.txt file doesn't support it.

False. if the language data does not exist in the language file, it uses english as a default language


All times are GMT -4. The time now is 08:56.

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