SafeGivePlayerWeapon -
tuuler - 07.11.2013
Hello, i need a SafeGivePlayerWeapon function. But i dont know how to make it.
I've searched for it, but still nothing.
Could any of you give me a link for it or write it here ?
Thank you !
Re: SafeGivePlayerWeapon -
Jochemd - 07.11.2013
What is it supposed to do?
Re: SafeGivePlayerWeapon -
tuuler - 07.11.2013
Quote:
Originally Posted by Jochemd
What is it supposed to do?
|
It is a anti-weapon cheat function
I've havent seen a good one, but im sure SafeGivePlayerWeapon function works perfectly.
Re: SafeGivePlayerWeapon -
Nourdin - 07.11.2013
Код:
SafeGivePlayerWeapon(playerid, 29, 99999);
Playerid, weaponid, ammo
Here you go!
Re: SafeGivePlayerWeapon -
tuuler - 07.11.2013
Quote:
Originally Posted by NourdinTRP
Код:
SafeGivePlayerWeapon(playerid, 29, 99999);
Playerid, weaponid, ammo
Here you go!
|
This wont help anything...
I need the full function of it !
Re: SafeGivePlayerWeapon - Patrick - 07.11.2013
This is nothing, but this is like a simple function.
pawn Код:
stock SafeGivePlayerWeapon(playerid, weaponid, ammo)
return GivePlayerWeapon(playerid, weaponid, ammo);
Re: SafeGivePlayerWeapon -
Konstantinos - 07.11.2013
I suppose it's about server-side weapons. ****** it, there's a tutorial about it.
Re: SafeGivePlayerWeapon -
Nourdin - 07.11.2013
Put this at the top of your pwn.
Код:
forward SafeGivePlayerWeapon(playerid, weaponid, ammo);
Maybe this works
![Smiley](images/smilies/smile.png)
And that function that pd2 stated.
+rep would be appreciated.
Re: SafeGivePlayerWeapon -
DanishHaq - 07.11.2013
Quote:
Originally Posted by NourdinTRP
Put this at the top of your pwn.
Код:
forward SafeGivePlayerWeapon(playerid, weaponid, ammo);
Maybe this works ![Smiley](images/smilies/smile.png)
And that function that pd2 stated.
+rep would be appreciated.
|
That won't help whatsoever, you can't forward a function and then use a stock for it. That's the whole point of the stock, so you won't have to create a full callback of it. And don't ask for rep when you don't even know what you're doing :P.
Re: SafeGivePlayerWeapon -
Konstantinos - 08.11.2013
Quote:
Originally Posted by DanishHaq
That won't help whatsoever, you can't forward a function and then use a stock for it. That's the whole point of the stock, so you won't have to create a full callback of it. And don't ask for rep when you don't even know what you're doing :P.
|
Actually you can forward a stock function that uses a
tag to get rid of the warning 208: function with tag result used before definition, forcing reparse.
And yes, it won't help in his case.