SA-MP Forums Archive
SetDisabledWeapons - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetDisabledWeapons (/showthread.php?tid=173686)



SetDisabledWeapons - Face9000 - 03.09.2010

I all,i use SFTDM V.4.6.1 and with:

SetDisabledWeapons(44,45,38,35,36);//44=nightvision, 45=thermal, 38=minigun, 35-36=rocket

If i try to complie,it gives me an error :S

But the GM works succesfully :S...how i can resolve this?

If i remove the code,when i enter in the server,i cant see cars and players..

please help


Re: SetDisabledWeapons - dax123 - 03.09.2010

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
I all,i use SFTDM V.4.6.1 and with:

SetDisabledWeapons(44,45,38,35,36);//44=nightvision, 45=thermal, 38=minigun, 35-36=rocket

If i try to complie,it gives me an error :S

But the GM works succesfully :S...how i can resolve this?

If i remove the code,when i enter in the server,i cant see cars and players..

please help
SetDisabledWeapons() is deprecated and you should use the alternatives in OnPlayerUpdate(), as SA-MP server says.
it is removed since 0.3


Re: SetDisabledWeapons - [UG]Scripter - 03.09.2010

SetPlayerDiasabledWeapons was removed in 0.2X

Use the SetPlayerInterior function to solve that.


Re: SetDisabledWeapons - Face9000 - 03.09.2010

Done with SetPlayerInterior but..

Код:
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.


And with OnPlayerUpdate

Код:
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : error 004: function "OnPlayerUpdate" is not implemented
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: SetDisabledWeapons - dax123 - 03.09.2010

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Done with SetPlayerInterior but..

Код:
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.


And with OnPlayerUpdate

Код:
C:\Documents and Settings\Utente\Desktop\sftdm4.6.1.pwn(259) : error 004: function "OnPlayerUpdate" is not implemented
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
OnPlayerUpdate() is not a function, it's a callback, and you should find it in a_samp.inc
and it's not just an alternatives of SetDisabledWeapons(), as OnPlayerUpdate() is called when a player sends a packet to the server,
you need to revise your script to keep that feature alive. thanks.


Re: SetDisabledWeapons - Face9000 - 03.09.2010

So?What i need to do?


Re: SetDisabledWeapons - [XST]O_x - 03.09.2010

I'm not deeply sure,but try this code I made earlier today:
http://pastebin.ca/1931802


pawn Код:
SetDisabledWeapons2(yourweapons);