Quantcast
Channel: SA-MP Forums
Viewing all 18226 articles
Browse latest View live

[Ajuda] quL vLor mX NPC?

$
0
0
olá tdos,

qual vLor Máximo de NPC no servidor ?
...Ou é uma variável por server ...
EX: SERVER 500 SLOTS = 500 NPC IN GAME.
qual Tempo máximo de gravação de um Npc ?
tem DIFErença no tempo gravação entre
NPC no VEICULO E a PÉ ?

Bike up arrow spam

$
0
0
How do I prevent players to spam up arrow to accelerate the speed of their motorbike? It is known that spamming up arrow button will accelerate motorbike speed, and I would like it so that it will make their bike slower instead to prevent abuse

[GameMode] Quest system Burned RPG

$
0
0
Salut, as dori sa scot tot sistemul de quest de pe gamemode-ul BURNED si nu stiu cum sa fac acest lucru deoarece primesc o multime de erori, daca a-ti putea sa ma ajutati sa il scot va rog.

Array index out of bounds for a string

$
0
0
pawn Code:
new currentWord[MAX_PLAYERS][16];

enum HotwireWords
{
    uns[15], // unscrambled word
    scr[15] // scrambled word
}

new HotwireWord[15][HotwireWords] =
{
    {"apple", "paple"},
    {"vehicle", "clehive"},
    {"parrot", "raprot"},
    {"alarm", "laamr"},
    {"bomb", "mbob"},
    {"police", "lipoce"},
    {"fork", "fkor"},
    {"warrant", "rawatrn"},
    {"grand", "grnad"},
    {"music", "cisum"},
    {"evade", "daeve"},
    {"attack", "takatc"},
    {"pistol", "stipol"},
    {"sexy", "syxe"},
    {"april", "arilp"}
};

stock SwitchWord(playerid)
{
    new wordid, message[32];
    wordid = randomEx(1,15);
    currentWord[playerid][16] = HotwireWord[wordid][scr]; // THIS LINE GIVES ME THE ERROR
    format(message, 32, "WORD:{ffffff} %s", HotwireWord[wordid][scr]);
    SendClientMessage(playerid, 0xc00A30EFF, message);
    format(message, 32, "WORD:{ffffff} %s", currentWord[playerid]);
    SendClientMessage(playerid, 0xc00A30EFF, message);
}

hotwire.pwn(99) : error 032: array index out of bounds (variable "currentWord")

Why does this give me the error? If I do it without the [16] it will work but not properly.

[SA:MP] How to edit GTA San Andreas object without losing it's lighting

$
0
0
The title says it. Let's start.

Programs needed
- Autodesk 3ds Max 2009 (32-bit or 64-bit depending on your system)
- Map editor
- Alci's IMG Editor 1.5
- kdff program
- txd workshop and kam's scripts are provided in the attachments


Open map editor and find object you want to work on.




Let's say I want to edit this house:




Double left-click on it and this window pops up:




After that, we are looking for this:

Model: compmedhos3_lae.dff
Texture: comedhos1_la.txd




Open Alci's IMG Editor 1.5 and go File > Open > gta3.img

In search bar type compmedhos3_lae and comedhos1_la because that are the files we are looking for. If you are willing to export an interior object, open gta_int.img.
Now after you have found them, go Actions > Export and export it where you want. Remember, exporting file must be selected while you are doing this.




Exporting all textures to desktop

For this, you need to have TXD workshop that is provided in the attachments. In TXD workshop go Open TXD and choose your file. In my case that is comedhos1_la. Now do this:



After that, you may ask why is it exported to desktop? That's because you need to import textures in 3ds Max, but before that you need to set your project folder from where 3ds max should import stuff (in this case .png files to textures).

(3ds max)


Here choose Desktop because textures are exported to desktop (croatian radna površina)


After that, we have our files exported and ready for importing in 3ds Max. For 3ds Max you need to install the scripts provided in the attachments. Any other exporting script will not work for this kind of thing. If you don't know how to install scripts for 3ds Max, you simply go to your 3ds Max directory (32-bit or 64- bit) and find Scripts folder. You just paste Kam's scripts there.

Restart 3ds Max once you have done that.


