server crash while executing
#3

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (zcmd_g_HasOPCS && !CallLocalFunction("OnPlayerCommandReceived", "is", playerid, cmdtext))
    {
        return 1;
    }
    new
        pos,
        funcname[MAX_FUNC_NAME];
    while (cmdtext[++pos] > ' ') 
	{
		funcname[pos-1] = tolower(cmdtext[pos]); 
	}
	format(funcname, sizeof(funcname), "cmd_%s", funcname);
    while (cmdtext[pos] == ' ') pos++;
	if (!cmdtext[pos])
	{
		cmdtext[--pos] = '\1';
	}	
	if (zcmd_g_HasOPCE)
	{
		return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, cmdtext[pos]));
	}
	return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]);
}
Reply


Messages In This Thread
server crash while executing - by Mahesh90901 - 08.11.2016, 12:23
Re: server crash while executing - by StrikerZ - 08.11.2016, 12:41
Re: server crash while executing - by Mahesh90901 - 08.11.2016, 15:00

Forum Jump:


Users browsing this thread: 2 Guest(s)