All pastes #590844 Raw Edit

Anonymous

public text v1 · immutable
#590844 ·published 2007-06-26 20:21 UTC
rendered paste body
if((cmdtext[0] == '/') && strlen(cmdtext) > 1){
		new character[256];
		new i, j;
		new found = 0;
		new foundchar[256];
		new tmps1[256];

		for(i=1; i<(strlen(cmdtext)); i++) {
		//next character
		strmid(character, cmdtext, i, i+1, 2);
	    for(j = 0; j<MAX_ALLOWED_CHARS; j++) {
	    	tmps1 = allowedchars[j];
	        if(strcmp(hash(character), hash(tmps1), false) == 0) {
	            found = 1;
	            foundchar = tmps1;
      		}
	    }
	    if(found == 1) {
 			found = 0;
			} else return SendClientMessage(playerid, COLOR_SYSTEM,"Illegal character(s) used. Use [0-1], [a-z], [A-Z] or [!@#$%^&*()-[];:,.<>?/]");
		}
	}