09.10.2014, 11:08
my stock for iscaps
Here is my CMD for shout
and i enter /s HAHAHAHAHAH and not working.. not giving error for caps lock
Код:
stock IsCaps( text[ ] ) { for( new i, j = strlen( text )-1; i < j; i ++ ) { if( ( 'A' <= text[ i ] <= 'Z' ) && ( 'A' <= text[ i+6 ] <= 'Z' ) ) return true; } return false; }
Код:
CMD:s(playerid, params[]) return cmd_shout(playerid, params); CMD:shout(playerid, params[]) { new string[128], shout[100]; if( IsCaps( shout ) ) { SendClientMessage( playerid, -1, ""COL_RED"[GRESKA]: "COL_WHITE"Ne mozete pisati Caps Lockom, velika slova oznacavaju sukob! "COL_RED"Iskljucite"COL_WHITE" Caps Lock"COL_RED"!" ); return 0; } if(sscanf(params, "s[100]", shout)) { SendClientMessage(playerid, -1, ""COL_CYAN"[KORISTI]: "COL_WHITE"/(s)hout [text]"); return 1; } else { format(string, sizeof(string), "%s se dere: %s!!",GetName(playerid),shout); ProxDetector(50.0, playerid, string, -1); } return 1; }