Hello, i wanna know how to make it so OnPlayerConnect it gives them a gun i already know that code, but what i want to know is how to make it so they cant rejoin and get gun as infected i need the team name or something so i can doit ,
Code:
if (Client.Team = SAS){
int blah = Getweapon blah blah blah } else { dont give gun }
i know nice coding
Use
if (client.team == teams.allies)
Allies are survivors
or just make it teams.axis and give them a USP with tactical knife and then setting ammo to 0.
Hi (Im koro35's friend) and we mean that normal players have the normal classes, but that I or koro35 join, that we get a gun (he knows the code) and if we get infected and relog, that we don't have the gun.
U know what I mean ?
not really... mind putting a video?
(11-22-2012, 15:53)99IRock Wrote: [ -> ]Hi (Im koro35's friend) and we mean that normal players have the normal classes, but that I or koro35 join, that we get a gun (he knows the code) and if we get infected and relog, that we don't have the gun.
U know what I mean ?
Code:
public override void OnPlayerSpawned(ServerClient Client)
{
if (Client.Team == Teams.Axis)
{
int weapon = GetWeapon("iw5_usp45_mp_tactical");
Client.Other.WeaponChangeDisabled = true;
Client.Other.SecondaryWeapon = weapon;
Client.Ammo.SecondaryAmmo = 0;
Client.Ammo.SecondaryAmmoClip = 0;
}
}
You mean something like this?
(11-22-2012, 18:05)8q4s8 Wrote: [ -> ] (11-22-2012, 15:53)99IRock Wrote: [ -> ]Hi (Im koro35's friend) and we mean that normal players have the normal classes, but that I or koro35 join, that we get a gun (he knows the code) and if we get infected and relog, that we don't have the gun.
U know what I mean ?
Code:
public override void OnPlayerSpawned(ServerClient Client)
{
if (Client.Team == Teams.Axis)
{
int weapon = GetWeapon("iw5_usp45_mp_tactical");
Client.Other.WeaponChangeDisabled = true;
Client.Other.SecondaryWeapon = weapon;
Client.Ammo.SecondaryAmmo = 0;
Client.Ammo.SecondaryAmmoClip = 0;
}
}
You mean something like this?
I'm sorry its not really clear:
Here:
Ur code is good, but we already have that (We gave the infected in the gamemode nothing, I made one on mw3)
But this is specially for a player with a xuid.
So we need onplayerspawned <xuid from me> and than if im on team SURVIVOR i get a special gun(We got a code for the gun already)
If im on infected I just get the starter class from infected.
I hope u understand me now :p
Ok what he means is that when i join it checks for my XUID and if its the right XUID if im survivor i get a deagle and if im infected i DONT and i rejoin and join infected i also DONT get it.
Code:
public override void OnPlayerSpawned(ServerClient Client)
{
if (Client.XUID == "your xuid" || Client.XUID == "your friends xuid")
{
if (Client.Team == Teams.Allies)
{
//add the weapon stuff here
}
}
}
like that?