Kategoria: Gotowe Funkcje

Gotowe Funkcje

Explode

Działanie podobne do funkcji explode znanej z php php.net/explode stock explode(const string[],const character,output[][],const maxs,const maxlen){ new iDo = 0, len = strlen(string), oLen = 0; do{ oLen += (1+copyc(output[iDo++],maxlen,string[oLen],character)) }while(oLen < len && iDo <Czytaj dalej

Gotowe Funkcje

Prefix przed nickiem

W register_plugin register_message(get_user_msgid("SayText"),"handleSayText"); potem w dowolnym miejscu w pluginie public handleSayText(msgId,msgDest,msgEnt){ new id = get_msg_arg_int(1); if(!is_user_connected(id)) return PLUGIN_CONTINUE; new szTmp[256],szTmp2[256]; get_msg_arg_string(2,szTmp, charsmax( szTmp ) ) new szPrefix[64] = "[Nasz Prefix]"; if(!equal(szTmp,"#Cstrike_Chat_All")){ add(szTmp2,charsmax(szTmp2),szPrefix); add(szTmp2,charsmax(szTmp2)," "); add(szTmp2,charsmax(szTmp2),szTmp);Czytaj dalej