廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 2323 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
waipun
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x5 鮮花 x10
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
推文 x0
[1.6][插件] 寫sma的問題  (對不起,又是我了- -)
上次我()寫了個sma
但是有問題
感謝各位大大的幫忙
但是我又有問題了- - 表情
就是用完輕功之後不能變回之後的樣子
()請大大幫個忙
謝謝大大

׻


ש



sma:

#include <amxmodx>
#include <FakeMeta>

public plugin_init()
{
register_plugin("abcdefg","1.0","waipun")
register_clcmd("buy_fly", "fly",0, "flying")
}


public fly(id)
{
if ( !is_user_alive(id) )
{
client_print(id, print_chat, "死左仲想用輕功???");
return PLUGIN_HANDLED
}
else
{
set_pev(id, pev_gravity, 0.25)
set_task(1.0, "a")
show_hudmessage(id,"<<<<<<<<<10秒>>>>>>>>>")
set_hudmessage(200,100,0,-1.0,0.55,0,6.0,2.0,0.1,0.2,4)
}
return PLUGIN_HANDLED
}

public a(id)
{
show_hudmessage(id,"<<<<<<<<<9秒>>>>>>>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "b")
return PLUGIN_HANDLED
}

public b(id)
{
show_hudmessage(id,"<<<<<<<<8秒>>>>>>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "c")
return PLUGIN_HANDLED
}

public c(id)
{
show_hudmessage(id,"<<<<<<<7秒>>>>>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "d")
return PLUGIN_HANDLED
}

public d(id)
{
show_hudmessage(id,"<<<<<<6秒>>>>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "e")
return PLUGIN_HANDLED
}

public e(id)
{
show_hudmessage(id,"<<<<<5秒>>>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "f")
return PLUGIN_HANDLED
}

public f(id)
{
show_hudmessage(id,"<<<<4秒>>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "g")
return PLUGIN_HANDLED
}

public g(id)
{
show_hudmessage(id,"<<<3秒>>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "h")
return PLUGIN_HANDLED
}

public h(id)
{
show_hudmessage(id,"<<2秒>>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "i")
return PLUGIN_HANDLED
}

public i(id)
{
show_hudmessage(id,"<1秒>")
set_hudmessage(200,100,0,1.0,0.35,0,6.0,2.0,0.1,0.2,4)
set_task(1.0, "sss")
return PLUGIN_HANDLED
}

public sss(id)
{
set_pev(id, pev_gravity, 1.00)
client_print(id, print_chat, "輕功冇左");
return PLUGIN_HANDLED
}


還有.......表情
如果不夠$5000不能用和用完要減$5000該怎寫?
謝謝大大



怎寫amxx
獻花 x0 回到頂端 [樓 主] From:沒有資料 | Posted:2010-12-14 21:02 |
chuchung712 會員卡
個人頭像
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎 社區建設獎 優秀管理員勳章 特殊貢獻獎-2
知名人士
級別: 知名人士 該用戶目前不上站
推文 x774 鮮花 x1169
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

複製程式
#include <amxmodx>
#include <FakeMeta>

new g_time[id]

public plugin_init()
{
       register_plugin("abcdefg","1.0","waipun")
       register_clcmd("buy_fly", "fly",0, "flying")
}


public fly(id)
{
       if ( !is_user_alive(id) )
       {
              client_print(id, print_chat, "死左仲想用輕功???");
              return PLUGIN_HANDLED
       }

       else
       {
              set_pev(id, pev_gravity, 0.25)
              show_hudmessage(id,"<<<<<<<<<10秒>>>>>>>>>")
              set_hudmessage(200,100,0,-1.0,0.55,0,6.0,2.0,0.1,0.2,4)
              g_time[id] = 10
              set_task(1.0, "fly_end")
       }
       return PLUGIN_HANDLED
} 

public fly_end(id)
{
       g_time[id] -= 1
       show_hudmessage(id,"<<<<<<<<<%d秒>>>>>>>>>", g_time[id])
       if(g_time[id] >0)
              set_task(1.0, "fly_end")
       else
       {
              set_pev(id, pev_gravity, 1.00)
              client_print(id, print_chat, "輕功冇左");
       }
       
       return PLUGIN_HANDLED
}

主要幫你簡化了…


沒有理想的世界
獻花 x1 回到頂端 [1 樓] From:香港有線寬頻 | Posted:2010-12-14 21:08 |
史來姆
個人文章 個人相簿 個人日記 個人地圖
特殊貢獻獎
小有名氣
級別: 小有名氣 該用戶目前不上站
推文 x370 鮮花 x529
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

每1秒1個function - -||
那你寫20秒倒數的話........
我不敢想像囧


獻花 x0 回到頂端 [2 樓] From:香港 | Posted:2010-12-14 21:32 |
784063999
個人頭像
個人文章 個人相簿 個人日記 個人地圖
遊戲高手獎
初露鋒芒
級別: 初露鋒芒 該用戶目前不上站
推文 x32 鮮花 x86
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

下面是引用 chuchung712 於 2010-12-14 21:08 發表的 : 到引言文
[code]
#include <amxmodx>
#include <FakeMeta>
new g_time[id]
public plugin_init()
.......

是[33]不是[id]

我已經加了錢


本帖包含附件
zip fly.rar   (2022-06-09 14:17 / 1 KB)   下載次數:13


獻花 x2 回到頂端 [3 樓] From:沒有資料 | Posted:2010-12-14 22:55 |

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