Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 6,514
» Latest member: game47606
» Forum threads: 2,235
» Forum posts: 12,037

Full Statistics

Online Users
There are currently 531 online users.
» 1 Member(s) | 527 Guest(s)
Bing, Google, Applebot, game47606

Latest Threads
High-Precision Laser Weld...
Forum: General Discussions
Last Post: Young Harmoni
5 hours ago
» Replies: 0
» Views: 11
Interesting
Forum: Chat
Last Post: Gerty23461
8 hours ago
» Replies: 1
» Views: 22
I humor myself
Forum: Programming
Last Post: nami16504
Yesterday, 04:28 PM
» Replies: 5
» Views: 8,056
Command does not work in-...
Forum: Pawn Scripting
Last Post: PANZEHIR_
2024-11-23, 06:36 PM
» Replies: 0
» Views: 45
White Screen
Forum: Support
Last Post: Phat202146_real
2024-11-21, 02:50 PM
» Replies: 0
» Views: 44
I get error 021 using y_h...
Forum: Pawn Scripting
Last Post: daniscript18
2024-11-18, 11:34 PM
» Replies: 0
» Views: 62
Il reste des français sur...
Forum: French/Fran?ais
Last Post: tysanio
2024-11-18, 05:39 AM
» Replies: 2
» Views: 475
Object creation issues
Forum: Programming
Last Post: K1271
2024-11-15, 11:51 PM
» Replies: 0
» Views: 57
Is the SAMP Hosting the s...
Forum: General Discussions
Last Post: OperaGX
2024-11-14, 09:33 PM
» Replies: 0
» Views: 77
Run time error 19: "File ...
Forum: Pawn Scripting
Last Post: Rexey
2024-11-14, 03:50 AM
» Replies: 0
» Views: 65

 
  [SUGGESTION] IPv6 support?
Posted by: Jyottabyte - 2021-06-06, 10:39 AM - Forum: General Discussions - Replies (1)

I tried to add a random IPv6 address to 0.3.7?SA-MP client but it does not recognize the IP because ":" is detected as the port symbol, which is not the case in IPv6 addresses. I did not try with a hostname, but looks like IPv6 support isn't baked in.



Suggestion to consider adding IPv6 support to Open MP client.


  In-Game teleport creation tool
Posted by: BrycieBoi - 2021-06-06, 10:17 AM - Forum: Releases - No Replies

Hi, new member here.



Wrote a simple in-game teleport creation tool. Currently /savetele is not limited to admins, but this can be added easily.



How to use:

/savetele <name> : Saves a teleport location to scriptfiles/Custom Teles.

/teles : Displays a list dialog of all saved teleports. Selecting one will teleport the player to it's location (with vehicle if applicable).

/tele <name> : Teleports player to saved teleport with <name> (shortcut version of '/teles').



Dependencies:

Dini

zcmd

sscanf2



Installation:

1) Compile CustomTeleports.pwn and add CustomTeleports to filterscripts in server.cfg

2) Create a directory named 'Custom Teles' inside the scriptfiles directory



Download



Feel free to make any changes you like.


  'inject' Modes to gta_sa/SA-MP??
Posted by: redex - 2021-06-06, 06:26 AM - Forum: Programming - Replies (2)

hi, i am working on a custom SA-MP launcher for my server, its an anti cheat now i want to do something more, i want to add some modes and stuff, like skins or other modes, now i want to it only load when user is opening gta_sa with my launcher, so i dont want to just put some stuff in game folder , how can i do something like injecting that files ? for example i just downloaded a mode that have 2 files , tff and dff (if i got that right) how can i inject this model files to game? or another example i just downloaded a radar mode, it said i should replace the IMG files to gta3.img , how can i do that ONLY when user opening game with launcher?



i seen this thing in other servers so i guess its possible, by the way i used C# for the launcher


  QUESTION about MYSQL
Posted by: redex - 2021-06-05, 11:35 AM - Forum: Pawn Scripting - Replies (2)

hi , i was wonder which one is better to use for getting player data from database when he logged-in , i have about user in my data base and i have to select user from this amount of users , currently i use something like this :



pInfo[playerid][score] = mysql_get ...

pInfo[playerid][skinid] = mysql_get ...

pInfo[playerid][money] = mysql_get ...



i mean i have 1 query per item! and i think this will make server LAG , should i get all items in a SELECT * query and then put them in variables? does it make any diffrent to avoid lag ? sorry i know my english is AWFUL but i guess i made my point!


  Opinion on PVars
