a Help? - 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: a Help? (
/showthread.php?tid=632375)
a Help? -
RathTheBeast - 13.04.2017
SOrry For trouble
I wanna use
THIS Gamemode.
BUt when I edit it Its Shows An Error:
Код:
D:\Stunt Universe\gamemodes\SU.pwn(213) : error 017: undefined symbol "SetDisabledWeapons"
A added all the includes(in the rar file) in my pawno/include folder
Help!
Re: a Help? -
Mencent - 13.04.2017
Hello!
https://sampwiki.blast.hk/wiki/SetDisabledWeapons
Read this link.
Re: a Help? -
Celmir - 13.04.2017
That function has been disabled. You cannot use it.
Re: a Help? -
RathTheBeast - 14.04.2017
So what now?
Re: a Help? -
LEOTorres - 14.04.2017
Quote:
Originally Posted by RathTheBeast
So what now?
|
Well, as stated by the wiki; you can detect weapons upon the OnPlayerUpdate callback instead and disable them through there.
So, the first thing you would need to do, is remove all instances of the depreciated function you are using, and instead use something of this nature:
Код:
public OnPlayerUpdate (playerid)
{
new weapon = GetPlayerWeapon (playerid);
if (weapon == 38 || weapon == 35) //disables minigun and RPG
{
SetPlayerArmedWeapon(playerid, 0);
}
return 1;
}
To get a list of weapon ID's, check out:
https://sampwiki.blast.hk/wiki/Weapons