Importing in 3ds Max





Select import and this will show up. Choose .png because earlier on, we exported our files to desktop with .png extension.



Press import and choose .dff file, in this case it is compmedhos3_lae.


Selections and applying texture

Sometimes object can't be selected. Here is what you should do:

Right click on it > Create polygons



After that you have polygons created. Remember, some objects don't need to create polygons. You will see that if they appear red on click.

Also, as in Blender, 3ds Max has it's selection modes. Choose to select element.



Okay, now you learned how to select faces in 3ds Max. Time to apply textures to know what are you actually selecting.



Select windows with left click (hold ctrl to select couple of them at once)



Simply, press delete and you have this:


Exporting process

Cool now you have your edited house. Export it.



Very important part is to name the dff, txd and .col the same name!

(kdff)


Remember once you made .col you need to save the new .dff file!

Since you have exported original .txd file, you just need to rename it to the .dff name. No need to create new .txd file with exported .png's because you are doing the same file. Now after all that, you just put it in artconfig.txt.

AddSimpleModel(-1, 3556, -2001, "house.dff", "house.txd");
Numbers colored red really doesn't matter because we made .col file. Just for originallity, put the original ID of the object there!




Attached Files
File Type: zip Kam's scripts 2018 updated by GoldFish.zip (309.4 KB)
File Type: zip TXD Workshop.zip (716.0 KB)

TEXTDRAWFORPLAYER DONT SHOW

$
0
0
IDK WHY THIS TEXTDRAW DOESENT SEE. I DONT HAVE OTHERS TEXTDRAWS


new Text:welcomeText;

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

public OnGameModeInit()
{
welcomeText = TextDrawCreate(240.0,580.0,"~R~MISSION FAILED!");
return 1;
}

TextDrawShowForPlayer(playerid,welcomeText);

[Ajuda] Warnings DOF2

$
0
0
Opá galera, eu estou com esse problema e não sei resolver, já procurei em diversos locais e não acho nada parecido para resolver meu problema, alguém pode me ajudar? Ficarei grato ! ;)

Code:

C:\Users\Felipe\Desktop\RPGv1\pawno\include\dof2.inc(1357) : warning: recursion in DOF2_SortEntries
C:\Users\Felipe\Desktop\RPGv1\pawno\include\dof2.inc(1520) : warning: recursion in DOF2_SortSection_Internal
Disable recursion warning: #pragma disablerecursion
Pawn compiler 3.2.3664                          Copyright (c) 1997-2016, ITB CompuPhase


2 Warnings.

[Filterscript] Vice City minimap


Is it possible to use the both train track?

$
0
0
Everytime i try to create a train, the train always spawn on the left track, it isn't possible to use both tracks? right and left?



Code:

AddStaticVehicleEx(537,VehicleInfo[vehid][vParkX], VehicleInfo[vehid][vParkY], VehicleInfo[vehid][vParkZ], VehicleInfo[vehid][vParkR], cor1,cor2,0);

[Ajuda] GetString nome em Create3DTextLabel

$
0
0
Boa noite users, gostaria de saber como posso fazer para dar um GetString no método que usei para salvar abaixo:

PHP Code:

new fcGang[50];

format(fcGangsizeof(fcGang), "Territorio/Gang/%i.ini"i);
DOF2_CreateFile(fcGang);
DOF2_SetString(fcGang"Clan"InfoGang[Team[i]][NomeGang]);
DOF2_SaveFile(); 

Gostaria de adicionar o nome salvo em uma TextLabel:

PHP Code:

new Text3D:nome_Reg;

