←  Problemy z pluginami

AMXX.pl: Support AMX Mod X i SourceMod

»

problem z grupami donaciaka

  • +
  • -
ChrisN - zdjęcie ChrisN 25.04.2018

hey, mam mały problem mianowicie chciałem przerobić sobie te grupy donaciaka by za dodawanie gracza do klanu pobieralo oplate w wysokosci 250 monet i to działa ale nie wyświetla się info gdy dołącza gracz do grupy, jak odrzuci zapro jest informacja dla lidera, a jak zaakcpetuje to pobiera opłate, dodaje do grupy ale nie wyswietla informacji :(

 

public AskPlayer_Handler(id, iMenu, iItem)
{
if(iItem == MENU_EXIT)
{
menu_destroy(iMenu);
return PLUGIN_CONTINUE;
}
 
new iOwner = g_iLastQuestioner[id];
 
if(!g_iIsGroupOwner[iOwner])
{
print_msg(id, "Wlasciciel opuscil grupe!");
return PLUGIN_CONTINUE;
}
 
if(iItem == 0)
{
if(cod_get_user_coins(iOwner) > 250){
cod_set_user_coins(iOwner, cod_get_user_coins(iOwner) - 250);
new iGroup = g_iPlayerGroup[id] = g_iPlayerGroup[iOwner];
new iMembersCount = ArrayGetCell(g_iGroupMembersCount, iGroup);
 
 
ArraySetString(g_szGroupMembers[iMembersCount], iGroup, g_szPlayerName[id]);
ArraySetCell(g_iGroupMembersCount, iGroup, iMembersCount + 1);
 
UpdateInfo(id);
 
print_msg(iOwner, "Gracz^x03 %s^x01 dolaczyl do klanu.", g_szPlayerName[id]);
}
}
else print_msg(iOwner, "Gracz^x03 %s^x01 odrzucil zaproszenie klanu!", g_szPlayerName[id]);
 
menu_destroy(iMenu);
 
return PLUGIN_CONTINUE;
}
Odpowiedz

  • +
  • -
AwIlL^^ - zdjęcie AwIlL^^ 26.04.2018

Proszę :)
 

public AskPlayer_Handler(id, iMenu, iItem)
{
	menu_destroy(iMenu);
	if(iItem == MENU_EXIT)
	{
		return PLUGIN_CONTINUE;
	}
	 
	new iOwner = g_iLastQuestioner[id];
	 
	if(!g_iIsGroupOwner[iOwner])
	{
		print_msg(id, "Wlasciciel opuscil grupe!");
		return PLUGIN_CONTINUE;
	}
	 
	if(iItem == 0)
	{
		if(cod_get_user_coins(iOwner) > 250)
		{
			cod_set_user_coins(iOwner, cod_get_user_coins(iOwner) - 250);
			new iGroup = g_iPlayerGroup[id] = g_iPlayerGroup[iOwner];
			new iMembersCount = ArrayGetCell(g_iGroupMembersCount, iGroup);
			 
			 
			ArraySetString(g_szGroupMembers[iMembersCount], iGroup, g_szPlayerName[id]);
			ArraySetCell(g_iGroupMembersCount, iGroup, iMembersCount + 1);
			 
			UpdateInfo(id);
			 
			print_msg(iOwner, "Gracz^x03 %s^x01 dolaczyl do klanu.", g_szPlayerName[id]);
			print_msg(id, "Dolaczyles do klanu^x03 %a.", ArrayGetStringHandle(g_szGroupName, iGroup));
		}
		else
			print_msg(iOwner, "Masz za malo monet aby dodac czlonka.");
	}
	else 
		print_msg(iOwner, "Gracz^x03 %s^x01 odrzucil zaproszenie klanu!", g_szPlayerName[id]);
	 
	return PLUGIN_CONTINUE;
}
Odpowiedz