DDoor weapon rsremoval
#1

How do I remove players weapons when they enter a certain DDoor but give them back to them when the exit the DD?
Reply
#2

create a global varible on player entering a ddoor and then store their weapon in that variable once he is entered reset his weapon and when he is back give him weapon that you stored in the variable.
Reply
#3

by door did you mean Interior?
if so:
pawn Код:
public OnPlayerUpdate(playerid){
if(GetPlayerInterior(playerid) != 0) {
SetPlayerArmedWeapon(playerid,0);
}
return 1;
}
Reply
#4

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
by door did you mean Interior?
if so:
pawn Код:
public OnPlayerUpdate(playerid){
if(GetPlayerInterior(playerid) != 0) {
SetPlayerArmedWeapon(playerid,0);
}
return 1;
}

Ok if the interior id was 1 and the VW was 24 how would I set that up?
Reply
#5

Quote:
Originally Posted by Danyal
Посмотреть сообщение
create a global varible on player entering a ddoor and then store their weapon in that variable once he is entered reset his weapon and when he is back give him weapon that you stored in the variable.
Could you get me an example danya The door ID would be 1375
Reply
#6

Код:
public OnPlayerUpdate(playerid){
if(GetPlayerInterior(playerid) == 1 && GetPlayerVirtualWorld(playerid)==24) {
SetPlayerArmedWeapon(playerid,0);
}
return 1;
}
Reply
#7

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
Код:
public OnPlayerUpdate(playerid){
if(GetPlayerInterior(playerid) == 1 && GetPlayerVirtualWorld(playerid)==24) {
SetPlayerArmedWeapon(playerid,0);
}
return 1;
}
But when they exit, the guns the had will return to them?
Reply
#8

All that function does, is sets players armed ( weapon in hands ) to fists, so they have weapons all the time, but they can't switch to it.
Reply
#9

Ohh cool, Ill try it out right now. Thanks a lot man.
Reply
#10

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
All that function does, is sets players armed ( weapon in hands ) to fists, so they have weapons all the time, but they can't switch to it.
Ok so.....

I can compile my script fine with 0 errors or warnings.

When I add that code I get like 26 errors and it doesnt compile at all.

None of the errors are about this code though, it gives me errors about other things but when I take it out it compiles fine again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)