Posted by: Pinch - 2021-06-05, 09:16 AM - Forum: Pawn Scripting - Replies (3)

Hi everyone, I've gotten bored so I started writing a gamemode for fun, I want it to be a RolePlay gamemode with all of the stuff (like the NG-RP) but I want it to be smooth on bigger player base too..



I ran some tests and those were the results

Code:
Timing "PawnPlus list"...

      Mean = 480.00ns

      Mode = 475.00ns

    Median = 477.00ns

     Range = 5.00ns

Timing "Normal var"...

      Mean = 200.00ns

      Mode = 199.00ns

    Median = 200.00ns

     Range = 3.00ns

Timing "Pvar timings"...

      Mean = 483.00ns

      Mode = 481.00ns

    Median = 483.00ns

     Range = 4.00ns



The code I used:



Code:
new List:pp_list[1000];



enum E_PLAYER_DATA {

    E_PLAYER_SOME_VAR,

    E_PLAYER_SOME_VAR_2,

    E_PLAYER_SOME_VAR_3

};

new PlayerData[1000][E_PLAYER_DATA];



hook OnScriptInit()

{

    for(new i = 0; i < 1000; ) {

        pp_list[i] = list_new();

        list_resize_var(pp_list[i], 3, VAR_NULL);    

    }

    return Y_HOOKS_CONTINUE_RETURN_1;

}



public OnPlayerConnect(playerid)

{

    wait_ms(5000);

    print("A");

    RUN_TIMING("PawnPlus list")

    {

        list_set(pp_list[playerid], 0, 10000000);

        list_set(pp_list[playerid], 1, 10000000);

        list_set(pp_list[playerid], 2, 10000000);

    }

    RUN_TIMING("Normal var")

    {

        PlayerData[playerid][E_PLAYER_SOME_VAR] = 10000000;

        PlayerData[playerid][E_PLAYER_SOME_VAR_2] = 10000000;

        PlayerData[playerid][E_PLAYER_SOME_VAR_3] = 10000000;

    }

    RUN_TIMING("Pvar timings")

    {

        SetPVarInt(playerid, "key1", 10000000);

        SetPVarInt(playerid, "key2", 10000000);

        SetPVarInt(playerid, "key3", 10000000);

    }

    return 1;

}



So, is it worth it?

Should I use PVars/PP lists? Does it even matter that much when the diff is 200ns?


  Overpass Signs Not Loading?
Posted by: Schoenherr - 2021-06-05, 03:04 AM - Forum: Support - No Replies

Hey guys. So I'm back in the scripting game (played back in 7th grade lol), and working on a new server. I'm attempting to set up a nice view for the player while they're logging in / registering. For some reason, however, I noticed that for whatever reason that the overpass signs just don't load, and you see the white text floating in the air.



Is this just an issue on my machine? Is this a limitation in San Andreas or SAMP? Any ideas?



[Image: CELFLkS.png]


  Server crashed due to an unknown error
Posted by: israel_Oliveira - 2021-06-03, 06:18 PM - Forum: Support - Replies (4)

As the title says, can anyone help me with this error?



crashdetect log



[14:30:27] Server crashed due to an unknown error

[14:30:27] Native backtrace:

[14:30:27] #0 f73bbf7f in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/crashdetect.so

[14:30:27] #1 f73b481d in _ZN11CrashDetect20PrintNativeBacktraceERSoRKN2os7ContextE () in plugins/crashdetect.so

[14:30:27] #2 f73b4e48 in _ZN11CrashDetect20PrintNativeBacktraceERKN2os7ContextE () in plugins/crashdetect.so

[14:30:27] #3 f73b65dc in _ZN11CrashDetect7OnCrashERKN2os7ContextE () in plugins/crashdetect.so

[14:30:27] #4 f73bb79f in ?? () in plugins/crashdetect.so

[14:30:27] #5 f7724410 in ?? ()

[14:30:27] #6 f7724430 in ?? ()

[14:30:27] #7 f7417257 in gsignal () in /lib/libc.so.6

[14:30:27] #8 f7418a93 in abort () in /lib/libc.so.6

[14:30:27] #9 f74100d7 in ?? () in /lib/libc.so.6

[14:30:27] #10 f7410187 in ?? () in /lib/libc.so.6

