|
发表于 2007-11-10 14:13:50
|
显示全部楼层
|阅读模式
来自 中国–广西–南宁–武鸣区
如下代码:
// ------------------------------------------------------------------------------------------
// --CUSTOM MODEL LIST----------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
public get_models(array[32][],len) {
//获得名单上选择的模型get a list of custom models
new dirpos, output[64], outlen, filledamt;
// 经过选择模型go through custom models
while((dirpos = read_dir("models/player",dirpos,output,255,outlen)) != 0) {
if(containi(output,".") == -1) { // if not a file (but a directory)
// 检查是否有模型
new modelfile[64];
format(modelfile,63,"models/player/jc/%s/%s.mdl",output,output);
//-----------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------
我想在检查模型那里加入判断,当为警察的时候,检查的路径为:
new modelfile[64];
format(modelfile,63,"models/player/jc/%s/%s.mdl",output,output);
--如果为土匪,检查路径为:
new modelfile[64];
format(modelfile,63,"models/player/tf/%s/%s.mdl",output,output);
不知道这个代码怎么写~望高手赐教! |
|