Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <sqlx>
- #include <cstrike>
- #include <hamsandwich>
- #include <zombieplague>
- #include <fun>
- #pragma dynamic 32768
- #define is_valid_player(%1) (1 <= %1 <= 32)
- new Handle:g_SqlTuple
- // Register System
- new bool:g_LoggedIn[33]
- new g_RegisterSelection[33]
- new g_szTempName[33][100]
- new g_szTempPassWord[33][100]
- // Stats System ( Points )
- new g_RankTempID
- new g_Top10TempID
- new g_TotalPoints[33]
- new g_HumanKillsZombiePoints[33]
- new g_HumanKillsNemesisPoints[33]
- new g_SurvivorKillsZombiePoints[33]
- new g_HumanKillsZombieKnifePoints[33]
- new g_ZombieInfectsHumanPoints[33]
- new g_NemesisKillsHuman[33]
- new g_ZombieKillsSurvivor[33]
- new g_ZombieKillsHumanPS[33]
- new g_AP[33]
- new g_DonateID[33]
- // Achievements
- new g_Minutes[33]
- new g_ZombieKillCount1[33]
- new g_ZombieKillCount2[33]
- new g_ZombieKillCount3[33]
- new g_ZombieHSKillCount[33]
- new g_Rounds[33]
- new g_KillInfectCount1[33]
- new g_KillInfectCount2[33]
- new g_KillInfectCount3[33]
- new g_gotKillInfectCount[33]
- new g_nemeKillCountKnife[33]
- new g_killzombieknife[33]
- new g_winsurvivor[33]
- new g_winnemesis[33]
- new g_killsurvivorplague[33]
- new g_killnemesisplague[33]
- new g_kill600survivor[33]
- new g_kill600nemesis[33]
- new g_InfectionBombCount[33]
- new g_SprayCount[33]
- new g_awpkills[33]
- new g_infectinrowcount1[33]
- new g_infectinrowcount2[33]
- new g_zmkillrowcount1[33]
- new g_zmkillrowcount2[33]
- new g_lasthumankillall[33]
- // Cvars
- new cvHost, cvUserName, cvPassWord, cvDbName
- public plugin_init()
- {
- register_plugin("zp_rabs by mottzi","2.1","mottzi")
- cvHost = register_cvar("zp_rabs_sql_host", "")
- cvUserName = register_cvar("zp_rabs_sql_username", "")
- cvPassWord = register_cvar("zp_rabs_sql_password", "")
- cvDbName = register_cvar("zp_rabs_sql_database", "")
- makeTuple()
- register_clcmd("say /login", "menuRegister")
- register_clcmd("jointeam", "menuRegister")
- register_event("TeamInfo", "joinTeamOldMenu", "a")
- register_clcmd("say /top10", "cmdTop10")
- register_clcmd("say /rank", "cmdRank")
- register_clcmd("say /zmtop10", "cmdTop10")
- register_clcmd("say /zmrank", "cmdRank")
- register_clcmd("say /statistics", "menuStats")
- register_clcmd("say /stats", "menuStats")
- register_clcmd("say /achievements", "menuAchvs")
- register_clcmd("say /achvs", "menuAchvs")
- register_clcmd("say /achv", "menuAchvs")
- register_clcmd("Username", "cmdUsername")
- register_clcmd("szPassword", "cmdPw")
- register_clcmd("takeAmount", "cmdTakeAmount")
- register_clcmd("saveAmount", "cmdSaveAmount")
- register_clcmd("donate", "cmdDonate")
- register_clcmd("say /bank", "menuBank")
- register_clcmd("say_team /bank", "menuBank")
- register_event("DeathMsg", "DeathMsg", "a")
- register_event("23", "cmdNewSpray", "a", "1=112")
- RegisterHam( Ham_Item_AddToPlayer, "weapon_hegrenade", "AddGrenadeToPlayer" );
- createTable()
- register_logevent("cmdRoundStart", 2, "1=Round_Start")
- set_task(60.0, "increaseMinutes", .flags="b")
- set_task(120.0, "cmdHelpCommands", .flags="b")
- set_task(150.0, "cmdHelpCommands2", .flags="b")
- }
- public makeTuple()
- {
- new Host[100], UserName[20], PassWord[20], DbName[100]
- get_pcvar_string(cvHost, Host, 99)
- get_pcvar_string(cvUserName, UserName, 19)
- get_pcvar_string(cvPassWord, PassWord, 19)
- get_pcvar_string(cvDbName, DbName, 99)
- g_SqlTuple = SQL_MakeDbTuple(Host, UserName, PassWord, DbName)
- }
- public cmdHelpCommands()
- {
- client_print(0, print_chat, ".קנבה תא חותפל ידכ '/bank' וא 'למשנ.' םושרת ]ויגלפ יבמוז[")
- client_print(0, print_chat, ".םיגשיהה טירפת חותפל ידכ '/achvs' וא 'סהיבש.' םושרת ]ויגלפ יבמוז[")
- client_print(0, print_chat, ".הקיטסיטטסה תא חותפל ידכ '/stats' וא 'דאשאד.' םושרת ]ויגלפ יבמוז[")
- }
- public cmdHelpCommands2()
- {
- client_print(0, print_chat, ".םיליבומה 10 תא תוארל ידכ '/zmtop10' וא '01פםאצז.' םושרת ]ויגלפ יבמוז[")
- client_print(0, print_chat, ".ךלש םוקימה תא תוארל ידכ '/zmrank' וא 'למשרצז.' םושרת ]ויגלפ יבמוז[")
- client_print(0, print_chat, "'MaRs'. ידי לע םגרותו 'Mottzi' ידי לע הנבנ המשרהו פוט+קנב+םילגשיהה לש דומה ]ויגלפ יבמוז[")
- }
- public joinTeamOldMenu()
- {
- new id = read_data(1)
- new user_team[32]
- read_data(2, user_team, 31)
- if(!is_user_connected(id))
- return PLUGIN_HANDLED
- if(g_LoggedIn[id])
- return PLUGIN_HANDLED
- switch(user_team[0])
- {
- case 'C':
- {
- menuRegister(id)
- }
- case 'T':
- {
- menuRegister(id)
- }
- }
- return PLUGIN_HANDLED
- }
- public AddGrenadeToPlayer( iEnt, id )
- {
- if(is_user_connected(id) && zp_get_user_zombie(id))
- {
- g_InfectionBombCount[id]++
- if(g_InfectionBombCount[id] == 300)
- {
- client_print(id, print_chat, "'רבמוב' תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- public cmdNewSpray()
- {
- new sprayid = read_data(2) // Spray Owner
- g_SprayCount[sprayid]++
- if(g_SprayCount[sprayid] == 300)
- {
- client_print(sprayid, print_chat, "'ברק תונמוא' תא התחתפ התא ]םיגשיה[")
- }
- }
- public menuAchvs(id)
- {
- new achvsMenu = menu_create("Achievements", "menuAchvsHandler")
- new szTitle[100]
- // 1
- if(g_Minutes[id] >= 600)
- formatex(szTitle, 99, "<3^n.תרשב ללוכ ןמזב תוקד 600 ךשמב קחש \r(חתפנ)^n")
- else
- formatex(szTitle, 99, "^nשחק במשך 600 דקות (\y דקות \r%i)\y ^n<3", g_Minutes[id])
- menu_additem(achvsMenu, szTitle, "1")
- // 2
- if(g_ZombieHSKillCount[id] >= 600)
- formatex(szTitle, 99, "!טוש-דאה !םוב^n w\.טוש-דאה םע סיסמנ וא םיבמוז 600 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "!טוש-דאה !םוב^n \r%i\y( התגרהy\) טוש דאה םע ןיססא וא סיסמנ וא םיבמוז 600 גורהת^n)^n", g_ZombieHSKillCount[id])
- menu_additem(achvsMenu, szTitle, "2")
- // 3
- if(g_Rounds[id] >= 3000)
- formatex(szTitle, 99, "םירטסקאל^n w\.תרשב התאש ללוכ ןמזב תוקד 3000 קחש r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "םירטסקאל^n \r%i\y( םיבוביסy\) םיבוביסה לכב םיבוביס 3000 קחש^n", g_Rounds[id])
- menu_additem(achvsMenu, szTitle, "3")
- // 4
- if(g_ZombieKillCount1[id] >= 100)
- formatex(szTitle, 99, "םיתמה םיבמוזה תא ףידע^n w\.םיבמוז 100 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "םיתמ םיבמוזה תא ףידע^n \r%i\y( התגרהy\) םיבמוז 100 גורהת^n", g_ZombieKillCount1[id])
- menu_additem(achvsMenu, szTitle, "4")
- // 5
- if(g_ZombieKillCount2[id] >= 600)
- formatex(szTitle, 99, "םיבמוז חצור^n w\.םיבמוז 600 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "םיבמוז חצור^n \r%i\y( התגרהy\) םיבמוז 600 גורהת^n", g_ZombieKillCount2[id])
- menu_additem(achvsMenu, szTitle, "5")
- // 6
- if(g_ZombieKillCount2[id] >= 600)
- formatex(szTitle, 99, "יעוצקמ םיבמוז חצור^n w\.םיבמוז 1000 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "יעוצקמ םיבמוז חצור^n \r%i\y( התגרהy\) םיבמוז 1000 גורהת^n", g_ZombieKillCount3[id])
- menu_additem(achvsMenu, szTitle, "6")
- // 7
- if(g_KillInfectCount1[id] >= 200)
- formatex(szTitle, 99, "...חומ ממממ^n w\.םדא ינב 200 םיבמוזל ךופהת וא גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "...חומ מממ^n \r%i\y( התמהיז/התגרהy\) םדא ינב 200 םהזת/גורהת^n", g_KillInfectCount1[id])
- menu_additem(achvsMenu, szTitle, "7")
- // 8
- if(g_KillInfectCount2[id] >= 1200)
- formatex(szTitle, 99, "הלוע סקינופה^n w\.םדא ינב 1200 םיבמוזל ךופהת וא גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "הלועה סקינופה^n \r%i\y( התמהיז/התגרהy\) םדא ינב 1200 םהזת/גורהת^n", g_KillInfectCount2[id])
- menu_additem(achvsMenu, szTitle, "8")
- // 9
- if(g_KillInfectCount3[id] >= 2000)
- formatex(szTitle, 99, "םוהיזה^n w\.םדא ינב 2000 םיבמוזל ךופהת וא גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "םוהיז^n \r%i\y( התמהיז/התגרהy\) םדא ינב 2000 םהזת/גורהת^n", g_KillInfectCount3[id])
- menu_additem(achvsMenu, szTitle, "9")
- // 10
- if(g_gotKillInfectCount[id] >= 1000)
- formatex(szTitle, 99, "תובטה םע םיביוא^n w\.םימעפ 1000 יבמוזל ךתוא וכפהיש וא גרהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "תובטה םע םיביוא^n \r%i\y( התקבדנ/התגרהנy\) םדא ינב 1000 קבדת/גרהת^n", g_gotKillInfectCount[id])
- menu_additem(achvsMenu, szTitle, "10")
- // 11
- if(g_nemeKillCountKnife[id] >= 10)
- formatex(szTitle, 99, "לזרב לש םיבצע^n w\.ןיכס םע סיסמנ 10 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "לזרב יבצע^n \r%i\y( התגרהy\) ןיכס םע סיסמנ 10 גורהת^n", g_nemeKillCountKnife[id])
- menu_additem(achvsMenu, szTitle, "11")
- // 12
- if(g_killzombieknife[id] >= 200)
- formatex(szTitle, 99, "הדגאה^n w\.ןיכס םע םיבמוז 200 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "הדגאה^n \r%i\y( התגרהy\) ןיכס םע םיבמוז 200 גורהת^n", g_killzombieknife[id])
- menu_additem(achvsMenu, szTitle, "12")
- // 13
- if(g_winsurvivor[id] >= 10)
- formatex(szTitle, 99, "דרושה^n w\.דרושה בוביסב דרושכ םיבוביס 10 חצנת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "דרושה^n \r%i\y( התחצינy\) דרושה בוביסב דרושכ םימעפ 10 חצנת^n", g_winsurvivor[id])
- menu_additem(achvsMenu, szTitle, "13")
- // 14
- if(g_winnemesis[id] >= 10)
- formatex(szTitle, 99, "סיסמנה^n w\.סיסמנ בוביסב סיסמנכ םיבוביס 10 חצנת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "סיסמנ^n \r%i\y( התחצינy\) סיסמנ בוביסב סיסמנכ םימעפ 10 חצנת^n", g_winnemesis[id])
- menu_additem(achvsMenu, szTitle, "14")
- // 15
- if(g_killsurvivorplague[id] >= 300)
- formatex(szTitle, 99, "ה'גנינ^n w\.ויגלפ דנוארב םידרוש 300 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "ה'גנינ^n \r%i\y( התגרהy\) ויגלפ דנוארב םידרוש 300 גורהת^n", g_killsurvivorplague[id])
- menu_additem(achvsMenu, szTitle, "15")
- // 16
- if(g_killnemesisplague[id] >= 300)
- formatex(szTitle, 99, "!רהמ בושחת^n w\.ויגלפ דנוארב סיסמנ 300 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "רהמ בושחת^n \r%i\y( התגרהy\) ויגלפ דנוארב סיסמנ 300 גורהת^n", g_killnemesisplague[id])
- menu_additem(achvsMenu, szTitle, "16")
- // 17
- if(g_kill600survivor[id] >= 600)
- formatex(szTitle, 99, "תובבל רבוש^n w\.םידרוש 600 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "תובבל רבוש^n \r%i\y( התגרהy\) סיסמנ 600 גורהת^n", g_kill600survivor[id])
- menu_additem(achvsMenu, szTitle, "17")
- // 18
- if(g_kill600nemesis[id] >= 600)
- formatex(szTitle, 99, "חדינ^n w\.סיסמנ 600 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "חדינ^n \r%i\y( התגרהy\) םידרוש 600 גורהת^n", g_kill600nemesis[id])
- menu_additem(achvsMenu, szTitle, "18")
- // 19
- if(g_InfectionBombCount[id] >= 300)
- formatex(szTitle, 99, "ץיצפמה^n w\.םיבמוז תוצצפ 300 הנקת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "רבמוב^n \r%i\y( התינקy\) יבמוז תוצצפ 300 הנקת^n", g_InfectionBombCount[id])
- menu_additem(achvsMenu, szTitle, "19")
- // 20
- if(g_SprayCount[id] >= 300)
- formatex(szTitle, 99, "המחלמ תונמא^n w\.תרשב קחשמ התאש ןמזה לכב םימעפ 300 יירפס השעת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "המיחל תונמוא^n \r%i\y( התישעy\) תרשב התאש ןמזה לכב יירפס םימעפ 300 השעת^n", g_SprayCount[id])
- menu_additem(achvsMenu, szTitle, "20")
- // 21
- if(g_awpkills[id] >= 200)
- formatex(szTitle, 99, "םלשומה^n AWP.\w םע םיבמוז 200 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "^nתהרוג 200 זומבים עם AWP. (\yהרגתה \r%i\y) ^nהמושלם", g_awpkills[id])
- menu_additem(achvsMenu, szTitle, "21")
- // 22
- if(g_infectinrowcount1[id] >= 5)
- formatex(szTitle, 99, "םירודכ ןיסח^n w\.דחא בוביסב יבמוזל םישנא 5 ךופהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "םירודכ ןיסח^n \r%i\y( התמהיזy\) .דחא בוביסב םדא ינב 5 םהזת^n", g_infectinrowcount1[id])
- menu_additem(achvsMenu, szTitle, "22")
- // 23
- if(g_infectinrowcount2[id] >= 10)
- formatex(szTitle, 99, "תוומה ךאלמ^n w\.דחא בוביסב יבמוזל םישנא 10 ךופהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "תוומה ךאלמ^n \r%i\y( התמהיזy\) .דחא בוביסב םדא ינב 10 םהזת^n", g_infectinrowcount2[id])
- menu_additem(achvsMenu, szTitle, "23")
- // 24
- if(g_zmkillrowcount1[id] >= 5)
- formatex(szTitle, 99, "םיבמוז טבחמ^n w\.דחא בוביסב םיבמוז 5 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "םיימ טבחמ^n \r%i\y( התגרהy\) .דחא בוביסב םיבמוז 5 גורהת^n", g_zmkillrowcount1[id])
- menu_additem(achvsMenu, szTitle, "24")
- // 25
- if(g_zmkillrowcount1[id] >= 10)
- formatex(szTitle, 99, "חוטב ירי^n w\.דחא בוביסב םיבמוז 10 גורהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "חוטב ירי^n \r%i\y( התגרהy\) .דחא בוביסב םיבמוז 10 גורהת^n", g_zmkillrowcount2[id])
- menu_additem(achvsMenu, szTitle, "24")
- // 26
- if(g_lasthumankillall[id] >= 1)
- formatex(szTitle, 99, "דדוב באז^n w\.םיבמוזה לכ תא גורהתו ןורחאה םדא ןבה היהת r\(חתפנ)^n")
- else
- formatex(szTitle, 99, "דדוב באז^n םיבמוזה לכ תא גורהתו ןורחאה םדא ןבה היהת^n")
- menu_additem(achvsMenu, szTitle, "25")
- menu_setprop(achvsMenu, MPROP_EXIT, MEXIT_ALL)
- menu_setprop(achvsMenu, MPROP_PERPAGE, 3)
- menu_display(id, achvsMenu, 0)
- }
- public menuAchvsHandler(id, menu, item) {}
- public increaseMinutes()
- {
- new players[32], pnum, tempid
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- new CsTeams:team = cs_get_user_team(tempid)
- if(team != CS_TEAM_SPECTATOR && team != CS_TEAM_UNASSIGNED)
- {
- g_Minutes[tempid]++
- if(g_Minutes[tempid] == 600)
- {
- client_print(tempid, print_chat, "^"<3^" תא התחתפ התא ]םיגשיה[")
- }
- }
- updateTableStats(tempid)
- }
- }
- public cmdRoundStart()
- {
- new players[32], pnum, tempid
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- new CsTeams:team = cs_get_user_team(tempid)
- if(team != CS_TEAM_SPECTATOR && team != CS_TEAM_UNASSIGNED)
- {
- g_Rounds[tempid]++
- if(g_Rounds[tempid] == 3000)
- {
- client_print(tempid, print_chat, "^"םירטסקאל^" תא התחתפ התא ]םיגשיה[")
- }
- }
- if(g_LoggedIn[tempid])
- {
- // Infect in round count (reset)
- if(g_infectinrowcount1[tempid] != 5) g_infectinrowcount1[tempid] = 0
- if(g_infectinrowcount2[tempid] != 10) g_infectinrowcount2[tempid] = 0
- if(g_zmkillrowcount1[tempid] != 5) g_zmkillrowcount1[tempid] = 0
- if(g_zmkillrowcount2[tempid] != 10) g_zmkillrowcount2[tempid] = 0
- }
- }
- }
- public createTable()
- {
- new szQuery[2048]
- new len
- len += format(szQuery[len], 2048,"CREATE TABLE IF NOT EXISTS zp_rabs(")
- len += format(szQuery[len], 2048-len,"username VARCHAR(100), ")
- len += format(szQuery[len], 2048-len,"password VARCHAR(100), ")
- len += format(szQuery[len], 2048-len,"totalpoints INT(11), ")
- len += format(szQuery[len], 2048-len,"hkzpoints INT(11), ")
- len += format(szQuery[len], 2048-len,"hknpoints INT(11), ")
- len += format(szQuery[len], 2048-len,"skzpoints INT(11), ")
- len += format(szQuery[len], 2048-len,"hkzknifepoints INT(11), ")
- len += format(szQuery[len], 2048-len,"zihpoints INT(11), ")
- len += format(szQuery[len], 2048-len,"nkhpoints INT(11), ")
- len += format(szQuery[len], 2048-len,"zkspoints INT(11), ")
- len += format(szQuery[len], 2048-len,"zkhpspoints INT(11), ")
- len += format(szQuery[len], 20480-len,"ammopacks INT(11), ")
- len += format(szQuery[len], 2048-len,"minutesplayed INT(11), ")
- len += format(szQuery[len], 2048-len,"zombiekills1 INT(11), ")
- len += format(szQuery[len], 2048-len,"zombiekills2 INT(11), ")
- len += format(szQuery[len], 2048-len,"zombiekills3 INT(11), ")
- len += format(szQuery[len], 2048-len,"zombiehskills INT(11), ")
- len += format(szQuery[len], 2048-len,"rounds INT(11), ")
- len += format(szQuery[len], 2048-len,"humankillinfect1 INT(11), ")
- len += format(szQuery[len], 2048-len,"humankillinfect2 INT(11), ")
- len += format(szQuery[len], 2048-len,"humankillinfect3 INT(11), ")
- len += format(szQuery[len], 2048-len,"gotkilledinfected INT(11), ")
- len += format(szQuery[len], 2048-len,"nemekillknife INT(11), ")
- len += format(szQuery[len], 2048-len,"zombiekillknife INT(11), ")
- len += format(szQuery[len], 2048-len,"winsurvivor INT(11), ")
- len += format(szQuery[len], 2048-len,"winnemesis INT(11), ")
- len += format(szQuery[len], 2048-len,"ninja INT(11), ")
- len += format(szQuery[len], 2048-len,"thinkfast INT(11), ")
- len += format(szQuery[len], 2048-len,"kill600survivor INT(11), ")
- len += format(szQuery[len], 2048-len,"kill600nemesis INT(11), ")
- len += format(szQuery[len], 2048-len,"infectionbomb INT(11), ")
- len += format(szQuery[len], 2048-len,"sprays INT(11), ")
- len += format(szQuery[len], 2048-len,"awpkills INT(11), ")
- len += format(szQuery[len], 2048-len,"infectround1 INT(11), ")
- len += format(szQuery[len], 2048-len,"infectround2 INT(11), ")
- len += format(szQuery[len], 2048-len,"zmkillrow1 INT(11), ")
- len += format(szQuery[len], 2048-len,"zmkillrow2 INT(11), ")
- len += format(szQuery[len], 2048-len,"lasthumankillall INT(11))")
- SQL_ThreadQuery(g_SqlTuple,"createTableThread", szQuery)
- }
- public createTableThread(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
- {
- if(FailState == TQUERY_CONNECT_FAILED)
- return set_fail_state(".LQSל רבחתיהל היה ןתינ אל")
- else if(FailState == TQUERY_QUERY_FAILED)
- return set_fail_state("Query failed.")
- if(Errcode)
- return log_amx("%s : תתליאש לע האיגש",Error)
- return PLUGIN_CONTINUE
- }
- public DeathMsg()
- {
- new killer = read_data(1)
- new victim = read_data(2)
- new hs = read_data(3)
- if(!g_LoggedIn[killer]) return PLUGIN_HANDLED
- // Suicide
- if(killer == victim) return PLUGIN_HANDLED
- if(is_valid_player(killer) && is_valid_player(victim))
- {
- // HUMAN STATISTICS
- // Human kills Zombie
- if(is_hkz_kill(killer, victim))
- {
- g_TotalPoints[killer] += 6
- g_HumanKillsZombiePoints[killer] += 6
- client_print(killer, print_chat, ".יבמוז התגרהש ללגב תודוקנ 6 התלביק עגרכ התא]סוטטס[")
- // Achievements
- if(zp_get_user_last_human(killer) && zp_get_user_last_zombie(victim))
- {
- g_lasthumankillall[killer]++
- if(g_lasthumankillall[killer] == 1)
- {
- client_print(killer, print_chat, "^"דדוב באז^" תא התחתפ התא ]םיגשיה[")
- }
- }
- new weapon = get_user_weapon(killer)
- if(weapon == CSW_KNIFE)
- {
- if(g_killzombieknife[killer] != 200)
- {
- g_killzombieknife[killer]++
- if(g_killzombieknife[killer] == 200)
- {
- client_print(killer, print_chat, "^"הדגאה^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- if(weapon == CSW_AWP)
- {
- if(g_awpkills[killer] != 200)
- {
- g_awpkills[killer]++
- if(g_awpkills[killer] == 200)
- {
- client_print(killer, print_chat, "^"םלשומה^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- if(g_infectinrowcount1[killer] != 5)
- {
- g_zmkillrowcount1[killer]++
- if(g_zmkillrowcount1[killer] == 5)
- {
- client_print(killer, print_chat, "^"םיבמוז טבחמ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else if(g_zmkillrowcount2[killer] != 10)
- {
- g_zmkillrowcount2[killer]++
- if(g_zmkillrowcount2[killer] == 10)
- {
- client_print(killer, print_chat, "^"חוטב ירי^" תא התחתפ התא ]םיגשיה[")
- }
- }
- // Achievements
- if(g_ZombieKillCount1[killer] != 100)
- {
- g_ZombieKillCount1[killer]++
- if(g_ZombieKillCount1[killer] == 100)
- {
- client_print(killer, print_chat, "^"םיתמ םיפידע םיבמוז^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else
- {
- // 1. Level is OK
- if(g_ZombieKillCount2[killer] != 600)
- {
- g_ZombieKillCount2[killer]++
- if(g_ZombieKillCount2[killer] == 600)
- {
- client_print(killer, print_chat, "^"םיבמוז חצור^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else
- {
- // 2. Level is ok.
- if(g_ZombieKillCount3[killer] != 1000)
- {
- g_ZombieKillCount3[killer]++
- if(g_ZombieKillCount3[killer] == 1000)
- {
- client_print(killer, print_chat, "^"יעוצקמ םיבמוז חצור^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- }
- if(!zp_get_user_zombie(killer) && hs)
- {
- if(zp_get_user_zombie(victim) || zp_get_user_nemesis(victim)|| zp_get_user_assassin(victim))
- {
- g_ZombieHSKillCount[killer]++
- if(g_ZombieHSKillCount[killer] == 600)
- {
- client_print(killer, print_chat, "^"!טוש-דאה !םוב^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- // Human kills Zombie by Knife
- if(is_hkz_knife_kill(killer, victim))
- {
- g_TotalPoints[killer] += 10
- g_HumanKillsZombieKnifePoints[killer] += 10
- client_print(killer, print_chat, ".ןיכס םע יבמוז התגרה יכ תודוקנ 10 התלביק התא ]סוטטס[")
- }
- // Human kills Nemesis
- if(is_hkn_kill(killer, victim))
- {
- g_TotalPoints[killer] += 10
- g_HumanKillsNemesisPoints[killer] += 10
- client_print(killer, print_chat, ".סיסמנ התגרה יכ תודוקנ 10 התלביק התא ]סוטטס[")
- // Achievements
- new weapon = get_user_weapon(killer)
- if(weapon == CSW_KNIFE)
- {
- if(g_nemeKillCountKnife[killer] != 10)
- {
- g_nemeKillCountKnife[killer]++
- if(g_nemeKillCountKnife[killer] == 10)
- {
- client_print(killer, print_chat, "^"לזרב יבצע^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- //achievement
- if(zp_get_user_nemesis(victim) && !zp_get_user_zombie(killer))
- {
- if(zp_is_plague_round())
- {
- if(g_killnemesisplague[killer] != 300)
- {
- g_killnemesisplague[killer]++
- if(g_killnemesisplague[killer] == 300)
- {
- client_print(killer, print_chat, "^"רהמ בושחת^" תא התחתפ התא ]םיגשיה[")
- }
- }
- if(g_kill600nemesis[killer] != 600)
- {
- g_kill600nemesis[killer]++
- if(g_kill600nemesis[killer] == 600)
- {
- client_print(killer, print_chat, "^"חדינ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- else
- {
- if(g_kill600nemesis[killer] != 600)
- {
- g_kill600nemesis[killer]++
- if(g_kill600nemesis[killer] == 600)
- {
- client_print(killer, print_chat, "^"חדינ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- // Survivor kills Zombie
- if(is_skz_kill(killer, victim))
- {
- g_TotalPoints[killer] += 6
- g_SurvivorKillsZombiePoints[killer] += 6
- client_print(killer, print_chat, ".דרושה התאשכ יבמוז התגרה יכ תודוקנ 6 התלביק התא ]סוטטס[")
- // Achievements
- if(zp_get_user_last_zombie(victim))
- {
- if(g_winsurvivor[killer] != 10)
- {
- g_winsurvivor[killer]++
- if(g_winsurvivor[killer] == 10)
- {
- client_print(killer, print_chat, "^"דרושה^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- // ZOMBIE STATISTICS
- // Nemesis kills Human
- if(is_nkh_kill(killer, victim))
- {
- g_TotalPoints[killer] += 3
- g_NemesisKillsHuman[killer] += 3
- client_print(killer, print_chat, ".סיסמנ התאשכ םדא-ןב התגרה יכ תודוקנ 3 התלביק התא ]סוטטס[")
- // Achievements
- if(zp_get_user_last_human(victim))
- {
- if(g_winnemesis[killer] != 10)
- {
- g_winnemesis[killer]++
- if(g_winnemesis[killer] == 10)
- {
- client_print(killer, print_chat, "^"סיסמנ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- // Zombie kill survivor
- if(is_zks_kill(killer, victim))
- {
- g_TotalPoints[killer] += 10
- g_ZombieKillsSurvivor[killer] += 10
- client_print(killer, print_chat, ".דרושה תא התגרה יכ תודוקנ 10 התלביק התא ]סוטטס[")
- }
- //achievement
- if(zp_get_user_survivor(victim) && zp_get_user_zombie(killer))
- {
- if(zp_is_plague_round())
- {
- if(g_killsurvivorplague[killer] != 300)
- {
- g_killsurvivorplague[killer]++
- if(g_killsurvivorplague[killer] == 300)
- {
- client_print(killer, print_chat, "^"ה'גנינ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- if(g_kill600survivor[killer] != 600)
- {
- g_kill600survivor[killer]++
- if(g_kill600survivor[killer] == 600)
- {
- client_print(killer, print_chat, "^"תובבל רבוש^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- else
- {
- if(g_kill600survivor[killer] != 600)
- {
- g_kill600survivor[killer]++
- if(g_kill600survivor[killer] == 600)
- {
- client_print(killer, print_chat, "^"תובבל רבוש^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- // Zombie kills Human
- if(is_zkhps_kill(killer, victim))
- {
- g_TotalPoints[killer] += 4
- g_ZombieKillsHumanPS[killer] += 4
- client_print(killer, print_chat, ".םדא ןב התגרה יכ תודוקנ 4 התלביק התא ]סוטטס[")
- // Achievements
- // Zombie Kill/Infect Achivement
- if(g_KillInfectCount1[killer] != 200)
- {
- g_KillInfectCount1[killer]++
- if(g_KillInfectCount1[killer] == 200)
- {
- client_print(killer, print_chat, "^"...חומ מממ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else
- {
- // 1. Level is OK
- if(g_KillInfectCount2[killer] != 1200)
- {
- g_KillInfectCount2[killer]++
- if(g_KillInfectCount2[killer] == 1200)
- {
- client_print(killer, print_chat, "^"הלועה סקינופה^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else
- {
- // 2. Level is ok.
- if(g_KillInfectCount3[killer] != 2000)
- {
- g_KillInfectCount3[killer]++
- if(g_KillInfectCount3[killer] == 2000)
- {
- client_print(killer, print_chat, "^"םוהיז^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- // Got Killed / Infected Achievements
- g_gotKillInfectCount[victim]++
- if(g_gotKillInfectCount[victim] == 1000)
- {
- client_print(killer, print_chat, "^"תובטה םע םיביוא^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- return PLUGIN_CONTINUE
- }
- public zp_user_infected_pre(infected, infector, nemesis)
- {
- if(!g_LoggedIn[infector]) return PLUGIN_HANDLED
- if(is_valid_player(infected) && is_valid_player(infector))
- {
- // zombie infects human
- if(is_zih_infect(infected, infector, nemesis))
- {
- g_TotalPoints[infector] += 3
- g_ZombieInfectsHumanPoints[infector] += 3
- client_print(infector, print_chat, ".יבמוזל םדא ןב התכפה יכ תודוקנ 3 התלביק התא ]סוטטס[")
- // Achievements
- if(g_KillInfectCount1[infector] != 200)
- {
- g_KillInfectCount1[infector]++
- if(g_KillInfectCount1[infector] == 200)
- {
- client_print(infector, print_chat, "^"...חומ מממ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else
- {
- // 1. Level is OK
- if(g_KillInfectCount2[infector] != 1200)
- {
- g_KillInfectCount2[infector]++
- if(g_KillInfectCount2[infector] == 1200)
- {
- client_print(infector, print_chat, "^"הלועה סקינופה^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else
- {
- // 2. Level is ok.
- if(g_KillInfectCount3[infector] != 2000)
- {
- g_KillInfectCount3[infector]++
- if(g_KillInfectCount3[infector] == 2000)
- {
- client_print(infector, print_chat, "^"םוהיז^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- }
- if(g_infectinrowcount1[infector] != 5)
- {
- g_infectinrowcount1[infector]++
- if(g_infectinrowcount1[infector] == 5)
- {
- client_print(infector, print_chat, "^"םירודכ ןיסח^" תא התחתפ התא ]םיגשיה[")
- }
- }
- else if(g_infectinrowcount2[infector] != 10)
- {
- g_infectinrowcount2[infector]++
- if(g_infectinrowcount2[infector] == 10)
- {
- client_print(infector, print_chat, "^"תוומה ךאלמ^" תא התחתפ התא ]םיגשיה[")
- }
- }
- // Got Killed / Infected Achievements
- g_gotKillInfectCount[infected]++
- if(g_gotKillInfectCount[infected] == 1000)
- {
- client_print(infected, print_chat, "^"תובטה םע םיביוא^" תא התחתפ התא ]םיגשיה[")
- }
- }
- }
- return PLUGIN_CONTINUE
- }
- /* From here: STATUS POINTS SYSTEM FUNCTIONS *+*+*+*+* */
- // killer: Zombie
- // victim: Human
- // rounds: Plague/Swarm
- public is_zkhps_kill(killer, victim)
- {
- if(zp_get_user_zombie(killer) && !zp_get_user_zombie(victim) && !zp_get_user_survivor(victim) && !zp_get_user_nemesis(killer))
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // killer: Zombie No Neme
- // victim: survivor
- // rounds: survivorround
- public is_zks_kill(killer, victim)
- {
- if(zp_get_user_zombie(killer) && zp_get_user_survivor(victim) && zp_is_survivor_round() && !zp_get_user_nemesis(killer))
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // killer: Nemesis
- public is_nkh_kill(killer, victim)
- {
- if(zp_get_user_nemesis(killer))
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // Infector: Is Zombie, not turned to nemesis
- public is_zih_infect(infected, infector, turnedtonemesis)
- {
- if(zp_get_user_zombie(infector) && !turnedtonemesis)
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // killer: Human, No survivor
- // victim: Is Zombie, not Nemesis
- // rounds: No nemeround, no plgue/swarm, no survivorround
- public is_hkz_kill(killer, victim)
- {
- if(!zp_get_user_zombie(killer) && !zp_get_user_survivor(killer) && !zp_get_user_nemesis(victim) && zp_get_user_zombie(victim) && !zp_is_nemesis_round() && !zp_is_survivor_round())
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // killer: Human KILL BY KNIFE
- // victim: Is Zombie
- public is_hkz_knife_kill(killer, victim)
- {
- if(!zp_get_user_zombie(killer) && zp_get_user_zombie(victim))
- {
- new weapon = get_user_weapon(killer)
- if(weapon == CSW_KNIFE)
- {
- return 1
- }
- }
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // killer: no zombie
- // victim: is Nemesis
- // rounds: is neme round
- public is_hkn_kill(killer, victim)
- {
- if(!zp_get_user_zombie(killer) && zp_get_user_nemesis(victim) && zp_is_nemesis_round())
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- // killer: is Survivor
- // victim: is zombie
- // rounds: is Survivor round
- public is_skz_kill(killer, victim)
- {
- if(zp_get_user_survivor(killer) && zp_get_user_zombie(victim) && zp_is_survivor_round())
- return 1
- else
- return 0
- return PLUGIN_CONTINUE
- }
- public menuStats(id)
- {
- if(!g_LoggedIn[id])
- {
- client_print(id, print_chat, "[Stats] You arent logged in.")
- return PLUGIN_HANDLED
- }
- else
- {
- new menuStatistics = menu_create("\yהקיטסיטטס", "menuStatsHandler")
- menu_additem(menuStatistics, "\y15פוט^n", "1")
- new szTotalPoints[60]
- formatex(szTotalPoints, 59, "\r%i: \wתודוקנ כהס", g_TotalPoints[id])
- menu_addtext(menuStatistics, szTotalPoints, 0)
- new szMin[60]
- formatex(szMin, 59, "\r%i :\wתוקד התקחש", g_Minutes[id])
- menu_addtext(menuStatistics, szMin, 0)
- new szRounds[60]
- formatex(szRounds, 59, "\r%i :\wןקחשה לש םיבוביס^n", g_Rounds[id])
- menu_addtext(menuStatistics, szRounds, 0)
- // HUMAN
- new szHKZ[60]
- formatex(szHKZ, 59, "r\)תודוקנ (%i y\תוגירה %i : w\התגרה םיבמוז המכ", g_HumanKillsZombiePoints[id] / 6, g_HumanKillsZombiePoints[id])
- menu_addtext(menuStatistics, szHKZ, 0)
- new szHKZknife[60]
- formatex(szHKZknife, 59, "r\)תודוקנ (%i y\תוגירה %i : w\ןיכס םע התגרה םיבמוז המכ", g_HumanKillsZombieKnifePoints[id] / 10, g_HumanKillsZombieKnifePoints[id])
- menu_addtext(menuStatistics, szHKZknife, 0)
- new szHKN[60]
- formatex(szHKN, 59, "r\)תודוקנ (%i y\תוגירה %i : w\התגרה סיסמנ המכ", g_HumanKillsNemesisPoints[id] / 10, g_HumanKillsNemesisPoints[id])
- menu_addtext(menuStatistics, szHKN, 0)
- new szSKZ[60]
- formatex(szSKZ, 59, "r\)תודוקנ (%i y\תוגירה %i : w\דרושכ התגרה םיבמוז המכ^n^n", g_SurvivorKillsZombiePoints[id] / 6, g_SurvivorKillsZombiePoints[id])
- menu_addtext(menuStatistics, szSKZ, 0)
- // Zombie
- new szZIH[60]
- formatex(szZIH, 59, "r\)תודוקנ (%i y\םימוהיז %i : w\התקבדה םדא ינב המכ", g_ZombieInfectsHumanPoints[id] / 3, g_ZombieInfectsHumanPoints[id])
- menu_addtext(menuStatistics, szZIH, 0)
- new szZKH[60]
- formatex(szZKH, 59, "r\)תודוקנ (%i y\התגרה %i : w\התגרה םדא ינב המכ", g_ZombieKillsHumanPS[id] / 4, g_ZombieKillsHumanPS[id])
- menu_addtext(menuStatistics, szZKH, 0)
- new szZKS[60]
- formatex(szZKS, 59, "r\)תודוקנ (%i y\התגרה %i : w\התגרה םידרוש המכ", g_ZombieKillsSurvivor[id] / 10, g_ZombieKillsSurvivor[id])
- menu_addtext(menuStatistics, szZKS, 0)
- new szNKH[60]
- formatex(szNKH, 59, "r\)תודוקנ (%i y\התגרה %i : w\סיסמנכ התגרה םדא ינב המכ", g_NemesisKillsHuman[id] / 3, g_NemesisKillsHuman[id])
- menu_addtext(menuStatistics, szNKH, 0)
- menu_display(id, menuStatistics, 0)
- }
- return PLUGIN_CONTINUE
- }
- public menuStatsHandler(id, menu, item)
- {
- new data[6], iName[64], access, callback
- menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
- new key = str_to_num(data)
- switch(key)
- {
- // Top10
- case 1:
- {
- cmdTop10(id)
- }
- }
- menu_destroy(menu)
- }
- public cmdTop10(id)
- {
- g_Top10TempID = id
- SQL_ThreadQuery(g_SqlTuple, "top10Thread","SELECT * FROM zp_rabs ORDER BY totalpoints DESC LIMIT 10")
- }
- public top10Thread(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
- {
- if(FailState == TQUERY_CONNECT_FAILED)
- return set_fail_state("Could not connect to SQL database.")
- else if(FailState == TQUERY_QUERY_FAILED)
- return set_fail_state("Query failed.")
- if(Errcode)
- return log_amx("%s :שגיאה על שאילתת",Error)
- new id = g_Top10TempID
- const SIZE = 9000;
- new msg[SIZE + 1]
- new len;
- len += formatex(msg[len], SIZE, "<html><body><h1>Top10</h1>")
- len += formatex(msg[len], SIZE-len, "<table border=^"1^">")
- len += formatex(msg[len], SIZE-len, "<tr><td>הגרד</td>")
- len += formatex(msg[len], SIZE-len, "<td style=^"width: 40px;^">oa</td>")
- len += formatex(msg[len], SIZE-len, "<td>תודוקנ כהס</td>")
- len += formatex(msg[len], SIZE-len, "<td>וגרהנש םיבמוז</td>")
- len += formatex(msg[len], SIZE-len, "<td>וגרהנש םישנא</td>")
- len += formatex(msg[len], SIZE-len, "<td>וגרהנש סיסמנ</td>")
- len += formatex(msg[len], SIZE-len, "<td>וגרהנש םידרוש</td>")
- len += formatex(msg[len], SIZE-len, "<td>םיבמוזל וכפהנש םישנא</td></tr>")
- new name[45], totalpoints, hkzpoints, hknpoints, zih, zks, zkh
- new count = 1
- while(SQL_MoreResults(Query))
- {
- // columns start at 0
- totalpoints = SQL_ReadResult(Query, 2)
- hkzpoints = SQL_ReadResult(Query, 3)
- hknpoints = SQL_ReadResult(Query, 4)
- zih = SQL_ReadResult(Query, 7)
- zks = SQL_ReadResult(Query, 9)
- zkh = SQL_ReadResult(Query, 10)
- SQL_ReadResult(Query, 0, name, 44)
- len += formatex(msg[len], SIZE-len, "<tr><td>%i.</td>", count)
- len += formatex(msg[len], SIZE-len, "<td>%s</td>", name)
- len += formatex(msg[len], SIZE-len, "<td>%i</td>", totalpoints)
- len += formatex(msg[len], SIZE-len, "<td>%i</td>", hkzpoints / 6)
- len += formatex(msg[len], SIZE-len, "<td>%i</td>", zkh / 4, zkh)
- len += formatex(msg[len], SIZE-len, "<td>%i</td>", hknpoints / 10)
- len += formatex(msg[len], SIZE-len, "<td>%i</td>", zks / 10)
- len += formatex(msg[len], SIZE-len, "<td>%i</td></tr>", zih / 3)
- count++
- SQL_NextRow(Query)
- }
- len = formatex(msg[len], SIZE-len, "</table></body></html>")
- show_motd(id, msg, "Top10")
- return PLUGIN_CONTINUE
- }
- public cmdRank(id)
- {
- if(!g_LoggedIn[id])
- return PLUGIN_HANDLED
- g_RankTempID = id
- SQL_ThreadQuery(g_SqlTuple,"rankThread","SELECT username, totalpoints FROM zp_rabs ORDER BY totalpoints DESC")
- return PLUGIN_CONTINUE
- }
- public rankThread(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
- {
- if(FailState == TQUERY_CONNECT_FAILED)
- return set_fail_state(".LQSל רבחתיהל ןתינ אל")
- else if(FailState == TQUERY_QUERY_FAILED)
- return set_fail_state("Query failed.")
- if(Errcode)
- return log_amx(":%s תתליאש לע האיגש",Error)
- new iRowsFound = SQL_NumRows(Query)
- new szName[50]
- new iRank
- new iRowCount
- while(SQL_MoreResults(Query))
- {
- iRowCount++
- SQL_ReadResult(Query, 0, szName, 49)
- if(equal(g_szTempName[g_RankTempID], szName))
- {
- iRank = iRowCount
- break
- }
- SQL_NextRow(Query)
- }
- client_print(g_RankTempID, print_chat, ".תודוקנ %i םע %i ךותמ %i אוה ךלש קנארה",g_TotalPoints[g_RankTempID], iRowsFound, iRank)
- return PLUGIN_CONTINUE
- }
- /* END: STATUS POINTS SYSTEM FUNCTIONS */
- /* From Here: REGISTER SYSTEM FUNCTIONS +*+*+*+ */
- public menuRegister(id)
- {
- // Show him the menu just if he isnt logged in so far
- if(g_LoggedIn[id] && is_valid_player(id))
- {
- client_print(id, print_chat, ".שדחמ רבחתהל הצור התא םא תרשל שדחמ סנכ.רבוחמ רבכ התא ]תורבחתה[")
- }
- if(!g_LoggedIn[id] && is_valid_player(id))
- {
- new menuLoginCreate = menu_create("\yתורבחתה תכרעמ", "menuLoginCreateHandler")
- menu_additem(menuLoginCreate, "\wשדח שמתשמ", "1")
- menu_additem(menuLoginCreate, "\rתורבחתה^n", "2")
- menu_display(id, menuLoginCreate, 0)
- // Prevent them from Joining a Team
- return PLUGIN_HANDLED
- }
- return PLUGIN_CONTINUE
- }
- public menuLoginCreateHandler(id, menuLoginCreate, item)
- {
- new data[6], iName[64], access, callback
- menu_item_getinfo(menuLoginCreate, item, access, data, 5, iName, 63, callback)
- new key = str_to_num(data)
- switch(key)
- {
- // New Account
- case 1:
- {
- g_RegisterSelection[id] = 1
- client_cmd(id, "שמתשמ םש-העדוהה בצמ")
- }
- case 2:
- {
- g_RegisterSelection[id] = 2
- client_cmd(id, "שמתשמ םש-העדוהה בצמ")
- }
- }
- }
- public cmdUsername(id)
- {
- // if user is already logged in stop him
- if(g_LoggedIn[id])
- {
- return PLUGIN_HANDLED
- }
- read_args(g_szTempName[id], 99)
- remove_quotes(g_szTempName[id])
- if(contain(g_szTempName[id], " ") != -1 || strlen(g_szTempName[id]) < 3)
- {
- client_print(id, print_chat, "[Login] Invalid Username. Try another one now.")
- client_cmd(id, "שמתשמ םש-העדוהה בצמ")
- return PLUGIN_HANDLED
- }
- if(g_RegisterSelection[id] == 1 || g_RegisterSelection[id] == 2)
- {
- new ErrorCode
- new Error[512]
- new Handle:SqlConnection = SQL_Connect(g_SqlTuple, ErrorCode, Error, 511)
- if(SqlConnection == Empty_Handle)
- {
- set_fail_state(Error)
- }
- new Handle:Query = SQL_PrepareQuery(SqlConnection, "SELECT * FROM zp_rabs WHERE username='%s'", g_szTempName[id])
- if(!SQL_Execute(Query))
- {
- SQL_QueryError(Query, Error, 511)
- set_fail_state(Error)
- }
- new iRowsFound = SQL_NumRows(Query)
- switch(g_RegisterSelection[id])
- {
- case 1:
- {
- // No Resluts
- if(iRowsFound < 1)
- {
- client_cmd(id, "אמסיס-העדוהה בצמ")
- }
- // Username Found
- else
- {
- client_print(id, print_chat, ".רחא שמתשמ םש רחב םייק רבכ התרחבש שמתשמה םש ]תורבחתה[")
- client_cmd(id, "שמתשמ םש-העדוהה בצמ")
- }
- }
- case 2:
- {
- // No Resluts
- if(iRowsFound < 1)
- {
- client_print(id, print_chat, ".בוש הסנ אנא !תכרעמב אצמנ אל נתמשרש שמתשמה םש ]תורבחתה[")
- client_cmd(id, "שמתשמ םש-העדוהה בצמ")
- }
- // Username Found
- else
- {
- client_cmd(id, "אמסיס-העדוהה בצמ")
- }
- }
- }
- SQL_FreeHandle(Query)
- SQL_FreeHandle(SqlConnection)
- }
- return PLUGIN_CONTINUE
- }
- public cmdPw(id)
- {
- // if user is already logged in stop him
- if(g_LoggedIn[id] == true)
- {
- return PLUGIN_HANDLED
- }
- read_args(g_szTempPassWord[id], 99)
- remove_quotes(g_szTempPassWord[id])
- if(contain(g_szTempPassWord[id], " ") != -1 || strlen(g_szTempPassWord[id]) < 3 || strlen(g_szTempName[id]) < 3)
- {
- client_print(id, print_chat, ".אמסיס דוע הסנ !הנוכנ הניא התמשרש אמסיסה ]תורבחתה[")
- client_cmd(id, "אמסיס-העדוהה בצמ")
- return PLUGIN_HANDLED
- }
- switch(g_RegisterSelection[id])
- {
- // Register new User
- case 1:
- {
- new ErrorCode
- new Error[512]
- new Handle:SqlConnection = SQL_Connect(g_SqlTuple, ErrorCode, Error, 511)
- if(SqlConnection == Empty_Handle)
- {
- set_fail_state(Error)
- }
- new Handle:Query = SQL_PrepareQuery(SqlConnection, "INSERT INTO zp_rabs VALUES('%s','%s', '0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0')", g_szTempName[id], g_szTempPassWord[id])
- if(!SQL_Execute(Query))
- {
- SQL_QueryError(Query, Error, 511)
- set_fail_state(Error)
- }
- // Set him to zombies
- client_cmd(id, "jointeam 2")
- // Set user as new in User
- g_LoggedIn[id] = true
- // Print him a Message
- client_print(id, print_chat, ".שדח ןובשח החלצהב התרצי ]תורבחתה[")
- client_print(id, print_chat, "'%s' = שמתשמ םש ]תורבחתה[", g_szTempName[id])
- client_print(id, print_chat, "'%s' = אמסיס ]תורבחתה[", g_szTempPassWord[id])
- SQL_FreeHandle(Query)
- SQL_FreeHandle(SqlConnection)
- }
- // Login User
- case 2:
- {
- new ErrorCode
- new Error[512]
- new Handle:SqlConnection = SQL_Connect(g_SqlTuple, ErrorCode, Error, 511)
- if(SqlConnection == Empty_Handle)
- {
- set_fail_state(Error)
- }
- new Handle:Query = SQL_PrepareQuery(SqlConnection, "SELECT * FROM zp_rabs WHERE username='%s'", g_szTempName[id])
- if(!SQL_Execute(Query))
- {
- SQL_QueryError(Query, Error, 511)
- set_fail_state(Error)
- }
- new szSqlPassword[100]
- SQL_ReadResult(Query, 1, szSqlPassword, 99)
- // if password is right
- if(equal(g_szTempPassWord[id], szSqlPassword))
- {
- // Kick Player who has logged in with same data
- new players[32], pnum, tempid
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- if(equal(g_szTempName[id], g_szTempName[tempid]) && id != tempid)
- {
- client_cmd(tempid, "קתנתה")
- }
- }
- // Set him to zombies
- client_cmd(id, "jointeam 2")
- g_LoggedIn[id] = true
- // Get Data from Database
- g_TotalPoints[id] = SQL_ReadResult(Query, 2)
- g_HumanKillsZombiePoints[id] = SQL_ReadResult(Query, 3)
- g_HumanKillsNemesisPoints[id] = SQL_ReadResult(Query, 4)
- g_SurvivorKillsZombiePoints[id] = SQL_ReadResult(Query, 5)
- g_HumanKillsZombieKnifePoints[id] = SQL_ReadResult(Query, 6)
- g_ZombieInfectsHumanPoints[id] = SQL_ReadResult(Query, 7)
- g_NemesisKillsHuman[id] = SQL_ReadResult(Query, 8)
- g_ZombieKillsSurvivor[id] = SQL_ReadResult(Query, 9)
- g_ZombieKillsHumanPS[id] = SQL_ReadResult(Query, 10)
- g_AP[id] = SQL_ReadResult(Query, 11)
- g_Minutes[id] = SQL_ReadResult(Query, 12)
- g_ZombieKillCount1[id] = SQL_ReadResult(Query, 13)
- g_ZombieKillCount2[id] = SQL_ReadResult(Query, 14)
- g_ZombieKillCount3[id] = SQL_ReadResult(Query, 15)
- g_ZombieHSKillCount[id] = SQL_ReadResult(Query, 16)
- g_Rounds[id] = SQL_ReadResult(Query, 17)
- g_KillInfectCount1[id] = SQL_ReadResult(Query, 18)
- g_KillInfectCount2[id] = SQL_ReadResult(Query, 19)
- g_KillInfectCount3[id] = SQL_ReadResult(Query, 20)
- g_gotKillInfectCount[id] = SQL_ReadResult(Query, 21)
- g_nemeKillCountKnife[id] = SQL_ReadResult(Query, 22)
- g_killzombieknife[id] = SQL_ReadResult(Query, 23)
- g_winsurvivor[id] = SQL_ReadResult(Query, 24)
- g_winnemesis[id] = SQL_ReadResult(Query, 25)
- g_killsurvivorplague[id] = SQL_ReadResult(Query, 26)
- g_killnemesisplague[id] = SQL_ReadResult(Query, 27)
- g_kill600survivor[id] = SQL_ReadResult(Query, 28)
- g_kill600nemesis[id] = SQL_ReadResult(Query, 29)
- g_InfectionBombCount[id] = SQL_ReadResult(Query, 30)
- g_SprayCount[id] = SQL_ReadResult(Query, 31)
- g_awpkills[id] = SQL_ReadResult(Query, 32)
- g_infectinrowcount1[id] = SQL_ReadResult(Query, 33)
- g_infectinrowcount2[id] = SQL_ReadResult(Query, 34)
- g_zmkillrowcount1[id] = SQL_ReadResult(Query, 35)
- g_zmkillrowcount2[id] = SQL_ReadResult(Query, 36)
- g_lasthumankillall[id] = SQL_ReadResult(Query, 37)
- client_print(id, print_chat, "%s. אבה ךורב ]תורבחתה[", g_szTempName[id])
- }
- else
- {
- client_print(id, print_chat, ".בוש הסנ !הנוכנ אל אמסיס ]תורבחתה[")
- client_cmd(id, "messagemode szPassword")
- }
- SQL_FreeHandle(Query)
- SQL_FreeHandle(SqlConnection)
- }
- }
- return PLUGIN_CONTINUE
- }
- /* END: REGISTER SYSTEM FUNCTIONS +*+*+*+ */
- public client_disconnect(id)
- {
- updateTable(id)
- g_LoggedIn[id] = false
- g_szTempName[id][0] = EOS
- g_szTempPassWord[id][0] = EOS
- g_TotalPoints[id] = 0
- g_HumanKillsNemesisPoints[id] = 0
- g_HumanKillsZombiePoints[id] = 0
- g_SurvivorKillsZombiePoints[id] = 0
- g_HumanKillsZombieKnifePoints[id] = 0
- g_ZombieInfectsHumanPoints[id] = 0
- g_NemesisKillsHuman[id] = 0
- g_ZombieKillsSurvivor[id] = 0
- g_ZombieKillsHumanPS[id] = 0
- g_AP[id] = 0
- g_Minutes[id] = 0
- g_ZombieKillCount1[id] = 0
- g_ZombieKillCount2[id] = 0
- g_ZombieKillCount3[id] = 0
- g_ZombieHSKillCount[id] = 0
- g_Rounds[id] = 0
- g_KillInfectCount1[id] = 0
- g_KillInfectCount2[id] = 0
- g_KillInfectCount3[id] = 0
- g_gotKillInfectCount[id] = 0
- g_killzombieknife[id] = 0
- g_nemeKillCountKnife[id] = 0
- g_killsurvivorplague[id] = 0
- g_killnemesisplague[id] = 0
- g_kill600survivor[id] = 0
- g_kill600nemesis[id] = 0
- g_InfectionBombCount[id] = 0
- g_SprayCount[id] = 0
- g_awpkills[id] = 0
- g_infectinrowcount1[id] = 0
- g_infectinrowcount2[id] = 0
- g_zmkillrowcount1[id] = 0
- g_zmkillrowcount2[id] = 0
- g_lasthumankillall[id] = 0
- }
- public updateTable(id)
- {
- // Save Data
- if(g_LoggedIn[id])
- {
- new szQuery[2048]
- new len = 0
- g_AP[id] += zp_get_user_ammo_packs(id)
- zp_set_user_ammo_packs(id, 0)
- len += format(szQuery[len], 2048, "UPDATE zp_rabs SET ")
- len += format(szQuery[len], 2048-len,"totalpoints = '%i', ", g_TotalPoints[id])
- len += format(szQuery[len], 2048-len,"hkzpoints = '%i', ", g_HumanKillsZombiePoints[id])
- len += format(szQuery[len], 2048-len,"hknpoints = '%i', ", g_HumanKillsNemesisPoints[id])
- len += format(szQuery[len], 2048-len,"skzpoints = '%i', ", g_SurvivorKillsZombiePoints[id])
- len += format(szQuery[len], 2048-len,"hkzknifepoints = '%i', ", g_HumanKillsZombieKnifePoints[id])
- len += format(szQuery[len], 2048-len,"zihpoints = '%i', ", g_ZombieInfectsHumanPoints[id])
- len += format(szQuery[len], 2048-len,"nkhpoints = '%i', ", g_NemesisKillsHuman[id])
- len += format(szQuery[len], 2048-len,"zkspoints = '%i', ", g_ZombieKillsSurvivor[id])
- len += format(szQuery[len], 2048-len,"zkhpspoints = '%i', ", g_ZombieKillsHumanPS[id])
- len += format(szQuery[len], 2048-len,"ammopacks = '%i', ", g_AP[id])
- len += format(szQuery[len], 2048-len,"minutesplayed = '%i', ", g_Minutes[id])
- len += format(szQuery[len], 2048-len,"zombiekills1 = '%i', ", g_ZombieKillCount1[id])
- len += format(szQuery[len], 2048-len,"zombiekills2 = '%i', ", g_ZombieKillCount2[id])
- len += format(szQuery[len], 2048-len,"zombiekills3 = '%i', ", g_ZombieKillCount3[id])
- len += format(szQuery[len], 2048-len,"zombiehskills = '%i', ", g_ZombieHSKillCount[id])
- len += format(szQuery[len], 2048-len,"rounds = '%i', ", g_Rounds[id])
- len += format(szQuery[len], 2048-len,"humankillinfect1 = '%i', ", g_KillInfectCount1[id])
- len += format(szQuery[len], 2048-len,"humankillinfect2 = '%i', ", g_KillInfectCount2[id])
- len += format(szQuery[len], 2048-len,"humankillinfect3 = '%i', ", g_KillInfectCount3[id])
- len += format(szQuery[len], 2048-len,"gotkilledinfected = '%i', ", g_gotKillInfectCount[id])
- len += format(szQuery[len], 2048-len,"nemekillknife = '%i', ", g_nemeKillCountKnife[id])
- len += format(szQuery[len], 2048-len,"zombiekillknife = '%i', ", g_nemeKillCountKnife[id])
- len += format(szQuery[len], 2048-len,"winsurvivor = '%i', ", g_winsurvivor[id])
- len += format(szQuery[len], 2048-len,"winnemesis = '%i', ", g_winnemesis[id])
- len += format(szQuery[len], 2048-len,"ninja = '%i', ", g_killsurvivorplague[id])
- len += format(szQuery[len], 2048-len,"thinkfast = '%i', ", g_killnemesisplague[id])
- len += format(szQuery[len], 2048-len,"kill600survivor = '%i', ", g_kill600survivor[id])
- len += format(szQuery[len], 2048-len,"kill600nemesis = '%i', ", g_kill600nemesis[id])
- len += format(szQuery[len], 2048-len,"infectionbomb = '%i', ", g_InfectionBombCount[id])
- len += format(szQuery[len], 2048-len,"sprays = '%i', ", g_SprayCount[id])
- len += format(szQuery[len], 2048-len,"awpkills = '%i', ", g_awpkills[id])
- len += format(szQuery[len], 2048-len,"infectround1 = '%i', ", g_infectinrowcount1[id])
- len += format(szQuery[len], 2048-len,"infectround2 = '%i', ", g_infectinrowcount2[id])
- len += format(szQuery[len], 2048-len,"zmkillrow1 = '%i', ", g_zmkillrowcount1[id])
- len += format(szQuery[len], 2048-len,"zmkillrow2 = '%i', ", g_zmkillrowcount2[id])
- len += format(szQuery[len], 2048-len,"lasthumankillall = '%i' ", g_lasthumankillall[id])
- len += format(szQuery[len], 2048-len,"WHERE username = '%s'", g_szTempName[id])
- SQL_ThreadQuery(g_SqlTuple,"updateTableThread", szQuery)
- }
- }
- public updateTableThread(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
- {
- // lots of error checking
- if(FailState == TQUERY_CONNECT_FAILED)
- return set_fail_state(".LQSל רבחתיהל ןתינ אל")
- else if(FailState == TQUERY_QUERY_FAILED)
- return set_fail_state(".הלשכנ התליאשה")
- if(Errcode)
- return log_amx("%s : תתליאש לע האיגש",Error)
- return PLUGIN_CONTINUE
- }
- public updateTableStats(id)
- {
- // Save Data
- if(g_LoggedIn[id])
- {
- new szQuery[2048]
- new len = 0
- len += format(szQuery[len], 2048, "UPDATE zp_rabs SET ")
- len += format(szQuery[len], 2048-len,"totalpoints = '%i', ", g_TotalPoints[id])
- len += format(szQuery[len], 2048-len,"hkzpoints = '%i', ", g_HumanKillsZombiePoints[id])
- len += format(szQuery[len], 2048-len,"hknpoints = '%i', ", g_HumanKillsNemesisPoints[id])
- len += format(szQuery[len], 2048-len,"skzpoints = '%i', ", g_SurvivorKillsZombiePoints[id])
- len += format(szQuery[len], 2048-len,"hkzknifepoints = '%i', ", g_HumanKillsZombieKnifePoints[id])
- len += format(szQuery[len], 2048-len,"zihpoints = '%i', ", g_ZombieInfectsHumanPoints[id])
- len += format(szQuery[len], 2048-len,"nkhpoints = '%i', ", g_NemesisKillsHuman[id])
- len += format(szQuery[len], 2048-len,"zkspoints = '%i', ", g_ZombieKillsSurvivor[id])
- len += format(szQuery[len], 2048-len,"zkhpspoints = '%i' ", g_ZombieKillsHumanPS[id])
- len += format(szQuery[len], 2048-len,"WHERE username = '%s'", g_szTempName[id])
- SQL_ThreadQuery(g_SqlTuple,"updateTableStatsThread", szQuery)
- }
- }
- public updateTableStatsThread(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
- {
- // lots of error checking
- if(FailState == TQUERY_CONNECT_FAILED)
- return set_fail_state("Could not connect to SQL database.")
- else if(FailState == TQUERY_QUERY_FAILED)
- return set_fail_state("Query failed.")
- if(Errcode)
- return log_amx("%s : תתליאש לע האיגש",Error)
- return PLUGIN_CONTINUE
- }
- public menuBank(id)
- {
- if(g_LoggedIn[id] && is_valid_player(id))
- {
- new title[100]
- formatex(title, 99, "\w] %i \r : y\םילקש w\קנב[", g_AP[id])
- new bankMenu = menu_create(title, "menuBankHandler")
- menu_additem(bankMenu, "\wםוכס חק", "1")
- menu_additem(bankMenu, "\wלכה חק^n", "2")
- menu_additem(bankMenu, "\wםוכס רומש", "3")
- menu_additem(bankMenu, "\wלכה רומש^n", "4")
- menu_additem(bankMenu, "\wםוכס םורת^n^n", "5")
- menu_display(id, bankMenu, 0)
- }
- else client_print(id, print_chat, ".רבחתיהל ידכ '/login' וא 'מןעםך.' םושרת ]תורבחתה[")
- return PLUGIN_HANDLED;
- }
- public menuBankHandler(id, menu, item)
- {
- new data[6], iName[64], access, callback
- menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
- new key = str_to_num(data)
- switch(key)
- {
- case 1:
- {
- client_cmd(id, "םוכס חק - העדוה בצמ")
- }
- case 2:
- {
- cmdTakeAll(id)
- }
- case 3:
- {
- client_cmd(id, "םוכס רומש - העדוה בצמ")
- }
- case 4:
- {
- cmdSaveAll(id)
- }
- case 5:
- {
- menuDonate(id)
- }
- }
- }
- public cmdTakeAmount(id)
- {
- if(!g_LoggedIn[id]) return PLUGIN_HANDLED
- new szAps[11]
- read_args(szAps, 10)
- remove_quotes(szAps)
- if(equal(szAps, "") || equal(szAps, " "))
- return PLUGIN_HANDLED
- new iAps = str_to_num(szAps)
- if(iAps < 1) return PLUGIN_HANDLED
- new iApsSum = iAps + zp_get_user_ammo_packs(id)
- if(iAps <= g_AP[id] && iApsSum <= 999)
- {
- zp_set_user_ammo_packs(id, iApsSum)
- g_AP[id] -= iAps
- client_print(id, print_chat, ".םילקש %i קנבב ךל שי וישכעו.ךלש קנבה ךותמ םילקש %i התחקל ]קנב ויגלפ יבמוז[", g_AP[id], iAps)
- return PLUGIN_CONTINUE
- }
- else
- {
- client_print(id, print_chat, ".ידמ לודג םוכס התמשרש וא םילקש קיפסמ ךל ןיא ]קנב ויגלפ יבמוז[")
- }
- return PLUGIN_CONTINUE
- }
- public cmdTakeAll(id)
- {
- new iApsSum = zp_get_user_ammo_packs(id) + g_AP[id]
- if(iApsSum <= 999)
- {
- zp_set_user_ammo_packs(id, iApsSum)
- client_print(id, print_chat, ".קנבהמ ךלש םילקש %i לכ תא התחחקל ]קנב ויגלפ יבמוז[", g_AP[id])
- g_AP[id] = 0
- }
- else if(iApsSum > 999)
- {
- new giveAps = 999 - zp_get_user_ammo_packs(id)
- if(giveAps <= g_AP[id])
- {
- zp_set_user_ammo_packs(id, giveAps + zp_get_user_ammo_packs(id))
- g_AP[id] -= giveAps
- client_print(id, print_chat, ".קנבב םילקש %i ךל שי וישכע .ךלש קנבהמ םילקש %i התחקל]קנב ויגלפ יבמוז[", g_AP[id], giveAps)
- }
- }
- }
- public cmdSaveAmount(id)
- {
- if(!g_LoggedIn[id]) return PLUGIN_HANDLED
- new szAps[11]
- read_args(szAps, 10)
- remove_quotes(szAps)
- if(equal(szAps, "") || equal(szAps, " "))
- return PLUGIN_HANDLED
- new iAps = str_to_num(szAps)
- if(iAps < 1) return PLUGIN_HANDLED
- new haveAps = zp_get_user_ammo_packs(id)
- if(iAps <= haveAps)
- {
- zp_set_user_ammo_packs(id, haveAps - iAps)
- g_AP[id] += iAps
- client_print(id, print_chat, "%i. ךל שי וישכעו ךלש קנבב םילקש %i התרמש התא]קנב ויגלפ יבמוז[", g_AP[id], iAps)
- }
- else
- {
- client_print(id, print_chat, ".םילקש קיפסמ ךל ןיא]קנב ויגלפ יבמוז[")
- }
- return PLUGIN_CONTINUE
- }
- public cmdSaveAll(id)
- {
- new haveAps = zp_get_user_ammo_packs(id)
- zp_set_user_ammo_packs(id, 0)
- g_AP[id] += haveAps
- client_print(id, print_chat, ".םילקש %i ךל שי וישכע ךלש קנבב םילקש %i התרמש]קנב ויגלפ יבמוז[", g_AP[id], haveAps)
- }
- public menuDonate(id)
- {
- new DonateMenu = menu_create("\r:ול םורתל ידכ ןקחש רחב", "menuDonateHandler")
- new players[32], pnum, tempid
- new szName[32], szTempid[10]
- get_players(players, pnum)
- for( new i; i<pnum; i++ )
- {
- tempid = players[i]
- if(id != tempid)
- {
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(DonateMenu, szName, szTempid, 0)
- }
- }
- menu_display(id, DonateMenu, 0)
- }
- public menuDonateHandler(id, menu, item)
- {
- new data[6], iName[64];
- new access, callback;
- menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
- new tempid = str_to_num(data);
- g_DonateID[id] = tempid
- client_cmd(id, "המורת - העדוה בצמ")
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- public cmdDonate(id)
- {
- if(!g_LoggedIn[id] && g_DonateID[id] == 0) return PLUGIN_HANDLED
- new szAps[11]
- read_args(szAps, 10)
- remove_quotes(szAps)
- if(equal(szAps, "") || equal(szAps, " "))
- return PLUGIN_HANDLED
- new iAps = str_to_num(szAps)
- if(iAps < 1) return PLUGIN_HANDLED
- if(iAps <= g_AP[id])
- {
- // Take iAps away
- g_AP[id] -= iAps
- new NameDonate[45]
- get_user_name(g_DonateID[id], NameDonate, 44)
- new Name[45]
- get_user_name(g_DonateID[id], Name, 44)
- client_print(id, print_chat, ".קנבב םילקש %i ךל שי וישכע.s%ל םילקש %i התמרת ]קנב ויגלפ יבמוז[", g_AP[id], NameDonate, iAps)
- // give iAps to Donateid
- g_AP[g_DonateID[id]] += iAps
- client_print(g_DonateID[id], print_chat, ".קנבב םילקש %i ךל שי וישכע.םילקש %i ךל םרת %s ]קנב ויגלפ יבמוז[", Name, iAps, g_AP[g_DonateID[id]])
- }
- else
- {
- client_print(id, print_chat, ".םילקש קיפסמ ךל ןיא ]קנב ויגלפ יבמוז[")
- }
- return PLUGIN_CONTINUE
- }
- public plugin_end()
- {
- SQL_FreeHandle(g_SqlTuple)
- }
Advertisement
Add Comment
Please, Sign In to add comment