public 
OnGameModeInit() 
{
      new 
str[50];

      
format(fcGangsizeof(fcGang), "Territorio/Gang/%i.ini");

      
format(str50"O nome é: %s."InfoGang[Team[i]][NomeGang]);
      
nome_Reg Create3DTextLabel(str, -1xyz5000);


Ele está salvando corretamente no arquivo, porém, não estou conseguindo utilizar o DOF2_GetString.
Alguém poderia me ajudar?

help kalkor please help

$
0
0
crash attack :S



[19:52:42] [debug] Server crashed while executing server.amx
[19:52:42] [debug] AMX backtrace:
[19:52:42] [debug] #0 00000038 in INI_AddToBuffer (INI:file=48, name[]=@00000031 !"=", data[]=@0141d0d0 "-0000001608688601") at <unknown file>:0
[19:52:42] [debug] #1 000148ac in ?? (48, 49, 0, 0, 66, 97, 110, 99, 111, 47, ... <3 more arguments>) at C:\Users\javi\Desktop\server\pawno\include\YSI\y_i ni.inc:1076
[19:52:42] [debug] #2 00000038 in public JBC_OnDialogResponse () at <unknown file>:0
[19:52:42] [debug] #3 native CallLocalFunction () in samp03svr
[19:52:42] [debug] #4 0002819c in ?? (39, 2668, 1, -1, 21074688) at C:\Users\javi\Desktop\server\pawno\include\JunkBus ter.inc:121
[19:52:42] [debug] #5 0000c588 in public OnDialogResponse (playerid=39, dialogid=2668, response=1, listitem=-1, inputtext[]=@01419300 "111111111111111111111111") at C:\Users\javi\Desktop\server\pawno\include\YSI\y_h ooks/impl.inc:2251
[19:52:42] [debug] Native backtrace:
[19:52:42] [debug] #0 f73398b6 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/f.so
[19:52:42] [debug] #1 f7331120 in _ZN18CrashDetectHandler20PrintNativeBacktraceERSoR KN2os7ContextE () in plugins/f.so
[19:52:42] [debug] #2 f7331886 in _ZN18CrashDetectHandler20PrintNativeBacktraceERKN2 os7ContextE () in plugins/f.so
[19:52:42] [debug] #3 f7331f96 in _ZN18CrashDetectHandler7OnCrashERKN2os7ContextE () in plugins/f.so
[19:52:42] [debug] #4 f7338f82 in ?? () in plugins/f.so
[19:52:42] [debug] #5 f76df420 in ?? ()
[19:52:42] [debug] #6 f3c7a360 in ?? ()
[19:52:42] [debug] Registers:
[19:52:42] [debug] EAX: f3c7a360 EBX: f3c78ffc ECX: 0141d0d0 EDX: f3c78ff8
[19:52:42] [debug] ESI: 0866fba0 EDI: f411f508 EBP: f3c73008 ESP: fffd0b70
[19:52:42] [debug] EIP: f3c7a360 EFLAGS: 00010202
[19:52:42] [debug] Stack:
[19:52:42] [debug] ESP+00000000: 0866fba0 0000001d fffd0bbc f553c5c8
[19:52:42] [debug] ESP+00000020: 0141d0d0 00000038 0141d28c 014193c8
[19:52:42] [debug] ESP+00000040: f76d4000 0866fba0 00000001 00000000
[19:52:42] [debug] ESP+00000060: 08431cf0 00000056 fffd0cb8 f733341c
[19:52:42] [debug] ESP+00000080: 0002819c 00000056 fffd0c18 f727e944
[19:52:42] [debug] ESP+000000a0: 00000005 f73177f0 fffd0ce8 f727ed68
[19:52:42] [debug] ESP+000000c0: f727e790 fffd0c50 00000000 08e8c738
[19:52:42] [debug] ESP+000000e0: 00000014 00000027 00000a6c 00000001
[19:52:42] [debug] ESP+00000100: 00000074 fffd0c90 f76eea9b f73d4d9c
[19:52:42] [debug] ESP+00000120: 00000001 0141d2b0 0002819c 00000056
[19:52:42] [debug] ESP+00000140: 0842af30 f735e630 fffd0ce8 f73370d0
[19:52:42] [debug] ESP+00000160: 0866fba0 00000001 0027eb5b f73177f0
[19:52:42] [debug] ESP+00000180: 0866fba0 fffd0dfc 00000056 fffd0dfc
[19:52:42] [debug] ESP+000001a0: 7fffffff 00000000 f3c75660 0866fba0
[19:52:42] [debug] ESP+000001c0: 0866fba0 fffd0dfc 00000056 fffd0d50
[19:52:42] [debug] ESP+000001e0: 31313131 31313131 31313131 31313131
[19:52:42] [debug] ESP+00000200: f553c794 0866fba0 fffd1238 080dfb94
[19:52:42] [debug] ESP+00000220: fffd0eac 0837e618 fffd0e58 0866fba0
[19:52:42] [debug] ESP+00000240: 65736e6f fffd0e00 fffd0e1c 6c6f626d
[19:52:42] [debug] ESP+00000260: 00000000 0837e448 00000003 00000001
[19:52:42] [debug] ESP+00000280: f76fa04a 00000000 fffd0d80 00000000
[19:52:42] [debug] ESP+000002a0: 00000005 f518e000 00000014 f518dfac
[19:52:42] [debug] ESP+000002c0: 00000000 00000000 00000000 00000000
[19:52:42] [debug] ESP+000002e0: 00000000 00000000 00000000 00000000
[19:52:42] [debug] ESP+00000300: 0837e618 00000000 00000000 00000002
[19:52:42] [debug] ESP+00000320: 0837e618 00000000 0837e448 f7700d20
[19:52:42] [debug] ESP+00000340: fffd0ea0 f7701000 00000000 00000000
[19:52:42] [debug] ESP+00000360: 00000000 00000000 f74844b1 f76d4000
[19:52:42] [debug] ESP+00000380: fffd1050 f7700d20 fffd0f18 f74849ea
[19:52:42] [debug] ESP+000003a0: fffd1070 f7701000 fffd1038 f76d0e31
[19:52:42] [debug] ESP+000003c0: fffd1050 00000000 0837d260 f736092c
[19:52:42] [debug] ESP+000003e0: 00000000 0837d25c 0837d260 0837d258
[19:52:42] [debug] Loaded modules:
[19:52:42] [debug] 00000000 - 00187dc3 samp03svr
[19:52:42] [debug] f76e1000 - f76e1540
[19:52:42] [debug] f76d0000 - f76d281b /lib32/libdl.so.2
[19:52:42] [debug] f76b4000 - f76cf097 /lib32/libpthread.so.0
[19:52:42] [debug] f7573000 - f76bc554 /usr/lib32/libstdc++.so.6
[19:52:42] [debug] f752d000 - f7571ca3 /lib32/libm.so.6
[19:52:42] [debug] f7510000 - f752c144 /usr/lib32/libgcc_s.so.1
[19:52:42] [debug] f7361000 - f751700b /lib32/libc.so.6
[19:52:42] [debug] f76e0000 - f770105c /lib/ld-linux.so.2
[19:52:42] [debug] f731a000 - f735e3ac plugins/f.so
[19:52:42] [debug] f7254000 - f7319740 plugins/streamer.so
[19:52:42] [debug] f7242000 - f7249137 /lib32/librt.so.1
[19:52:42] [debug] f7231000 - f72409b4 plugins/sscanf.so
[19:52:42] [debug] f704f000 - f7231e52 plugins/mysql_static.so
[19:52:42] [debug] f7043000 - f704d41f /lib32/libnss_files.so.2
[19:52:42] [debug] f6821000 - f68411ed plugins/dns.so
[19:52:42] [debug] f76d5000 - f76d998b /lib32/libnss_dns.so.2
[19:52:42] [debug] f33af000 - f33c53d3 /lib32/libresolv.so.2

Texdraw Label o 3D text Label ?

$
0
0


hello can you help me with the code of GAME OPERATOR is different from what NORMAL says, if you look closely it does not have the outline

gettime

$
0
0
Hey, any ideas ?? 0 erros:

in game i getting just Expiring in: (nothing else, its not showing time)

Code:


                new
                        str[118],
                        TimerV= playerDB[playerid][VipTime]
                ;
                SendClientMessage(playerid, -1, "Vip On");
                format(str, sizeof str, "Expiring in: %s", ConvertSeconds(TimerV- gettime()));
                SendClientMessage(playerid, -1, str);

[Map] Fortcars Fire Department

Server Crash problem.

$
0
0
Hello.
Last days server just shut down suddenly and getting these errors:


Code:

[09:52:42] [debug] Server crashed due to an unknown error
[09:52:44] [debug] Native backtrace:
[09:52:44] [debug] #0 f65aa8b6 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () in plugins/crashdetect.so
[09:52:44] [debug] #1 f65a2120 in _ZN18CrashDetectHandler20PrintNativeBacktraceERSoRKN2os7ContextE () in plugins/crashdetect.so
[09:52:44] [debug] #2 f65a2886 in _ZN18CrashDetectHandler20PrintNativeBacktraceERKN2os7ContextE () in plugins/crashdetect.so
[09:52:44] [debug] #3 f65a2f96 in _ZN18CrashDetectHandler7OnCrashERKN2os7ContextE () in plugins/crashdetect.so
[09:52:45] [debug] #4 f65a9f82 in ?? () in plugins/crashdetect.so
[09:52:45] [debug] #5 f76f4410 in ?? ()
[09:52:45] [debug] #6 f76f4430 in ?? ()
[09:52:45] [debug] #7 f73e5227 in gsignal () in /lib/libc.so.6
[09:52:45] [debug] #8 f73e6a63 in abort () in /lib/libc.so.6
[09:52:45] [debug] #9 f7426fd5 in ?? () in /lib/libc.so.6
[09:52:45] [debug] #10 f742f200 in ?? () in /lib/libc.so.6
[09:52:45] [debug] #11 f74309a8 in ?? () in /lib/libc.so.6
[09:52:45] [debug] #12 f7432dda in __libc_malloc () in /lib/libc.so.6
[09:52:45] [debug] #13 f7629c97 in _Znwj () in /lib/libstdc++.so.6
[09:52:45] [debug] #14 f7629dab in _Znaj () in /lib/libstdc++.so.6
[09:52:46] [debug] #15 080600c7 in ?? () in ./samp03svr
[09:52:46] [debug] #16 0808794e in ?? () in ./samp03svr
[09:52:46] [debug] #17 08087b64 in ?? () in ./samp03svr
[09:52:46] [debug] #18 0807b8f6 in ?? () in ./samp03svr
[09:52:46] [debug] #19 0807c6fa in ?? () in ./samp03svr
[09:52:46] [debug] #20 0809734d in ?? () in ./samp03svr
[09:52:46] [debug] #21 0807cef6 in ?? () in ./samp03svr
[09:52:46] [debug] #22 0807eaae in ?? () in ./samp03svr
[09:52:46] [debug] #23 f76d1bbc in ?? () in /lib/libpthread.so.0
[09:52:46] [debug] #24 f74b40ee in clone () in /lib/libc.so.6
[09:52:46] [debug] Registers:
[09:52:47] [debug] EAX: 00000000 EBX: 00006741 ECX: 00006743 EDX: 00000006
[09:52:47] [debug] ESI: 00000008 EDI: f757d000 EBP: f6dec388 ESP: f6debbb4
[09:52:47] [debug] EIP: f76f4430 EFLAGS: 00000282
[09:52:47] [debug] Stack:
[09:52:47] [debug] ESP+00000000: f6dec388 00000006 00006743 f73e5227
[09:52:47] [debug] ESP+00000020: f6debbe4 00000000 f759c2a0 f73b7994
[09:52:47] [debug] ESP+00000040: 00000000 00000000 00000000 00000000
[09:52:47] [debug] ESP+00000060: 00000000 00000000 00000000 00000000
[09:52:47] [debug] ESP+00000080: 00000000 00000000 00000000 00000000
[09:52:47] [debug] ESP+000000a0: 00000000 00000000 00000000 00000000
[09:52:47] [debug] ESP+000000c0: f759c2a0 62343766 65653034 37000000
[09:52:47] [debug] ESP+000000e0: f74b4090 f759c290 0000000e f75360e3
[09:52:48] [debug] ESP+00000100: 00000003 f6debc86 00000002 f75360b3
[09:52:48] [debug] ESP+00000120: 00000008 f753835e 00000002 00000003
[09:52:48] [debug] ESP+00000140: 00000008 f6debf70 f7426fd5 00000008
[09:52:48] [debug] ESP+00000160: 00000000 00000000 00000000 f7539768
[09:52:48] [debug] ESP+00000180: 00000003 f7536d03 0000001c f753977d
[09:52:48] [debug] ESP+000001a0: 00000005 00000000 00000000 00000000
[09:52:48] [debug] ESP+000001c0: 00000005 f6debd90 0000000a 00000000
[09:52:48] [debug] ESP+000001e0: 00000008 f6debdb0 00000003 00000064
[09:52:48] [debug] ESP+00000200: 00000004 f6debdd0 00000000 00000000
[09:52:48] [debug] ESP+00000220: 0000001c f6debdf0 0000000e 00000000
[09:52:48] [debug] ESP+00000240: 00000003 f6debe10 00000000 00000000
[09:52:48] [debug] ESP+00000260: 0000000b f6debe30 00000000 00000902
[09:52:49] [debug] ESP+00000280: 0000000e 00000000 00000000 00000000
[09:52:49] [debug] ESP+000002a0: f6dec398 f6debd20 00000002 00000049
[09:52:49] [debug] ESP+000002c0: f742f200 f74309a8 f7432dda f7629c97
[09:52:49] [debug] ESP+000002e0: 0807b8f6 0807c6fa 0809734d 0807cef6
[09:52:49] [debug] ESP+00000300: 00000000 00000000 00000000 00000000
[09:52:49] [debug] ESP+00000320: 00000000 00000000 00000000 00000000
[09:52:49] [debug] ESP+00000340: 00000000 00000000 00000000 f757ba34
[09:52:49] [debug] ESP+00000360: 00000000 f73f9b8d f7433118 f757d000
[09:52:49] [debug] ESP+00000380: f7538419 00000000 00000000 00000000
[09:52:49] [debug] ESP+000003a0: 00000000 00000000 00000000 00000000
[09:52:50] [debug] ESP+000003c0: 20202020 20202020 2f202020 2f727375
[09:52:50] [debug] ESP+000003e0: 65343866 2d303030 36386666 30303066
[09:52:50] [debug] Loaded modules:
[09:52:50] [debug] 00000000 - 00194f0b samp03svr
[09:52:50] [debug] f76f6000 - f76f6530
[09:52:50] [debug] f76e6000 - f76e8674 /lib/libdl.so.2
[09:52:50] [debug] f76cb000 - f76e4ad3 /lib/libpthread.so.0
[09:52:50] [debug] f75df000 - f76d0e88 /lib/libstdc++.so.6
[09:52:50] [debug] f759d000 - f75de1f0 /lib/libm.so.6
[09:52:50] [debug] f7581000 - f759a6f8 /lib/libgcc_s.so.1
[09:52:50] [debug] f73b6000 - f7588803 /lib/libc.so.6
[09:52:50] [debug] f76f5000 - f77180f0 /lib/ld-linux.so.2
[09:52:51] [debug] f73a2000 - f73b19b4 plugins/sscanf.so
[09:52:51] [debug] f6ffe000 - f73a6ac7 plugins/mysql_static.so
[09:52:51] [debug] f6fed000 - f6ff3d90 /lib/librt.so.1
[09:52:51] [debug] f65da000 - f65eb730 /lib/libnss_files.so.2
[09:52:51] [debug] f65d0000 - f65d87c4 plugins/Whirlpool.so
[09:52:51] [debug] f658b000 - f65cf3ac plugins/crashdetect.so
[09:52:51] [debug] f613b000 - f6200740 plugins/streamer.so
[09:52:51] [debug] f76ee000 - f76eff70 plugins/nativechecker.so
[09:52:51] [debug] f6522000 - f6526d1c /lib/libnss_dns.so.2
[09:52:51] [debug] f6509000 - f6520e54 /lib/libresolv.so.2


What the hell does it mean ?

[FilterScript] Dial SpeedoMeter

$
0
0

Dial SpeedoMeter


Realistic SpeedoMeter with dial and needle.


Pic:





Video: Click here

Github: Click here

Download: Click here


requires:

a_samp, foreach


Bugs:

Please report if you find any.


Credits:

SA-MP team - a_samp
****** - foreach
Lokii - dial speedometer

command to kill all players

$
0
0
hi how to make rcon admin command to kill all online players and say in chat admin alvin has killed all players

thanks.

[Ajuda] Selecionar skin por número

$
0
0
Queria um comando com ZCMD para selecionar a skin por número, mais ou menos assim:

/skin 30

ANTI NO SPREAD

$
0
0
Long time ago i got this code to block this hack:
https://www.youtube.com/watch?v=BEK9cLkUr_8

But it sometimes detect, sometimes don't, sometimes detect innocents
detect part is this: if(Detect_SpreadCheck(playerid)) { Punish_NoSpread(playerid); }

Is anyone could help me to fix it?


pawn Code:
#define MAX_SHOTS_NOSPREADCHECKER 3
enum shotsinfo {
    NSlastshot,
    NSlastweapon,
    Float:NSx,
    Float:NSy,
    Float:NSz
}
new PlayerShotsPos[MAX_PLAYERS][MAX_SHOTS_NOSPREADCHECKER][shotsinfo];


pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) {
    new shotid = GetAvaliableSlot_SpreadCheck(playerid);
    if(shotid == 65535) {
        Reset_SpreadCheck(playerid);
        shotid = 0;
    }
    if(TrocouArma_SpreadCheck(playerid, weaponid)) {
        Reset_SpreadCheck(playerid);
    }
    else {
        PlayerShotsPos[playerid][shotid][NSlastweapon] = weaponid;
        PlayerShotsPos[playerid][shotid][NSx] = fX;
        PlayerShotsPos[playerid][shotid][NSy] = fY;
        PlayerShotsPos[playerid][shotid][NSz] = fZ;
        if(GetAvaliableSlot_SpreadCheck(playerid) == 65535) {
            if(Detect_SpreadCheck(playerid)) { Punish_NoSpread(playerid); }
        }
    }
}


