![]() |
About weapons...(stefan please respond)
Ok well I am trying to make a way were hte system weapon will update for everyone when I update the system weapon...
I have tried this in the npc server... join system the in system I have something like //#CLIENTSIDE if(playerenters&&isweapon&&!hasweapon(-system)){ toweapons -system } //Rest of system coding... when I do this it gives me a message like illegal data or something like that and disconnects me on rc it says Frolic_Admin2 has added weapon (Hacker?) so then on rc I have to /open Frolic_Admin2 then I have to warp my self befor I can get back on what can I do to make it work for the system weapon |
so..
so I should do something like
if(playerenters&&isweapon&&!hasweapon(-system)){ toweapons -system } //#CLIENTSIDE //Rest of system coding... I am going to test it out later on tonight... If I get any more problems I will post them |
NO! Nothing that goes toweapons should have //#CLIENTSIDE anywhere in the script. When an NPC goes toweapons it takes on a special form of clientside-ness.
|
Yes weapons are special
When the toweapons thing is called then the whole npc script is taken as weapon script and copied to database + sent to the player. You can have //#CLIENSIDE stuff for the npc, but it will not appear in the weapon. Don't call 'toweapons' on client-side, that will be recognized as cheating and you will be disconnected. |
addweapon is just adding the name of the weapon
to the weapon list of the player, so it doesn't change weapons, and only works when the weapon already exists |
Weapons are automatically updated whenever a player reconnects. I think that's as easy as it gets...
|
I thought you couldnt use join when your dealing with weapons...
|
get out the advil
You guys r giving me a head ache w/ all this script stuff! 0.o
|
Re: get out the advil
Quote:
|
The Database should be more accesible to all servers.
it would help a great deal I believe. I never heard of addweapon until recently. it prabably should be the only command used. I mean why not just make adding weapons to the database something staff do. rather than adding it every time anyone gets any weapon with toweapons. once is enough.. sheesh.... /added uh... oops Im Rogue Shadow thnx past for letting me use this. =) |
wow this post is really old... Back when I was first learning how to script with the npc server...
humm and you brought it back :-\ lol.. |
Quote:
lol yeah I never look at dates I just ran a search. I never scripted for p2p so It's new to me lol. It's lousy that only guys with p2p worlds accepted can even hope to learn to script for p2p. Without a way to script it and test it offline you just can't do it. just like you can't script for online if you only have offline. I gotta get my own upgraded account soon lol signed, Rogue Shadow |
Actually weapons arnt updated each time a player logs on
When someone changes it on NPC Server Control its automaticaly updated to every play carrying it, there is no need to relog on to get the new weapon :-P Great for testing weapons online quickly |
heh
|
All times are GMT +2. The time now is 10:43 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.