Taking and Giving Weapons:
Taking and Giving Weapons is very simple.
The code below with give the player a Kar98k
Code: Select all
main()
{
maps\mp\_load::main();
thread give();
}
give()
}
self giveweapon("kar98k_mp");
}
Setting Ammo Amount:
This one is simple to:
Code: Select all
main()
{
maps\mp\_load::main();
thread set();
}
set()
{
self setweaponslotammo("primary", 0);
self setweaponslotclipammo("primary", 0);
}
In more detail:
Code: Select all
self setweaponslotammo("primary", 0);
Code: Select all
self setweaponslotclipammo("primary", 0);
Switching a player to a weapon:
Another Simple one:
Code: Select all
main()
{
maps\mp\_load::main();
thread switch();
}
switch()
{
self switchtoweapon("kar98k_mp");
}
Make sure you give the player the gun before you switch them to it!
or you can do
Code: Select all
main()
{
maps\mp\_load::main();
thread switch();
}
switch()
{
self switchtoweaponslot("primary");
}
Taking away all weapons:
Extremly Simple One:
This will remove all the players weapons:
Code: Select all
main()
{
maps\mp\_load::main();
thread remove();
}
remove()
{
self takeallweapons();
}
There are many many many, more player controls you can do! I will be adding to this tutorial as I get the motivation (LOL)