float player_getspecies()
{
local float glob, i, j, fh, len, s, sk;
- local string fn, l;
+ local string fn, l, file;
local float tokens;
+ file = strcat(substring(self.model, 0, -5), ftos(self.skinindex)); // remove the extension at the end
+ PrecachePlayerSounds(file);
+ UpdatePlayerSounds(file);
+
s = -1;
glob = search_begin("models/player/*.txt", TRUE, TRUE);
if(fgets(fh) == self.model)
{
tokens = tokenizebyseparator(fn, ".");
- UpdatePlayerSounds(argv(0));
l = fgets(fh);
len = tokenize_console(l);