廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 2304 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
中狼
個人文章 個人相簿 個人日記 個人地圖
路人甲
級別: 路人甲 該用戶目前不上站
推文 x0 鮮花 x4
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] SMA 再次失敗 有人教教嗎
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN_NAME "1"
#define PLUGIN_VERSION "2"
#define PLUGIN_AUTHOR "3"
public plugin_init(){
register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR)
register_clcmd("say","sign_say",ADMIN_ALL,"- Colored Sign Chat")
}
public sign_say(id){
new text[64],name[32],message[128]
read_args (text,63)
remove_quotes(text)
get_user_name(id,name,31)
if ((get_user_flags(id) & ADMIN_LEVEL_A)){
  if(is_user_alive(id))
  {
  format(message,127,"^x04[伺服器OP - EXIA] ^x03%s^x04: %s",name,text)
  client_color(0,id,message)
  }
  if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) != CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x01*死亡*^x03[伺服器OP - EXIA] ^x03%s^x04: %s",name,text)
  client_color(0,id,message)
  }
  else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x01*觀戰者*^x03[伺服器OP - EXIA] ^x03%s^x04: %s",name,text)
  client_color(0,id,message)
  }
}
else if ((get_user_flags(id) & ADMIN_RESERVATION)){
  if(is_user_alive(id))
  {
  format(message,127,"^x04[管理員] ^x03%s^x04: %s",name,text)
  client_color(0,id,message)
  }
  if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) != CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x01*死亡*^x03[管理員] ^x03%s^x04: %s",name,text)
  client_color(0,id,message)
  }
  else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x01*觀戰者*^x03[管理員] ^x03%s^x04: %s",name,text)
  client_color(0,id,message)
  }
}
else {
  if(is_user_alive(id))
  {
  format(message,127,"^x01[玩家] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) != CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x01*死亡* ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x01*觀戰者* ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
}
return PLUGIN_HANDLED
}
public client_color(playerid, colorid, msg[]){
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
write_byte(colorid)
write_string(msg)
message_end()
}


[ 此文章被中狼在2011-12-07 20:01重新編輯 ]



重返CS.
獻花 x0 回到頂端 [樓 主] From:香港特別行政區 | Posted:2011-12-04 20:27 |
JrC
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x76 鮮花 x122
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN_NAME "1"
#define PLUGIN_VERSION "2"
#define PLUGIN_AUTHOR "3"

public plugin_init(){
register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR)
register_clcmd("say","sign_say",ADMIN_ALL,"- Colored Sign Chat")
}

public sign_say(id){

new text[64],name[32],message[128]
read_args (text,63)
remove_quotes(text)
get_user_name(id,name,31)

if ((get_user_flags(id) & ADMIN_LEVEL_A)){
  if(is_user_alive(id))
  {
  format(message,127,"^x03[伺服器OP] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) != CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x03*死亡*^x03[伺服器OP] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x03*觀戰者*^x03[伺服器OP] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
}

else if ((get_user_flags(id) & ADMIN_RESERVATION)){
  if(is_user_alive(id))
  {
  format(message,127,"^x03[管理員] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) != CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x03*死亡*^x03[管理員] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x03*觀戰者*^x03[管理員] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
}

else {
  if(is_user_alive(id))
  {
  format(message,127,"^x03[玩家] ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  if(!is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR && cs_get_user_team(id) != CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x03*死亡* ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
  else if(cs_get_user_team(id) == CS_TEAM_SPECTATOR || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)
  {
  format(message,127,"^x03*觀戰者* ^x03%s^x03: %s",name,text)
  client_color(0,id,message)
  }
}
return PLUGIN_HANDLED
}

public client_color(playerid, colorid, msg[]){
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
write_byte(colorid)
write_string(msg)
message_end()
}

//你沒有錯阿.. 只是{}對不齊.


NTFS伺服器
論壇:
http://ntfs-server.com/forums
獻花 x0 回到頂端 [1 樓] From:未知地址 | Posted:2011-12-05 21:58 |
觀眾甲
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎
小有名氣
級別: 小有名氣 該用戶目前不上站
推文 x318 鮮花 x963
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

我來了...偷插件大盜
已經複製到記事本裏 呵呵


獻花 x0 回到頂端 [2 樓] From:美國 | Posted:2011-12-06 17:08 |
JrC
個人文章 個人相簿 個人日記 個人地圖
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x76 鮮花 x122
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

下面是引用 上帝的右手^^ 於 2011-12-06 17:08 發表的 : 到引言文
我來了...偷插件大盜
已經複製到記事本裏 呵呵
我放在這裏, 已經不怕有人盜A_A


NTFS伺服器
論壇:
http://ntfs-server.com/forums
獻花 x0 回到頂端 [3 樓] From:未知地址 | Posted:2011-12-06 20:34 |
中狼
個人文章 個人相簿 個人日記 個人地圖
路人甲
級別: 路人甲 該用戶目前不上站
推文 x0 鮮花 x4
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

感謝了 JRC大大


重返CS.
獻花 x0 回到頂端 [4 樓] From:香港特別行政區 | Posted:2011-12-07 19:58 |

首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.020873 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言