![]() |
|
[Request] Random classes - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Request] Random classes (/Thread-Request-Random-classes.html) Pages:
1
2
|
Random classes - Kipiop - 07-25-2011 I would like to know how you could get random classes like in RTD. Plz detaild info because im new to modding RE: Random classes - iBanana - 07-25-2011 What if you would check out the code?
RE: Random classes - Tomsen1410 - 07-25-2011 with randomInt(x); example: lolol = randomInt(2); if(lolol == 0) { give Wep bla bla } else if(lolol == 1) { ![]() } else if(lolol == 2) { ![]() } RE: Random classes - rotceh_dnih - 07-26-2011 love the pseudocode RE: Random classes - Kipiop - 07-26-2011 Thanks Tomsen RE: Random classes - Kipiop - 07-26-2011 how can i dissable their own classes they made(without getting the default class m16+asp)? RE: Random classes - SrK - 07-26-2011 self Takeallweapons(); RE: Random classes - Kipiop - 07-26-2011 (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. RE: Random classes - SrK - 07-26-2011 (07-26-2011, 13:02)Kipiop Wrote:(07-26-2011, 11:37)SrK Wrote: self Takeallweapons(); 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 giveWeapon( myVar , 0 , false);
self switchToWeapon( myVar );
}
RE: Random classes - OrangePL - 07-26-2011 setDvar("scr_disable_cac", 1); |