Mam Course Makera (action poniżej)
Ustawiam ile mam dostać za block exp
Gdy nacisne e pokazuje sie tyle ile chcialem. Ale to nie to nizej
Mam Moneymoda by diablix (funkcja ponizej)
I nie daje tyle expa co jest wymagane tylko mniej lub wiecej
Funkcja z MoneyModa:
public cmdDodajKase(id, level, cid){
if(!cmd_access(id, level, cid, 3))
return 1;
new target[32], amount[21], reason[21];
read_argv(1, target, 31);
read_argv(2, amount, 20);
read_argv(3, reason, 20);
new player = cmd_target(id, target, 8);
if(!player)
return 1;
new vIloscKasy = str_to_num(amount);
if(Skill[player][22]){
vIloscKasy += Skill[player][22];
ColorChat(player, GREY, "^x04%s^x01+^x03 %d$^x01 [BIZNESMEN AKTYWNY][Blok Kasa]", g_Prefix, vIloscKasy);
}
else{
ColorChat(player, GREY, "^x04%s^x01+^x03 %d$^x01 [Blok Kasa]", g_Prefix, vIloscKasy);
}
new szName[32], szName1[32];
get_user_name(id, szName1, 31);
get_user_name(player, szName, 31);
set_hudmessage(2, 255, 2, 0.42, 0.45, 0, 4.0, 7.0);
show_hudmessage(0, "%s Zdobyl %d kasy na bloku!", szName, vIloscKasy);
Money[player] += vIloscKasy;
Print_logi(id, player, vIloscKasy);
Save(player);
return 0;
}
+ rejestracja komendy
register_concmd("mm_dodaj", "cmdDodajKase", ADMIN_IMMUNITY, "<nick> <ilosc kasy>");
Action z CourseMakera
ActionXPBlock(id, ent)
{
if(!g_xpblock_used[id])
{
new name[32];
get_user_name(id, name, 31);
new property[5];
GetProperty(ent, 1, property);
g_xpblock_used[id] = true;
server_cmd("mm_dodaj ^"%s^" ^"%i^"", name, str_to_num(property));
emit_sound(id, CHAN_STATIC, g_sound_money, 1.0, ATTN_NORM, 0, PITCH_NORM);
}
else
{
set_hudmessage(g_hud_red, g_hud_green, g_hud_blue, g_text_x, g_text_y, g_hud_effects, g_hud_fx_time, g_hud_hold_time, g_hud_fadein_time, g_hud_fadeout_time , g_hud_channel);
show_hudmessage(id, "Dostepne raz na runde");
}
}
Za każdy pomocny post plus.
Użytkownik Skull3D edytował ten post 21.08.2011 19:19