[14:30:27] #11 f72f42ee in ?? () in plugins/SKY.so

[14:30:27] #12 f72f8c49 in ?? () in plugins/SKY.so

[14:30:27] #13 080aed3d in ?? () in ./samp03svr

[14:30:27] #14 080aef02 in ?? () in ./samp03svr

[14:30:27] #15 080aa13a in ?? () in ./samp03svr

[14:30:27] #16 f74022d3 in __libc_start_main () in /lib/libc.so.6

[14:30:27] #17 0804b4e1 in ?? () in ./samp03svr

[14:30:27] Registers:

[14:30:27] EAX: 00000000 EBX: 00007892 ECX: 00007892 EDX: 00000006

[14:30:27] ESI: f5a21000 EDI: f75af000 EBP: fffa3998 ESP: fffa3754

[14:30:27] EIP: f7724430 EFLAGS: 00200246

[14:30:27] Stack:

[14:30:27] ESP퍍㓓䴴: fffa3998 00000006 00007892 f7417257

[14:30:27] ESP퍍㓓䶴: fffa3784 00000000 38343160 fffa37c0

[14:30:27] ESP퍍㓓临: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓亴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓伴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓䚴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓䜴: f75b0164 f7410eb0 00000000 1d010043

[14:30:27] ESP퍍㓓䞴: 415b711e 00019b00 00000000 fffa3820

[14:30:27] ESP퍍㓓崴: f75af420 00000088 00000001 f75af980

[14:30:27] ESP퍍㓓嶴: f75ad8c0 fffa3998 00000000 00000003

[14:30:27] ESP퍍㓓帴: f5a21000 f7318978 f74100d7 00000000

[14:30:27] ESP퍍㓓庴: 00000000 f73189b4 f756815c f7318978

[14:30:27] ESP퍍㓓弴: 00000005 0c9c06c8 00001000 f75af000

[14:30:27] ESP퍍㓓嚴: f7318978 f7318950 00000094 f73189b4

[14:30:27] ESP퍍㓓圴: f7410136 f732c000 f72f42ee f7318978

[14:30:27] ESP퍍㓓垴: f72f42c6 f732c000 f72f8c49 09c61510

[14:30:27] ESP퍍㓓洴: 006d812b ec54f349 e6799a98 09c61510

[14:30:27] ESP퍍㓓涴: 08159db3 fffa3998 080aed3d 09c65240

[14:30:27] ESP퍍㓓渴: 08159c36 fffa39c8 080aef02 09c61510

[14:30:27] ESP퍍㓓溴: 00000000 00000000 00989680 09c37170

[14:30:27] ESP퍍㓓漴: 08159db3 00000006 08159dcd 00000000

[14:30:27] ESP퍍㓓暴: f76fad44 f76fad40 f76a6026 f76fb838

[14:30:27] ESP퍍㓓朴: 00001e61 00000258 0167bbb1 656d6167

[14:30:27] ESP퍍㓓枴: f76fad44 f76fa9e0 f767bd20 f76fad44

[14:30:27] ESP퍍㓓紴: f76fade0 f76faf20 f766bdb8 080aa260

[14:30:27] ESP퍍㓓綴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓縴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓纴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓缴: 00000000 00000000 00000000 00000000

[14:30:27] ESP퍍㓓皴: f76fc598 0815072b f75af000 00000000

[14:30:27] ESP퍍㓓眴: fffa3ba4 fffa3bac f75ce650 00000001

[14:30:27] ESP퍍㓓瞴: f75af000 00000000 00000000 00000000

[14:30:27] Loaded modules:

[14:30:27] 00000000 - 00187f43 samp03svr

[14:30:27] f7726000 - f7726530

[14:30:27] f7718000 - f771a6a4 /lib/libdl.so.2

[14:30:27] f76fd000 - f7716ad3 /lib/libpthread.so.0

[14:30:27] f7611000 - f7702e88 /lib/libstdc.so.6

[14:30:27] f75cf000 - f76101f4 /lib/libm.so.6

[14:30:27] f75b3000 - f75cc6f8 /lib/libgcc_s.so.1

[14:30:27] f73e8000 - f75baa93 /lib/libc.so.6

[14:30:27] f7725000 - f7748110 /lib/ld-linux.so.2

[14:30:27] f739c000 - f73e43d4 plugins/crashdetect.so

[14:30:27] f72e5000 - f739ccdf plugins/SKY.so

