xuqiang52133
|
分享:
▼
x0
|
[1.6][插件] (我有全部当CT源码)谁能帮我写一个全部当 CT的插件啊 ,。我想用在NPC插件里。谢谢各位了。我有一个全是乱码的 ,谁
(全部当 CT)
(我有全部当CT源码)谁能帮我写一个全部当 CT的插件啊 ,。我想用在NPC插件里。谢谢各位了。我有一个全是乱码的 ,谁能帮我修复好。谢谢
#include <amxmodx>#include <fakemeta>#include <hamsandwich>#include <cstrike>enum // CS Teams{FM_CS_TEAM_UNASSIGNED = 0,FM_CS_TEAM_T,FM_CS_TEAM_CT,FM_CS_TEAM_SPECTATOR}new g_hamczbotspublic plugin_init(){register_plugin("cs_score", "1.0", "dw312382354");RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)// 在此处添加您的代码...}public client_putinserver(id) // Client joins the game{if (is_user_zbot(id) && !g_hamczbots)// Reg Ham Zbot{set_task(0.1, "register_ham_czbots", id)}}public register_ham_czbots(id) // Register Ham Forwards for CZ bots{// Make sure it's a CZ bot and it's still connectedif (g_hamczbots || !is_user_connected(id))return;RegisterHamFromEntity(Ham_Spawn, id, "fw_PlayerSpawn_Post", 1)g_hamczbots = true // Ham forwards for CZ bots succesfully registered// If the bot has already spawned, call the forward manually for himif (is_user_alive(id)) fw_PlayerSpawn_Post(id)}// Ham Player Spawn Post Forwardpublic fw_PlayerSpawn_Post(id){// Not alive or didn't join a team yetif (!is_user_alive(id) || !fm_cs_get_user_team(id)) return;fm_cs_set_user_team(id, FM_CS_TEAM_CT)}stock fm_cs_get_user_team(id) return get_pdata_int(id, 114, 5); // Get User Teamstock fm_cs_set_user_team(id, team) // Set a Player's Team{static params[1] // Our task paramsparams[0] = teamif (task_exists(id+1510302024)) remove_task(id+1510302024)set_task(0.1, "task_set_user_team", id+1510302024, params, sizeof params)}public task_set_user_team(params[1], taskid) // Task Set Model{new id = taskid - 1510302024new team = params[0]cs_set_user_team(id, team, 0)if (task_exists(id+1510302024)) remove_task(id+1510302024)}stock is_user_zbot(id) // not work ?{if (!is_user_bot(id))return 0;new tracker[2], friends[2], ah[2];get_user_info(id,"tracker",tracker,1);get_user_info(id,"friends",friends,1);get_user_info(id,"_ah",ah,1); // PodBot / YaPB / SyPBif (tracker[0] == '0' && friends[0] == '0' && ah[0] == '0')return 0;return 1; // Zbot}
|