Jump to content

Sinval

Inactive Member
  • Posts

    52
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Sinval

  1. compilei novaline = syserr

    SYSERR: Mar 30 19:55:11 :: ChildLoop: AsyncSQL: query failed: Table 'm2_sinval_log.invalid_server_log' doesn't exist (query: INSERT INTO invalid_server_log(locale_type, log_date, ip, revision) VALUES(14, NOW(), '25.181.49.100', 40250) errno: 1146)

    Some correction? ?

  2. #include <stdio.h>
    
    void WriteVersion()
    {
    #ifndef __WIN32__
        FILE* fp = fopen("VERSION.txt", "w");
    
        if (fp)
        {
            fprintf(fp, "game perforce revision: %sn", __P4_VERSION__);
            fprintf(fp, "%s@%s:%sn", __USER__, __HOSTNAME__, __PWD__);
            fclose(fp);
        }
    #endif
    }
    
  3. bool GetIPInfo()
    {
    #ifndef __WIN32__
    	struct ifaddrs* ifaddrp = NULL;
    
    	if (0 != getifaddrs(&ifaddrp))
    		return false;
    
    	for( struct ifaddrs* ifap=ifaddrp ; NULL != ifap ; ifap = ifap->ifa_next )
    	{
    		struct sockaddr_in * sai = (struct sockaddr_in *) ifap->ifa_addr;
    
    		if (!ifap->ifa_netmask ||  // ignore if no netmask
    				sai->sin_addr.s_addr == 0 || // ignore if address is 0.0.0.0
    				sai->sin_addr.s_addr == 16777343) // ignore if address is 127.0.0.1
    			continue;
    #else
    	WSADATA wsa_data;
    	char host_name[100];
    	HOSTENT* host_ent;
    	int n = 0;
    
    	if (WSAStartup(0x0101, &wsa_data)) {
    		return false;
    	}
    
    	gethostname(host_name, sizeof(host_name));
    	host_ent = gethostbyname(host_name);
    	if (host_ent == NULL) {
    		return false;
    	}
    	for ( ; host_ent->h_addr_list[n] != NULL; ++n) {
    		struct sockaddr_in addr;
    		struct sockaddr_in* sai = &addr;
    		memcpy(&sai->sin_addr.s_addr, host_ent->h_addr_list[n], host_ent->h_length);
    #endif
    
    		char * netip = inet_ntoa(sai->sin_addr);
    
    		if (!strncmp(netip, "192.168", 7)) // ignore if address is starting with 192
    		{
    			strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
    #ifndef __WIN32__
    			fprintf(stderr, "INTERNAL_IP: %s interface %sn", netip, ifap->ifa_name);
    #else
    			fprintf(stderr, "INTERNAL_IP: %sn", netip);
    #endif
    		}
    		else if (!strncmp(netip, "10.", 3))
    		{
    			strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
    #ifndef __WIN32__
    			fprintf(stderr, "INTERNAL_IP: %s interface %sn", netip, ifap->ifa_name);
    #else
    			fprintf(stderr, "INTERNAL_IP: %sn", netip);
    #endif
    		}
    		else if (g_szPublicIP[0] == '0')
    		{
    			strlcpy(g_szPublicIP, netip, sizeof(g_szPublicIP));
    #ifndef __WIN32__
    			fprintf(stderr, "PUBLIC_IP: %s interface %sn", netip, ifap->ifa_name);
    #else
    			fprintf(stderr, "PUBLIC_IP: %sn", netip);
    #endif
    		}
    	}
    
    #ifndef __WIN32__
    	freeifaddrs( ifaddrp );
    #else
    	WSACleanup();
    #endif
    
    	if (g_szPublicIP[0] != '0')
    		return true;
    	else
    		return false;
    }

    >

    bool GetIPInfo()
    {
        struct ifaddrs* ifaddrp = NULL;
        if (0 != getifaddrs(&ifaddrp)) return false;
        for( struct ifaddrs* ifap=ifaddrp ; NULL != ifap ; ifap = ifap->ifa_next )
        {
            struct sockaddr_in * sai = (struct sockaddr_in *) ifap->ifa_addr;
            if (!ifap->ifa_netmask || sai->sin_addr.s_addr == 0 || sai->sin_addr.s_addr == 16777343) continue;
            char * netip = inet_ntoa(sai->sin_addr);
            if (g_szPublicIP[0] != '0')
            {
                strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
                fprintf(stderr, "INTERNAL_IP: %s interface %sn", netip, ifap->ifa_name);
            } else if (g_szPublicIP[0] == '0') {
                strlcpy(g_szPublicIP, netip, sizeof(g_szPublicIP));
                fprintf(stderr, "PUBLIC_IP: %s interface %sn", netip, ifap->ifa_name);
            }
        }
    }

    well?

  4. 0304 19:41:11838 :: CPythonItem::LoadItemTable: invalid item_proto[locale/de/item_proto] STRIDE[152] != sizeof(SItemTable)
    0304 19:41:11838 :: LoadLocaleData - LoadItemProto(locale/de/item_proto) Error
    0304 19:41:27548 :: CPythonPlayer::SetItemData(window_type : 1, dwSlotIndex=0, itemIndex=71055) - Failed to item data
    
    0304 19:41:27548 :: CPythonPlayer::SetItemData(window_type : 1, dwSlotIndex=16, itemIndex=30115) - Failed to item data
    
    0304 19:41:27548 :: CPythonPlayer::SetItemData(window_type : 1, dwSlotIndex=13, itemIndex=30114) - Failed to item data
    
    0304 19:41:27548 :: CPythonPlayer::SetItemData(window_type : 1, dwSlotIndex=3, itemIndex=30111) - Failed to item data
    
    0304 19:41:27548 :: CPythonPlayer::SetItemData(window_type : 1, dwSlotIndex=5, itemIndex=71054) - Failed to item data
    
    
  5. Way 2)

    You can modify the function to calcute minutes to seconds it's pretty easy just go to file item.cpp

     

    and go to the event:

    1
    void CItem::StartDestroyEvent(int iSec)

    find this:

    1
    SetDestroyEvent(event_create(item_destroy_event, info, PASSES_PER_SEC(iSec)));

    and replace with this:

    1
    SetDestroyEvent(event_create(item_destroy_event, info, PASSES_PER_SEC(60*iSec)));

    if you did this you need to make some changes in char_item.cpp

     

    find this:

    1
    item->StartDestroyEvent(150);

    and replace to this:

    1
    item->StartDestroyEvent(2);

    after that find this:

    1
    item->StartDestroyEvent(60);

    and replace to this:

    1
    item->StartDestroyEvent(1);

     

     

    I advise not to use because you can not use like 10 seconds and just poderar in 30 minutes.

    • Love 1
  6. source

    cmd.cpp

    { "dice",                do_dice,                0,    POS_DEAD,    GM_PLAYER        },
        { "ÁÖ»çÀ§",                do_dice,                0,    POS_DEAD,    GM_PLAYER        },

    =>

        { "dice",                do_dice,                0,    POS_DEAD,    GM_IMPLEMENTOR        },
        { "ÁÖ»çÀ§",                do_dice,                0,    POS_DEAD,    GM_IMPLEMENTORR        },

    with this GM_PLAYER everyone could use, to solve simply by GM_IMPLEMENTOR as in the example.

     

    sorry bad english but google translator.

     

    desc.h

    #define HANDSHAKE_RETRY_LIMIT        32

    32 = MAX_ALLOW ?

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.