what do PlayerBadWeapons do ? how i use it ?
#1

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
Reply
#2

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);
}
Reply
#3

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 )
Reply
#4

No problem, again :P BTW I missed a semicolon in that script, so if you tried to compile and it errored that's why
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)