![]() |
Removing weapons on login?
How can I remove player weapons on login?
This is what I have, and it doesn't work: PHP Code:
|
Quote:
PHP Code:
'findplayer("account")' is a function which takes the specified account string parameter and returns the player object if it exists, it is not necessary within onActionPlayerOnline however as there is already the 'player' object to use. I would also imagine the parameter for removeweapon is case sensitive, which probably means you should have 'removeweapon("Bow");'. |
Quote:
PHP Code:
I've tried it in (even though they don't need to be) Class, NPC-Database, Level NPC, and Weapon (though weapon won't help) and it does not work. |
It specifically has to be the Control-NPC, which is listed among database NPCs.
Try: PHP Code:
|
Quote:
|
Quote:
|
Quote:
Classes Database-NPC Weapons I put it in "Classes" and "Database-NPC". Also, I see nothing named specifically "Control-NPC" |
Quote:
|
Still does not work.
Even in the correct area. I see it works for other items, I found. But not the bow...? |
public function onPlayerLogin(pl)
{ pl.removeweapon("weaponname"); } |
Might be a little easier to put them all in an array instead of using multiple removeweapon() functions. It doesn't really make a difference, but it looks nicer.
PHP Code:
|
Quote:
|
| All times are GMT +2. The time now is 01:18 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.