Thread: Adding weapons
View Single Post
  #11  
Old 08-16-2005, 02:15 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
addweapon does not work clientside.

NPC Code:

// npc called "-weaponadder"

if (actionserverside) {
if (strequals(#p(0),addw)) {
with(getplayer(#p(1))) addweapon #p(2);
}
}

//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,-weaponadder,addw,#a,NPC/Thinger;
}



that npc, when fired, adds the weapon NPC/Thinger to the player.


a level npc (shop or suchlike) could also use that trigger, granted the player has a weapon on them like that one that accepts the addw trigger
__________________
Reply With Quote