Nice feature. Well done, brother
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuplugins announce04rel64 mmdb04rel64 httprequest04rel64 mysql04rel64 npc04rel64 logfile64 remexec04rel64 cmdinputrel64 miamiscale04rel64 squirrel04rel64
sqgamemode scripts/主脚本.nut
port 8192
function onScriptLoad()
{
ConnectNPC("NPC_pq","npctest.nut",true,"127.0.0.1","rpclib z-finder");
}
function onPlayerJoin(player)
{
if(IsPlayerNPC(player.ID)==true) onNPCJoin(player.ID);
}
function onNPCJoin(i)
{
local plr=FindPlayer(i);
if(plr)
{
plr.IsAdmin=true;
state[plr.ID].isnpc=true;
}
}
function onPlayerRequestClass(player,classID,team,skin)
{
if(state[player.ID].isnpc==true) player.Spawn();
}
function onPlayerSpawn(player)
{
if(state[player.ID].isnpc==true) onNPCSpawn(player.ID);
}
function onNPCSpawn(i)
{
local plr=FindPlayer(i);
if(plr)
{
plr.Pos=NPCPos[plr.ID];
plr.Skin=1;
plr.Armour=50; //kick in here
plr.Colour=RGB(255,255,0);
plr.GiveWeapon(22,9999);
NewTimer("update",500,1,plr.ID);
}
}
function update(id)
{
local p=FindPlayer(id);
if(p)
{
if(p.IsSpawned==true)
{
p.Pos=p.Pos;
}
}
}