![]() |
toweapons/addweapon?
addweapon wont work for me at all, why why why?
toweapons works just fine with npc sever except when used clientside... But yeah, plah plah, how do I get addweapon to effing work?? x_x Oh and when I try to save classes RC says: "Script *scriptname* saved (no npc with this class on the server)." And wont display the file. Even tho there is an npc with that class on the server. Why oh why? Bah. Before I started my server I scripted everything I needed and then it turned out most of my stuff didnt work with npc server. Argh. So on a side note to that Im hiring a freaking scripter if anyone would care to help with a few simple (simple? maybe...) npcs. :\ |
addweapon = serverside.
toweapons = the devil. |
You have to have weapons in your weapons list(sword icon) to use addweapon (it adds a weapon to someones inventory).
toweapons should not be used if you have an npcserver. To get the class file, look in the folder scripts. |
If you want to use toweapons;(adds npc to NPC-Control) do this:
if (actionserverside) {if (playertouchsme) toweapons; } If you want to use addweapons;(adds NPC thats already in NPC-Control to player attributes) do this: //#CLIENTSIDE {if (playertouchsme) addweapon (weaponame) } |
Quote:
addweapon only works serverside, and don't use toweapons at all =/ |
Do not use toweapons. It is deprecated and causes problems with the NPC-Server.
Use NC to add the weapon to the weapons database, then use the serverside command: NPC Code:addweapon weaponname; LordVyse, a warning: Those who continually post bad advice in the scripting forum become masked from it. |
Right... So all I need to do Is ad the weapon script to the npcs before using addweapon.
I feel like getting rid of npc server, I dont seem to need it for all that much... |
Quote:
|
Because people still use it and Stefan does not want to break scripts.
|
Having a serveroption to disable it like mentioned in some other thread would be cool.
|
Quote:
|
I once suggested something like disablescriptcommands=toweapons,sendpm,...
|
About the class npc, you have to call the script (using the serverside command join) so it will show in the classes. If you have already called the script and it still does not show, so i have no clue.
|
Quote:
|
Classic still uses toweapons right? Since they have no NPC Server. N-Pulse did use it til we converted it all.
|
Quote:
|
addweapon never works for me. I have tried tons of things. i do exactly what u r supposed to
[/code] if (actionserverside) {addweapon wepname;} //#CLIENTSIDE if (playertouchsme) {triggeraction 0,0,serverside,} [\code] yet it never works. I dont know what I am going to do for my server. also for some reason offline it dont even recognize addweapon. It says its not a valid command. And usually offline it knows online commands...... |
Since your a beginner, just try addweapon weaponname; serversided. Make sure you have the weapon in your weaponslist. The command is not recoginized offline because the offline client does not recognize some (if not all) commands that require an NPC server.
|
falco21954368743698340,
Having triggeraction trigger to an x and y of 0 should only be used in WEAPONS. All serverside: if (playertouchsme) { addweapon wepname; } Clientside junk shouldn't be used if all your are doing is adding a weapon when the player touches it. The "Test" button on the offline editor hasn't been updated in ages. Most new commands it has never heard of. addweapon will not work offline, because there is no offline NPC-Server. |
thank you all for your help
|
hmm well if you wanted to make it easyer on you then that instead of putting it on a level you could just put this in the Control-NPC thing just add
NPC Code:if (!hasweapon(-narf narf)) addweapon -narf narf; |
Quote:
|
yeh this is for setlevel2 but for some reason i cant get it to work if not in a wepon?
things like if (actionserverside) {setlevel2 theplace.nw,2234,7980} //clientw/e if (weaponfired) {triggeraction 0,0,serverside,wepon} but something like if (actionserverside) {setlevel2 theotherplace.nw,3,-10} //#CLIENTSIDE if (w/e) {triggeraction 0,0,serverside,} wont work (i kno the x and y in both are not able to work) anyone know why? |
Use actual scripts instead of junk like "if (w/e)" and stuff and then I'll help.
|
OK
NPC Code: wont work NPC Code: will |
Quote:
Your triggeraction is missing the weapon name and the parameter. (if there is no parameter, just let it empty). Something similiar to: NPC Code: Make sure to replace WARPER by the name of the weapon; also you're missing the ; in the end of every execution line. |
i mean it doesnt work if its not a wepon, what do you do then?
|
Since it's not a weapon you are triggering the action to the x of 0 and y of 0, not the npc's x and y. Also, end EVERY command with a ;
|
Quote:
NPC Code: Is that what you're looking for? |
ok so for a command thats not a weapon itll look like:
NPC Code: |
Quote:
Note: You did not use ; in the end of the execution line again. :whatever: |
Quote:
Everyday I have people popping on my server asking for staff pos. When ever I aks them if they can script they, for some reason, say "yes". While I have come to notice they actually mean "No". I wonder if I get flamed or something if I try to hire someone from these forums? |
Welcome to Graal where a majority of the population act like stupid idiots, and will say they can do satuff that they really cant do just for power :)
|
Lol ok then i have a question, what flags will work serverside?
i know the following flags work: playertouchsme action-action- seems a bit lacking, what others work serverside without using a triggeraction?? |
Quote:
Quote:
|
Quote:
-Projectshifter |
Ok thaniks i thought that the list was very small since if i didnt put the //#CLIENTSIDE most scripts i made didnt work but thank you also one other thing, whats the command for if the person clicks with the left mouse? i thought it was if (leftmousebutton) but that never works
|
Quote:
NPC Code: Or even like this: NPC Code: You just forgot to use mousedown. I think you should start from basic stuff, it is not that hard but is not that easy too for beginners. ^^ |
Quote:
|
Quote:
-Projectshifter |
| All times are GMT +2. The time now is 09:37 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.