Powinno rozdać Monety ,a tego nie robi. Dodam że nie działa to na serwerze z silnikiem bf2. Wiem że tam jest to samo tylko ze MEDALE. Ale to jest do innego przeznaczenia.
Gdy jest koniec mapy Ani ten plugin ani bf2 nie daje niczego na koniec mapy. A chciałbym żeby to i to dawało. W tym nie ma info w say , bo nie potrzebny . Proszę o pomoc.
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <nvault>
#define PLUGIN "Monety"
#define VERSION "1.0"
#define AUTHOR "ExTaza?!"
new nazwa_gracza[33][64];
new g_vault;
new monety_gracza[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /monety", "monetysay");
register_message(SVC_INTERMISSION, "Message_Intermission");
}
public client_connect(id)
{
get_user_name(id, nazwa_gracza[id], 63);
WczytajMonety(id);
}
public client_disconnect(id)
{
ZapiszMonety(id);
}
public ZapiszMonety(id)
{
new vaultkey[64],vaultdata[256];
format(vaultkey,63,"%s-monet", nazwa_gracza[id]);
format(vaultdata,255,"%d#", monety_gracza[id]);
nvault_set(g_vault,vaultkey,vaultdata);
}
public WczytajMonety(id)
{
new vaultkey[64],vaultdata[256];
format(vaultkey,63,"%s-%i-monet", nazwa_gracza[id]);
format(vaultdata,255,"%i#", monety_gracza[id]);
nvault_get(g_vault,vaultkey,vaultdata,255);
replace_all(vaultdata, 255, "#", " ");
new monetygracza[32];
parse(vaultdata, monetygracza, 31);
monety_gracza[id] = str_to_num(monetygracza);
}
public monetysay(id)
{
client_print(id, print_chat, "Ilosc Twoich monet: %i ", monety_gracza[id] );
}
public Message_Intermission(){
set_task(0.1, "monets");
}
public monets()
{
new players[32], num;
get_players(players, num, "h");
new tempfrags, id;
new swapfrags, swapid;
new starfrags[3];
new starid[3];
for (new i = 0; i < num; i++)
{
id = players[i];
tempfrags = get_user_frags(id);
if ( tempfrags > starfrags[0] )
{
starfrags[0] = tempfrags;
starid[0] = id;
monety_gracza[id]+=1;
if ( tempfrags > starfrags[1] )
{
swapfrags = starfrags[1];
swapid = starid[1];
starfrags[1] = tempfrags;
starid[1] = id;
starfrags[0] = swapfrags;
starid[0] = swapid;
monety_gracza[id]+=2;
if ( tempfrags > starfrags[2] )
{
swapfrags = starfrags[2];
swapid = starid[2];
starfrags[2] = tempfrags;
starid[2] = id;
starfrags[1] = swapfrags;
starid[1] = swapid;
monety_gracza[id]+=3;
}
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
Użytkownik ExTaza?! edytował ten post 14.11.2012 01:08