Beiträge von ~Streetracer~

    Wunswebares System, habe es einmal eingebaut und hoffe ich kann es mit dem R5 von MySQL wunderbar verwenden ;)


    Werde es gleich einmal :)


    Dein TO-DO:


    - Hauskauf nur dann wenn Geld vorhanden ist...


    Bei mir zumindest ein wenig gefixxt ist aber Hacky...


    if(GetPlayerMoney(playerid) < 0)return SendClientMessage(playerid,0xC8C8C8FF,"Du hast nicht genug Geld dabei!");


    Solltest du dementsprechend einbauen !


    public OnPlayerDeath(playerid, killerid, reason)
    {
    if(killerid != INVALID_PLAYER_ID)
    {
    SpielerInfo[killerid][pKills] +=1;
    }
    if(playerid != INVALID_PLAYER_ID)
    {
    SpielerInfo[playerid][pTode] +=1;
    }
    return 1;
    }


    Wie genau meinst du des nun ?!

    So das ganze ?



    public OnPlayerDeath(playerid, killerid, reason)
    {
    if(killerid != INVALID_PLAYER_ID)
    {
    SpielerInfo[killerid][pKills] ++;
    SpielerInfo[playerid][pTode] ++;
    }
    return 1;
    }


    //Edit funktioniert :)


    Nun schreibt er aber keinen Wert in die Datenbank -.-^^

    [debug] Run time error 4: "Array index out of bounds"
    [debug] Accessing element at index 65535 past array upper bound 499
    [debug] AMX backtrace:
    [debug] #0 0000677c in public OnPlayerDeath (playerid=0, killerid=65535, reason=
    255) at C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\gamemodes\Example.pwn:16
    5


    Nope geht nicht selber Fehler !

    public OnPlayerDeath(playerid, killerid, reason)
    {
    SpielerInfo[killerid][pKills] +=1;
    SpielerInfo[playerid][pTode] +=1;
    return 1;
    }


    [debug] Run time error 4: "Array index out of bounds"
    [debug] Accessing element at index 65535 past array upper bound 499
    [debug] AMX backtrace:
    [debug] #0 00013d74 in public OnPlayerDeath (playerid=2, killerid=65535, reason=
    255) at C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\gamemodes\Andy.pwn:1724
    [death] Streetracer died 255



    Beim Aufruf dieser Funktion bekomme ich einen Absturz vom Server, jemand eine Idee ?!


    Debug:


    PHP
    --------------------------SA-MP Server: 0.3x-R2Exception At Address: 0x004979DC Module: (samp-server.exe)Registers:EAX: 0x6C6C6148	EBX: 0x033C1873	ECX: 0x7FFFFFFE	EDX: 0x0018F365ESI: 0x0018EFC8	EDI: 0x0018F794	EBP: 0x0018F014	ESP: 0x0018EF88EFLAGS: 0x00010202Stack:+0000: 0x0018F760   0x0018F360   0x033C1804   0x00000002+0010: 0x00000003   0x0100007F   0x0018D1D2   0x00000007+0020: 0x00000000   0x000001F0   0x00000000   0x00000000+0030: 0x00000000   0x00000000   0x00000000   0x00000002+0040: 0x00000006   0x00000000   0x6C6C6148   0xFFFFFFFF+0050: 0x00000000   0x0018F008   0x00000001   0x00000002+0060: 0x00000003   0x0100007F   0x0000D1D2   0x00455B8D+0070: 0x00000000   0x00000001   0x004ACE38   0x0100D1D2+0080: 0x00000213   0x00000800   0x00000000   0x0018F019+0090: 0xDE8D1001   0xFFFF3F00   0x00C0E6FF   0xEBEB0B00+00A0: 0xEBEBEBEB   0xC4A7E5EB   0x8D2DED0A   0xADED6D8D+00B0: 0x0CC4ADAC   0x0CC4AC2E   0x0DC4AC2E   0xCC2DADAC+00C0: 0x6C0AA4AD   0xAECC4EAE   0xAB850744   0xEBEBEBEB+00D0: 0xE0EBEBEB   0x00750062   0x002E0067   0x00780074+00E0: 0x00000074   0x00000000   0x00000000   0x00000000+00F0: 0x00000000   0x00000000   0x00000000   0x00000000+0100: 0x00000000   0x00000000   0x00000000   0x00000000+0110: 0x00000000   0x00000000   0x00000000   0x00000000+0120: 0x00000000   0x00000000   0x00000000   0x00000000+0130: 0x00000000   0x00000000   0x00000000   0x00000000--------------------------Loaded Modules:samp-server.exe	A: 0x00400000 - 0x004F5000	(C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\samp-server.exe)ntdll.dll	A: 0x76EA0000 - 0x77020000	(C:\Windows\SysWOW64\ntdll.dll)kernel32.dll	A: 0x74A10000 - 0x74B20000	(C:\Windows\syswow64\kernel32.dll)KERNELBASE.dll	A: 0x751F0000 - 0x75237000	(C:\Windows\syswow64\KERNELBASE.dll)SHELL32.dll	A: 0x75E50000 - 0x76A9A000	(C:\Windows\syswow64\SHELL32.dll)msvcrt.dll	A: 0x74EC0000 - 0x74F6C000	(C:\Windows\syswow64\msvcrt.dll)SHLWAPI.dll	A: 0x74950000 - 0x749A7000	(C:\Windows\syswow64\SHLWAPI.dll)GDI32.dll	A: 0x75B50000 - 0x75BE0000	(C:\Windows\syswow64\GDI32.dll)USER32.dll	A: 0x75670000 - 0x75770000	(C:\Windows\syswow64\USER32.dll)ADVAPI32.dll	A: 0x75380000 - 0x75420000	(C:\Windows\syswow64\ADVAPI32.dll)sechost.dll	A: 0x751D0000 - 0x751E9000	(C:\Windows\SysWOW64\sechost.dll)RPCRT4.dll	A: 0x74F80000 - 0x75070000	(C:\Windows\syswow64\RPCRT4.dll)SspiCli.dll	A: 0x748F0000 - 0x74950000	(C:\Windows\syswow64\SspiCli.dll)CRYPTBASE.dll	A: 0x748E0000 - 0x748EC000	(C:\Windows\syswow64\CRYPTBASE.dll)LPK.dll	A: 0x74F70000 - 0x74F7A000	(C:\Windows\syswow64\LPK.dll)USP10.dll	A: 0x757E0000 - 0x7587D000	(C:\Windows\syswow64\USP10.dll)WSOCK32.dll	A: 0x72A30000 - 0x72A37000	(C:\Windows\system32\WSOCK32.dll)WS2_32.dll	A: 0x75B00000 - 0x75B35000	(C:\Windows\syswow64\WS2_32.dll)NSI.dll	A: 0x754C0000 - 0x754C6000	(C:\Windows\syswow64\NSI.dll)WINMM.dll	A: 0x73FC0000 - 0x73FF2000	(C:\Windows\system32\WINMM.dll)IMM32.DLL	A: 0x75D10000 - 0x75D70000	(C:\Windows\system32\IMM32.DLL)MSCTF.dll	A: 0x75D80000 - 0x75E4C000	(C:\Windows\syswow64\MSCTF.dll)mysql.DLL	A: 0x10000000 - 0x10013000	(C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\plugins\mysql.DLL)LIBMYSQL.dll	A: 0x02450000 - 0x02591000	(C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\LIBMYSQL.dll)MSVCR90.dll	A: 0x74610000 - 0x746B3000	(C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll)MSVCP90.dll	A: 0x61B90000 - 0x61C1E000	(C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCP90.dll)NLAapi.dll	A: 0x72230000 - 0x72240000	(C:\Windows\system32\NLAapi.dll)napinsp.dll	A: 0x72220000 - 0x72230000	(C:\Windows\system32\napinsp.dll)pnrpnsp.dll	A: 0x721E0000 - 0x721F2000	(C:\Windows\system32\pnrpnsp.dll)winrnr.dll	A: 0x72180000 - 0x72188000	(C:\Windows\System32\winrnr.dll)PrxerNsp.dll	A: 0x72170000 - 0x7217F000	(C:\Windows\system32\PrxerNsp.dll)mswsock.dll	A: 0x72130000 - 0x7216C000	(C:\Windows\System32\mswsock.dll)DNSAPI.dll	A: 0x720E0000 - 0x72124000	(C:\Windows\system32\DNSAPI.dll)mdnsNSP.dll	A: 0x720A0000 - 0x720C1000	(C:\Program Files (x86)\Bonjour\mdnsNSP.dll)Iphlpapi.DLL	A: 0x72C90000 - 0x72CAC000	(C:\Windows\system32\Iphlpapi.DLL)WINNSI.DLL	A: 0x72C80000 - 0x72C87000	(C:\Windows\system32\WINNSI.DLL)rasadhlp.dll	A: 0x71DE0000 - 0x71DE6000	(C:\Windows\system32\rasadhlp.dll)streamer.DLL	A: 0x61C70000 - 0x61CAE000	(C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\plugins\streamer.DLL)MSVCP100.dll	A: 0x61B20000 - 0x61B89000	(C:\Windows\system32\MSVCP100.dll)MSVCR100.dll	A: 0x617F0000 - 0x618AF000	(C:\Windows\system32\MSVCR100.dll)sscanf.DLL	A: 0x00300000 - 0x0030D000	(C:\Users\Anonymous\Desktop\samp03x_svr_R2_win32\plugins\sscanf.DLL)PrxerDrv.dll	A: 0x71DF0000 - 0x71E03000	(C:\Windows\system32\PrxerDrv.dll)wshtcpip.dll	A: 0x71C60000 - 0x71C65000	(C:\Windows\System32\wshtcpip.dll)wship6.dll	A: 0x71C50000 - 0x71C56000	(C:\Windows\System32\wship6.dll)


    Debug:


    PHP
    [21:39:30] ---------------------------[21:39:30] MySQL Debugging activated (10/10/13)[21:39:30] ---------------------------[21:39:30]  [21:39:30] >> mysql_real_escape_string( Connection handle: 1 )[21:39:30] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:30] >> mysql_query( Connection handle: 1 )[21:39:30] CMySQLHandler::Query(SELECT * FROM `accounts` WHERE `Name` = 'Streetracer') - Successfully executed.[21:39:30] >> mysql_store_result( Connection handle: 1 )[21:39:30] CMySQLHandler::StoreResult() - Result was stored.[21:39:30] >> mysql_num_rows( Connection handle: 1 )[21:39:30] CMySQLHandler::NumRows() - Returned 1 row(s)[21:39:30] >> mysql_free_result( Connection handle: 1 )[21:39:30] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:30] >> mysql_real_escape_string( Connection handle: 1 )[21:39:30] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:30] >> mysql_query( Connection handle: 1 )[21:39:30] CMySQLHandler::Query(SELECT * FROM `accounts` WHERE `Name` = 'Streetracer') - Successfully executed.[21:39:30] >> mysql_store_result( Connection handle: 1 )[21:39:30] CMySQLHandler::StoreResult() - Result was stored.[21:39:30] >> mysql_num_rows( Connection handle: 1 )[21:39:30] CMySQLHandler::NumRows() - Returned 1 row(s)[21:39:30] >> mysql_free_result( Connection handle: 1 )[21:39:30] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT `passwort` FROM `accounts` WHERE `Name` = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: Test123[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Level); - Escaped 5 characters to Level.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Level FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 10[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Geld); - Escaped 4 characters to Geld.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Geld FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 0[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Admin); - Escaped 5 characters to Admin.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Admin FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 5[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Bank); - Escaped 4 characters to Bank.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Bank FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 1000000[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Fraktion); - Escaped 8 characters to Fraktion.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Fraktion FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 0[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Rank); - Escaped 4 characters to Rank.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Rank FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 0[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Leader); - Escaped 6 characters to Leader.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Leader FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 0[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Health); - Escaped 6 characters to Health.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT `Health` FROM `accounts` WHERE `Name` = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_float( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 100[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Tode); - Escaped 4 characters to Tode.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Tode FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 0[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Kills); - Escaped 5 characters to Kills.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(SELECT Kills FROM accounts WHERE Name = 'Streetracer') - Successfully executed.[21:39:41] >> mysql_store_result( Connection handle: 1 )[21:39:41] CMySQLHandler::StoreResult() - Result was stored.[21:39:41] >> mysql_fetch_row_format( Connection handle: 1 )[21:39:41] CMySQLHandler::FetchRow() - Return: 0[21:39:41] >> mysql_free_result( Connection handle: 1 )[21:39:41] CMySQLHandler::FreeResult() - Result was successfully free'd.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Online); - Escaped 6 characters to Online.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:39:41] >> mysql_real_escape_string( Connection handle: 1 )[21:39:41] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:39:41] >> mysql_query( Connection handle: 1 )[21:39:41] CMySQLHandler::Query(UPDATE `accounts` SET `Online` = '1' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Level); - Escaped 5 characters to Level.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Level` = '10' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Admin); - Escaped 5 characters to Admin.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Admin` = '1' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Geld); - Escaped 4 characters to Geld.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Geld` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Bank); - Escaped 4 characters to Bank.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Bank` = '1000000' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Fraktion); - Escaped 8 characters to Fraktion.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Fraktion` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Rank); - Escaped 4 characters to Rank.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Rank` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Leader); - Escaped 6 characters to Leader.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Leader` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Health); - Escaped 6 characters to Health.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Health` = '100.000000' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Tode); - Escaped 4 characters to Tode.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Tode` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Kills); - Escaped 5 characters to Kills.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Kills` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(accounts); - Escaped 8 characters to accounts.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Online); - Escaped 6 characters to Online.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[21:45:56] >> mysql_real_escape_string( Connection handle: 1 )[21:45:56] CMySQLHandler::EscapeString(Streetracer); - Escaped 11 characters to Streetracer.[21:45:56] >> mysql_query( Connection handle: 1 )[21:45:56] CMySQLHandler::Query(UPDATE `accounts` SET `Online` = '0' WHERE `Name` = 'Streetracer') - Successfully executed.

    Aus einem mir unerklärlichem Grund wird der Betrag nicht auf das Bankkonto überwiesen.


    Tutorial: http://forum.sa-mp.de/archiv/6…-by-soulman-3#post1398378


    Genutzte Speichermethode als auch Funktion (MySQL)


    Code Abschnitte:



    enum SpielerDaten
    {
    pSQLID,
    pName[MAX_PLAYER_NAME],
    pLevel,
    pAdmin,
    pGeld,
    pBank,
    pFraktion,
    pRank,
    pLeader,
    Float:pHealth,
    pOnline
    }
    new SpielerInfo[MAX_PLAYERS][SpielerDaten];
    new Ueberweiser[MAX_PLAYERS] ={-1,...}; //Dient zur Speicherungen des Namens in dieser Variable


    if(dialogid == Einzahlung) //Fragt ab, welcher Dialog aufgerufen wurde.
    {
    new str[128]; //Wieder ein neuer string.
    if(!response)return ShowPlayerDialog(playerid,Bankmenu,DIALOG_STYLE_LIST,"Transaktionen","Einzahlung\nAuszahlung\nKontostand\nÜberweisung","Wählen","Beenden"); //Falls der Dialog nicht beantwortet wird, wird der originale Dialog angezeigt. (!response) Das Ausrufezeichen verneint die Abfrage.
    if(GetPlayerMoney(playerid) < strval(inputtext))return SendClientMessage(playerid,0xC8C8C8FF,"Du hast nicht genug Geld dabei!"); //Wenn das Geld auf der Hand des Spielers nicht ausreicht, erscheint diese Nachricht. Der inputtext dient hierbei als Abfrage dafür. Das Zeichen < müsstest du aus dem Mathematikunterricht kennen.
    GivePlayerMoney(playerid, - strval(inputtext)); //Hier wird dem Spieler das Geld abgezogen, was er einzahlt. Da es kein Befehl zum abziehen von Geld gibt, arbeitet man mit Minus.
    SpielerInfo[playerid][pBank] += strval(inputtext); //Hier wird das Geld dann auf das Bankkonto addiert.
    format(str,sizeof(str),"Sie haben %d $ auf ihr Konto eingezahlt",strval(inputtext)); //Jetzt kommt der string (str) zum Einsatz.
    ShowPlayerDialog(playerid,EinzahlungText,DIALOG_STYLE_MSGBOX,"Transaktion",str,"Schließen",""); //und als Dialog ausgegeben
    }


    stock SavePlayer(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 1)
    {
    mysql_SetInt("accounts", "Level", SpielerInfo[playerid][pLevel], "Name", SpielerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Admin", SpielerInfo[playerid][pAdmin], "Name", SpielerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Geld", SpielerInfo[playerid][pGeld], "Name", SpielerInfo[playerid][pName]); // GetPlayerMoney Das könnte da rein kommen !!!
    mysql_SetInt("accounts", "Bank", SpielerInfo[playerid][pBank], "Name", SpielerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Fraktion", SpielerInfo[playerid][pFraktion], "Name", SpielerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Rank", SpielerInfo[playerid][pRank], "Name", SpielerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Leader", SpielerInfo[playerid][pLeader], "Name", SpielerInfo[playerid][pName]);
    mysql_SetFloat("accounts", "Health", SpielerInfo[playerid][pHealth], "Name", SpielerInfo[playerid][pName]);
    mysql_SetInt("accounts", "Online", 0, "Name", SpielerInfo[playerid][pName]);
    }
    }
    return 1;
    }


    Hat eventuell Jemand eine Ahnung an was es hapern könnte ?!


    //Edit..


    Gerade festgestellt, das dass Geld überwiesen und Ingame abgezogen wird, jedoch ist nach dem Quit aus dem Game der Betrag noch in der Datenbank auf der Hand und auf dem Konto..




    // Fixxed ;)

    Ist doch anz simpel... zumindest von der Denkweise...


    Adminsystem mit verschiedenen Rängen...


    Der Admin hat folgende Ränge


    1
    2
    3
    4
    5
    1337


    So, und da möchte ich irgend wo den Adminrang definiert haben, admin mit Rechte sowieso hat Befejle sowieso


    Else


    Du bienötigst Rang sowieso

    Und wie genau verwende ich diese Ränge anhand von (ID's)?


    Beispielbefehl:


    CMD:veh(playerid,params[])
    {
    new carid,colid,colid2,rein,Float:x, Float:y, Float:z;
    //if(!IsPlayerAdmin(playerid,1))return SendClientMessage(playerid,0xFF00FFFF,"Du benötigst mindestens Admin Level 1");
    if(sscanf(params,"iii",carid,colid,colid2))return SendClientMessage(playerid,0xFF00FFFF,"Tippe: /veh [ID][Farbe 1][Farbe 2]");
    GetPlayerPos(playerid,x,y,z);
    rein = CreateVehicle(carid,x,y,z,0,colid,colid2,99999);
    PutPlayerInVehicle(playerid,rein,0);
    return 1;
    }

    Hallo zusammen,


    wo oder wie setze ich allgemein ein Admin System auf ?!


    Bisher habe ich nun folgendes in meinem Datenbank System eingebaut:


    enum SpielerDaten


    {


    pSQLID,


    pName[MAX_PLAYER_NAME],


    pLevel,


    pAdmin,


    pGeld,


    pBank,


    pFraktion,


    pRank,


    pLeader,


    Float:pHealth,


    pOnline


    }


    new SpielerInfo[MAX_PLAYERS][SpielerDaten];


    Zum Befehl:


    //Admin String//


    if (strcmp("/aduty", cmdtext, true, 10) == 0)


    {


    new Adminlevel[128];


    if(IsPlayerAdmin(playerid))return SendClientMessage(playerid,COLOR_ROT,"Du hast dafür keine Berrechtigung.");


    {


    switch(GetPVarInt(playerid,"Adminevel"))


    {


    case 0: {Adminlevel = "Nein";}


    case 1: {Adminlevel = "Supporter";}


    case 2: {Adminlevel = "Moderator";}


    case 3: {Adminlevel = "Super Moderator";}


    case 4: {Adminlevel = "Admin";}


    case 5: {Adminlevel = "FullAdmin";}


    }


    format(string,sizeof(string),">>%s hat sich als %s abgemeldet.<<",(playerid));


    SendClientMessageToAll(COLOR_WEISS,string);


    SendClientMessage(playerid,0xB230FFFF,"Du bist nun ein Vorbild Benimm dich!");


    SetPVarInt(playerid,"AdminDuty",1);


    }


    return 1;


    }


    Beachte bitte bei deiner Erklärung 2 Dinge:


    1) Ich bin Anfänger
    2) Bitte mit Muster erklären, da ich nicht so schnell kapiere wie manch anderer. eich lerne leider nur beim Probieren o0


    Ich möchte den Adminrang irgend wo definieren.


    Hallo zusammen,


    ich habe hier einmal ein kleines aber doch eventuell sehr nützliches Filterscript für Euch in Zusammenarbeit mit [pL]Makaveli geschrieben.


    Funktion:


    Beim Connecten wird dem User ein Changelog angezeigt was über die Funktion "HTTP_GET" vom Webserver abgerufen wird. Das ganze wird dann wie im Bild zu sehen als DIALOG_STYLE_MSGBOX ausgegeben.


    Das Filterscript kann für jede Website angepasst werden, es ist dazu aber notwendig, das ihr diesen bestimmten Text in einem Textdokument auf dem Webserver liegen habt. also als "exampel.txt". Solltet ihr ein sehr langen Changelog betreiben, ist es notwendig das Ihr den Buffer im Script auch dementsprechend verändert. Je größer der Buffer ist, desto mehr Text kann angezeigt werden.


    Wie wird der Buffer genutzt?


    Ganz einfach, man verwendet immer die doppelte Größe vom vorherigen Wert: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048...


    Zusatzfunktion:


    InGame kann man mittels dem Befehl /changelog das Changelog nochmals einblenden lassen wenn Jemand gerade nochmal nachlesen möchte.


    Textfile: http://pastebin.com/Jfs6c3Dt
    Download: http://www.solidfiles.com/d/7ef4256b97/


    P.S. Ich weis jetzt nicht warum ich kein Filterscript im entsprechenden Bereich public setzen konnte, habe auch nirgendwo einen Hinweis gesehen das ich 3 Wochen registriert sein muss wie es im anderen Bereich ausgewiesen wurde, von daher bitte ich einen Admin oder Moderator dies einmal zu verschieben.

    Hallo nochmal,


    ich habe heute mit Hauke wegen dieser Nod32 Warnung telefoniert und nun ja :) Alles bestens. Desweiteren habe ich ebenfalls eine Lizenz erworben und laut Aussage von Hauke werden diese gegen Mitternahct freigeschalten, da er noch am Arbeiten ist und erst dann eventuell etwas Zeit hat, bis dahin Gedult Leute.