Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command (
/showthread.php?tid=612284)
Command -
GoldenLion - 16.07.2016
Hi, I just made /givekeys command, but when I try it in-game it says unknown command. I can't find the problem, the code seems to be good.
Code (updated fixed one):
Код:
removed, i don't want to release the code :P
Re: Command -
Stinged - 16.07.2016
Install crashdetect and post what it prints out in the console.
Also, the command isn't written correctly.
You're never setting targetid to something, which means it'll always be id 0.
Re: Command -
GoldenLion - 16.07.2016
Okay, yes I fixed the targetid thing.
This is what crashdetect prints:
Код:
[07:30:26] [debug] AMX backtrace:
[07:30:26] [debug] #0 0005cbd0 in ?? (0, -1) from LSLRP.amx
[07:30:26] [debug] #1 0017b958 in public cmd_givekeys (0, 7269420) from LSLRP.amx
[07:30:26] [debug] #2 native CallLocalFunction () from samp03svr
[07:30:26] [debug] #3 00017ca8 in public OnPlayerCommandText (0, 7269380) from LSLRP.amx
Re: Command -
Konstantinos - 16.07.2016
Crashdetect has reported more, hasn't it? The mistake is in Car_IsOwner function and Car_GetID returns -1.
To make it easier, debug info:
https://github.com/Zeex/samp-plugin-...ith-debug-info
Re: Command -
GoldenLion - 16.07.2016
Thank you, solved.