30 12
發新話題
打印

修改藥包問題((尋求插件))

[Close]
用咩參數可以用= = ?

TOP

還是不行 雖然可以轉乘SMX黨 但是一開始還是有補包沒有變成藥罐ˊˋ

TOP

if (StrContains(EdictName, "weapon_first_aid_kit", false) != -1)
>>>>>
if (StrContains(EdictName, "weapon_first_aid_kit_spawn", false) != -1)


Create   _spawn 既野有得 set 攞既 limit 吧

[ 本帖最後由 hihi1210 於 2011-2-26 21:48 編輯 ]
CPT 插件開發隊長

TOP

if (StrContains(EdictName, "weapon_first_aid_kit_spawn", false) != -1)
是加在
if (StrContains(EdictName, "weapon_first_aid_kit", false) != -1)
下面??

就變成
if (StrContains(EdictName, "weapon_first_aid_kit", false) != -1)
if (StrContains(EdictName, "weapon_first_aid_kit_spawn", false) != -1)
??
可是這樣還是有包欸= =

TOP

if (StrContains(EdictName, "weapon_first_aid_kit_spawn", false) != -1)
咪同一開始果個一樣
試下係RemoveEdict(i);前面加


AcceptEntityInput(i, "Kill");

TOP

可以麻煩你重新複製一次給我嗎-.-......

TOP

why not use confogl directly?
CPT 插件開發隊長

TOP

#include <sourcemod>
#include <sdktools>
public OnPluginStart()
{
HookEvent("round_start", Event_RoundStart);
}
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
new ent = -1;
        new prev = 0;
        while ((ent = FindEntityByClassname(ent, "weapon_defibrillator_spawn")) != -1)
        {
                if (prev) RemoveEdict(prev);
                prev = ent;
        }
        if (prev) RemoveEdict(prev);
        
        ent = -1;
        prev = 0;
        while ((ent = FindEntityByClassname(ent, "weapon_defibrillator")) != -1)
        {
                if (prev) RemoveEdict(prev);
                prev = ent;
        }
        if (prev) RemoveEdict(prev);
  
    new EntCount = GetEntityCount();
    new String:EdictName[128];
    for (new i = 0; i <= EntCount; i++)
    {
        if (IsValidEntity(i))
        {
            GetEdictClassname(i, EdictName, sizeof(EdictName));
            if (StrContains(EdictName, "weapon_first_aid_kit", false) != -1)
                        if (StrContains(EdictName, "weapon_first_aid_kit_spawn", false) != -1)
            {
    new Float:pos[3];
    GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos);
                RemoveEdict(i);
    new pills = CreateEntityByName("weapon_pills_spawn");
    TeleportEntity(pills,pos,NULL_VECTOR,NULL_VECTOR);
    DispatchSpawn(pills);
                continue;
            }
        }
    }  
  
}
AcceptEntityInput(i, "Kill");是要在加哪個RemoveEdict(i);的前面

TOP

重新汁過曬D CODE
複製內容到剪貼板
代碼:
#include <sourcemod>
#include <sdktools>
public OnPluginStart()
{
HookEvent("round_start", Event_RoundStart);
}
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
        new EntCount = GetEntityCount();
        new String:EdictName[128];
        for (new i = 0; i <= EntCount; i++)
        {
                if (IsValidEntity(i))
                {
                        GetEdictClassname(i, EdictName, sizeof(EdictName));
                        if (StrContains(EdictName, "weapon_defibrillator", false) != -1)
                        RemoveEdict(i);
                        if (StrContains(EdictName, "weapon_first_aid_kit_spawn", false) != -1)
                        {
                                new Float:pos[3];
                                GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos);
                                RemoveEdict(i);
                                new pills = CreateEntityByName("weapon_pain_pills_spawn");
                                DispatchSpawn(pills);
                                TeleportEntity(pills,pos,NULL_VECTOR,NULL_VECTOR);
                        }
                }
        }  

        }

TOP

還是有包欸..................

TOP

why not you don_t use confogl directly x2
google serch就搞掂
比cp02嚇親的lun

TOP

= =點解會仲有包嫁
我自己試下先

TOP

攪店了
抄番之前寫過D CODE- -
複製內容到剪貼板
代碼:

#include <sourcemod>
#include <sdktools>
public OnPluginStart()
{
HookEvent("round_start", Event_RoundStart);
}
public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
Spawnpills()
}
Spawnpills()
{
new EntCount = GetEntityCount();
new String:EdictName[128];
for (new i = 0; i<=EntCount; i++)
{
if (IsValidEntity(i))
{
GetEdictClassname(i,EdictName,128);


if(StrContains(EdictName, "weapon_pipe_bomb", false) != -1||StrContains(EdictName, "weapon_molotov", false) != -1 ||StrContains(EdictName, "weapon_vomitjar", false) != -1 ||StrContains(EdictName, "weapon_first_aid_kit", false) != -1 ||StrContains(EdictName, "weapon_defibrillator", false) != -1||(StrContains(EdictName, "weapon_upgradepack_explosive", false) != -1) || (StrContains(EdictName, "weapon_upgradepack_incendiary", false) != -1))
{
if(StrContains(EdictName, "weapon_first_aid_kit", false) != -1)
{
new index = CreateEntityByName("weapon_pain_pills_spawn");
new Float:Location[3];
GetEntPropVector(i, Prop_Send, "m_vecOrigin", Location);
if(index != -1)
{
new Float:Angle[3];
GetEntPropVector(i, Prop_Send, "m_angRotation", Angle);
TeleportEntity(index, Location, Angle, NULL_VECTOR);
DispatchSpawn(index);
}
}
if(GetRandomInt(1,2)==1)
{
new index = CreateEntityByName("weapon_pain_pills_spawn");
new Float:Location[3];
GetEntPropVector(i, Prop_Send, "m_vecOrigin", Location);
if(index != -1)
{
new Float:Angle[3];
GetEntPropVector(i, Prop_Send, "m_angRotation", Angle);
TeleportEntity(index, Location, Angle, NULL_VECTOR);
DispatchSpawn(index);
}
}
AcceptEntityInput(i, "Kill");
continue;
}
}
}
}
附件: 您所在的用戶組無法下載或查看附件

TOP

我丟進去 會彈GAME欸

TOP

但係我無問題喎- -
我無彈GAME

TOP

 30 12
發新話題