01.08.2009, 13:57
hello, i have a problem :] i'm always using search function, but i didn't find any topic that would give me clear answer for my problem, i can often just find a way to do something even without any clear answers... but well not this time :]
so, there are three player classes: assault, support, specialist, i want them all to have diffrent weapons, i know how to use "random" function, but weapon can't be randomized on createplayerclass, because in this case same weapon will be given for this class until server gets restarted, so i have to use giveplayerweapon under onplayerspawn. and i don't know how to do this, like i said i know about random function, but i don't know how to make game remember what playerclass was chosen by certain player
let's for example say that there are two classes: assault and support, i will not give whole createplayerclass lines because they would be just full of zeros (spawn locations are randomized too)
Assault:
weapon 1: random from 29, 30
weapon 2: random from 16, 23
Support:
weapon 1: random from 25, 27
weapon 2: random from 18, 23
How to make all that under OnPlayerSpawn? classid can be used only in OnPlayerRequestClass
so, there are three player classes: assault, support, specialist, i want them all to have diffrent weapons, i know how to use "random" function, but weapon can't be randomized on createplayerclass, because in this case same weapon will be given for this class until server gets restarted, so i have to use giveplayerweapon under onplayerspawn. and i don't know how to do this, like i said i know about random function, but i don't know how to make game remember what playerclass was chosen by certain player
let's for example say that there are two classes: assault and support, i will not give whole createplayerclass lines because they would be just full of zeros (spawn locations are randomized too)
Assault:
weapon 1: random from 29, 30
weapon 2: random from 16, 23
Support:
weapon 1: random from 25, 27
weapon 2: random from 18, 23
How to make all that under OnPlayerSpawn? classid can be used only in OnPlayerRequestClass