[14:30:27] f771e000 - f7721310 plugins/CTime.so

[14:30:27] f7286000 - f72e4aec plugins/mysql.so

[14:30:27] f7263000 - f7284108 /home/samp/plugins/../log-core.so

[14:30:27] f7254000 - f725ad90 /lib/librt.so.1

[14:30:27] f6f6a000 - f7259168 /usr/lib/mysql/libmysqlclient.so.18

[14:30:27] f6f53000 - f6f67efc /lib/libz.so.1

[14:30:27] f6eea000 - f6f5421c /lib/libssl.so.10

[14:30:27] f6cfe000 - f6f01b10 /lib/libcrypto.so.10

[14:30:27] f6cb3000 - f6cfdbf0 /lib/libgssapi_krb5.so.2

[14:30:27] f6bdc000 - f6cba65c /lib/libkrb5.so.3

[14:30:27] f6bd7000 - f6bd973d /lib/libcom_err.so.2

[14:30:27] f6ba2000 - f6bd571c /lib/libk5crypto.so.3

[14:30:27] f6b89000 - f6ba1014 /lib/libresolv.so.2

[14:30:27] f6b79000 - f6b876cc /lib/libkrb5support.so.0

[14:30:27] f6b74000 - f6b76c38 /lib/libkeyutils.so.1

[14:30:27] f6b4d000 - f6b72ea0 /lib/libselinux.so.1

[14:30:27] f6ae8000 - f6b4b584 /lib/libpcre.so.1

[14:30:27] f5ad3000 - f5ae4748 /lib/libnss_files.so.2

[14:30:27] f5ac2000 - f5ad19b4 plugins/sscanf.so

[14:30:27] f583a000 - f58ff740 plugins/streamer.so

[14:30:27] f568b000 - f58444d5 plugins/sampvoice.so

[14:30:27] f725f000 - f7262484 plugins/mapandreas.so

[14:30:27] f5a76000 - f5a7ad34 /lib/libnss_dns.so.2


Information Get coordinates where the player is looking!
Posted by: Otakeiro - 2021-06-02, 08:58 PM - Forum: Pawn Scripting - Replies (3)

I intend to do something similar to the gravitygun while holding an object at 10.0 away the front of the player, but I do not know which function to use so that when the player looks up this object fluctuating following the position to where the player is looking



What function would do that for me? Get the position where the player is looking


Question [Sorted out] Update attached objects
Posted by: Otakeiro - 2021-06-02, 02:48 AM - Forum: Pawn Scripting - Replies (4)

Pretendo fazer uma StroboLights para ve?culos, vou usar luzes para o prot?tipo.

?Eu uso o Streamer para criar objetos din?micos e anex?-los, mas ... como atualizar a posi??o dos objetos anexados sem destru?-los e recri?-los?

?por exemplo, haveria alguma maneira de fazer um "UpdateAttachedDynamicObjectPos"?


  Array elements within a function aren't able to change?
Posted by: klausfelix - 2021-06-01, 05:00 PM - Forum: Programming - No Replies

[color=var(--highlight-color)]a = np.array([0,2,4,2,0,2,3,2,3,2,0])

plt.figure(figsize=(10,7))

plt.plot(a,label='a')



def raycrit(a,thresh):

? ? min_ind = argrelextrema(a, np.less)

? ? max_ind = argrelextrema(a, np.greater)

? ? maxima = a[max_ind]

? ? minima = a[min_ind]

? ? if min_ind[0][0] > max_ind[0][0]:

? ? ? ? for i in range(0,len(minima)):

? ? ? ? ? ? if maxima[i] > thresh and maxima[i] > thresh:

? ? ? ? ? ? ? ? if minima[i] > maxima[i]/2 and minima[i] > maxima[i]/2:

? ? ? ? ? ? ? ? ? ? minima[i] = thresh

? ? a[min_ind] = minima

? ? return a

? ? ? ?

b = raycrit(a,2.5)
[/color]



In the above code excerpt, I am trying to find local minima surrounded by local maxima that are more than half the height of the highest local maximum that neighbours it. And while this put into text might be confusing, I think reading the code helps understand what I'm trying to reach for. The problem arises with the fact that?

minima[i] = thresh

?stays unchanged even when the condition is triggered. Here the result should be [0,2,4,2,0,2,3,2.5,3,2,0] but remains [0,2,4,2,0,2,3,2,3,2,0] and I am quite confused as to why...