what do PlayerBadWeapons do ? how i use it ? - 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: what do PlayerBadWeapons do ? how i use it ? (
/showthread.php?tid=79015)
what do PlayerBadWeapons do ? how i use it ? -
Divine - 24.05.2009
What does it do ?
How I use it ?
....
can i use it like
Код:
setplayerbadweapons(id, id, id, id, id);
onplayerupdate --
getplayerdata
if(weapons id == badweapons) ??
kick(him) ....???
It looks so useful
But Im soooo cunfused
:S :S :S
Re: what do PlayerBadWeapons do ? how i use it ? -
Weirdosport - 24.05.2009
It looks like a custom function to me, there's a similar one available that's built in:
https://sampwiki.blast.hk/wiki/SetDisabledWeapons
That means that if somebody spawns a minigun it wont hurt anybody and everybody else will see him using fists.
For the script you mention, you may aswell use:
pawn Код:
//Top of script
BadWeapons[] = {id, id, id};
//OnPlayerUpdate
for(new i=o; i<sizeof(BadWeapons); i++)
{
if(GetPlayerWeapon(playerid) == BadWeapons[i]) Kick(playerid);
}
Re: what do PlayerBadWeapons do ? how i use it ? -
Divine - 24.05.2009
Quote:
Originally Posted by Weirdosport
It looks like a custom function to me, there's a similar one available that's built in:
https://sampwiki.blast.hk/wiki/SetDisabledWeapons
That means that if somebody spawns a minigun it wont hurt anybody and everybody else will see him using fists.
For the script you mention, you may aswell use:
pawn Код:
//Top of script BadWeapons[] = {id, id, id}
//OnPlayerUpdate for(new i=o; i<sizeof(BadWeapons); i++) { if(GetPlayerWeapon(playerid) == BadWeapons[i]) Kick(playerid); }
|
thnx again
)
Re: what do PlayerBadWeapons do ? how i use it ? -
Weirdosport - 24.05.2009
No problem, again :P BTW I missed a semicolon in that script, so if you tried to compile and it errored that's why
Re: what do PlayerBadWeapons do ? how i use it ? -
Divine - 25.05.2009
Quote:
Originally Posted by Weirdosport
No problem, again :P BTW I missed a semicolon in that script, so if you tried to compile and it errored that's why
|
dont worry I fixed it :P ... thnx