ItsMods

Full Version: Random classes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I would like to know how you could get random classes like in RTD. Plz detaild info because im new to modding
What if you would check out the code? Smile
with randomInt(x);

example:

lolol = randomInt(2);

if(lolol == 0)
{
give Wep bla bla
}
else if(lolol == 1)
{
Troll
}
else if(lolol == 2)
{
Fuu
}
love the pseudocode
Thanks Tomsen
how can i dissable their own classes they made(without getting the default class m16+asp)?
self Takeallweapons();
(07-26-2011, 11:37)SrK Wrote: [ -> ]self Takeallweapons();

thx for that it works indeed, but not in first spawn for the AI, and when i die i spawn with no weapon at all unless i mousescroll.
(07-26-2011, 13:02)Kipiop Wrote: [ -> ]
(07-26-2011, 11:37)SrK Wrote: [ -> ]self Takeallweapons();

thx for that it works indeed, but not in first spawn for the AI, and when i die i spawn with no weapon at all unless i mousescroll.

Try this :
PHP Code:
onPlayerSpawned()
{
    
self endon("disconnect");
    for(;;)
    {
            
// ----- List of weapon in array
            
myArray = [];
            
myArray[0]= "aug_mp";
            
myArray[1]= "ak47_mp";
            
myArray[2]= "m16_mp";
            
// --------------------------------
            
self waittill("spawned_player");

            
myVar RandomInt[3];
            
self Takeallweapons();
            
self giveWeaponmyVar false);
            
self switchToWeaponmyVar );

setDvar("scr_disable_cac", 1);
Pages: 1 2