Hi,
Im using Source 5165.
In the source GM/PM Can't trade, can't drop and can't PK. But they can still drop when they get kill, and buy item in Personnal Shop of players.
So i tried to fix that.
On my server Guard 1 Hit Everybody who get blue name:
Or maybe Someone know how to make Gm/Pm Invincible in .cs. Without command.
2nd Thing is to make Gm/Pm unable to Buy player's items in stalls ( personnal shops market)
So i tried in packetHandler.cs:
I know it can seems easy for you, but i begin i try to learn.
So if someone can or want to help me with the code, i think it will help others people too. Thx
Im using Source 5165.
In the source GM/PM Can't trade, can't drop and can't PK. But they can still drop when they get kill, and buy item in Personnal Shop of players.
So i tried to fix that.
On my server Guard 1 Hit Everybody who get blue name:
But they 1 hit Gm under /protection too. I would like to make that if a GM or Pm is Bluename they don't attack him. But i just began to C# ( Gm can't attack players but can attack Guards and become blue name. The prohibit guard scrip on this forum, spam my console, and make some bugs like people can't pk sometimes.)Quote:
if (Mesh == 900 && PlayerTarget.BlueName)
PlayerTarget.CurHP = 0;
Or maybe Someone know how to make Gm/Pm Invincible in .cs. Without command.
2nd Thing is to make Gm/Pm unable to Buy player's items in stalls ( personnal shops market)
So i tried in packetHandler.cs:
Don't work. I tried lot of possibility and i always can buy...Quote:
case 24:
{
uint ItemUID = BitConverter.ToUInt32(Data, 4);
uint StallID = BitConverter.ToUInt32(Data, 8);
if (Game.World.H_PShops.Contains(StallID))
{
Features.PersonalShops.Shop S = (Features.PersonalShops.Shop)Game.World.H_PShops[StallID];
S.Buy(ItemUID, GC.MyChar);
}
else if (GC.GM)
{
GC.AddSend(Packets.ChatMessage(0, "SYSTEM", GC.MyChar.Name, "You're GM, you can't buy player's Items!", 2001, 0));
return;
}
break;
}
I know it can seems easy for you, but i begin i try to learn.
So if someone can or want to help me with the code, i think it will help others people too. Thx