11-22-2012, 21:01
Pages: 1 2
11-22-2012, 21:46
(11-22-2012, 21:01)99IRock Wrote: [ -> ]nice code thanks,
BTW, anyway possible to add like 10 players in a config file?
So we can use for vips and stuff this ?
I hope this will work, I didn't test it
CSHARP Code
- using System;
- using System.Collections.Generic;
- using System.Text;
- using Addon;
-
- namespace ClassLibrary1
- {
- public class Class1 : CPlugin
- {
- public List<string> XUID;
- public override void OnServerLoad()
- {
- string xuids = GetServerCFG("VIP_XUIDS", "xuids", string.Empty);
- foreach (string xuid in xuids.Split(',')) ;
- XUID.Add(xuids);
- }
- public override void OnPlayerSpawned(ServerClient Client)
- {
- if (XUID.Contains(Client.XUID))
- {
- if (Client.Team == Teams.Allies)
- {
- //add weapon stuff here
- }
- }
- }
- }
- }
Add your stuff in there and add this to sv_config:
Code:
[VIP_XUIDS]
xuids=xuid1,xuid2,xuid3
11-23-2012, 07:45
Aha thanks so much, we will test it today when im back from school
Pages: 1 2