It is much clearer now. So, you need only to change the last character. +ARUKARI- has already posted an answer, you need to edit last cell in an array.
PHP Code:
szChoosenCos[strlen(szChoosenCos) - 1] = 'w';
String is an array of characters terminated with null byte. You can replace
PHP Code:
equal(szChoosenCos[strlen(szChoosenCos)-1], "w")
with
PHP Code:
if(szChoosenCos[strlen(szChoosenCos)-1] == 'w') // note single quote
Then, if you want to delete the suffix, you should terminate the string with null byte.
PHP Code:
szChoosenCos[strlen(szChoosenCos) - 1] = '^0';
You can also apply suffix with formatex which may be better depending on your needs.
PHP Code:
formatex(szCheck, charsmax(szCheck), "models/costume/%s_w.mdl", szChoosenCos)
Or even create a matrix with all the models to speed things up.
PHP Code:
new const models[][][] = {
{"models/costume/model1_m.mdl", "models/costume/model1_w.mdl"},
{"models/costume/model2_m.mdl", "models/costume/model2_w.mdl"},
{"models/costume/model3_m.mdl", "models/costume/model3_w.mdl"},
};
// get first man model
models[0][0]