pawn Code:
stock Detect_SpreadCheck(playerid) {
    new Float:spreadLimit = 0.05000;
    if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK) { spreadLimit = spreadLimit / 2; }
    new Float:ONEtTWO = GetDistanceBetweenPoints(PlayerShotsPos[playerid][0][NSx], PlayerShotsPos[playerid][0][NSy], PlayerShotsPos[playerid][0][NSz], PlayerShotsPos[playerid][1][NSx], PlayerShotsPos[playerid][1][NSy], PlayerShotsPos[playerid][1][NSz]);
    new Float:ONEtTHREE = GetDistanceBetweenPoints(PlayerShotsPos[playerid][0][NSx], PlayerShotsPos[playerid][0][NSy], PlayerShotsPos[playerid][0][NSz], PlayerShotsPos[playerid][2][NSx], PlayerShotsPos[playerid][2][NSy], PlayerShotsPos[playerid][2][NSz]);
    // print
    new string[128];
    format(string,sizeof(string), "[ANTI-NO-SPREAD] ONEtTWO[%f] ONEtTHREE[%f] spreadLimit[%f]", ONEtTWO, ONEtTHREE, spreadLimit);
    SendClientMessage(playerid,-1,string);
    //
    Reset_SpreadCheck(playerid);
    if(GetPositiveNumber(ONEtTWO) <= spreadLimit && ONEtTHREE <= GetPositiveNumber(spreadLimit)) return 1;
    return 0;
}

Invalid Function, Mismatch

$
0
0
This was pulled from a gamemode released here. Someone suggested to return 1; and comment out line 55, but that just throws a bunch of warnings of unused variables, and I felt like it was stopping something needed.

Code:

stock SetPlayerChatBubbleEx(playerid, color, Float:drawdistance, expiretime, const format[], va_args<>)
{
55        return SetPlayerChatBubble(playerid, va_return(format, va_start<5>), color, drawdistance, expiretime);
}
stock UpdateDynamic3DTextLabelTextEx(STREAMER_TAG_3D_TEXT_LABEL id, color, const format[], va_args<>)
{
        return UpdateDynamic3DTextLabelText(id, color, va_return(format, va_start<3>));
}

stock ShowPlayerDialogEx(playerid, dialogid, style, caption[], button1[], button2[], const format[], va_args<>)
{
    return ShowPlayerDialog(playerid, dialogid, style, caption, va_return(format, va_start<7>), button1, button2);
}

Code:

poker.pwn(55) : error 012: invalid function call, not a valid address
poker.pwn(55) : error 035: argument type mismatch (argument 4)
poker.pwn(55) : error 029: invalid expression, assumed zero
poker.pwn(55) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Viewing all 18226 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>