![]() |
Script For Forty-5
I can't figure out this script
//#CLIENTSIDE if (created) { // Initialize the attributes showcharacter; setcharprop #3,blue-head658.png; setcharprop #C0,white; setcharprop #C1,darkblue; setcharprop #C2,darkblue; setcharprop #C3,darkblue; setcharprop #C4,darkblue; setcharprop #2,no-shield.gif; shieldpower = 1; dir = 2; message I like to get hit witch rocks and bushes and stuff so please do so!; npcs[index].rupees ==100000l } if (waspelt) { players[index].rupees +=1; npcs[index].rupees -=1; } //added the npcs[index] in hope that it would show where the rupees came from but that did'nt work...On my server i will throw a bush at him and then it will show the rupee for half a second then it will dissapear...Please help |
Index is not a default variable. You don't need it. playerrupees will work for the player, and setting a this.rupees string for the NPC and modifying it will work for the NPC.
|
:( i just started scripting...I don't really get what you mean..sorry
|
Instead of players[index].rupees, use playerrupees. Instead of npcs[index].rupees use this.rupees. That's what he said.
|
dag...
Its still not working..
//#CLIENTSIDE if (created) { // Initialize the attributes showcharacter; setcharprop #3,blue-head658.png; setcharprop #C0,white; setcharprop #C1,darkblue; setcharprop #C2,darkblue; setcharprop #C3,darkblue; setcharprop #C4,darkblue; setcharprop #2,no-shield.gif; shieldpower = 1; dir = 2; message I like to get hit witch rocks and bushes and stuff so please do so!; this.rupees ==100000 } if (waspelt) { playerrupees +=1; this.rupees -=1; } i changed the script to this....but it still does the same thing..Adds for a second then takes it away again.. |
this.rupees is a meaningless variable. You can't change player or NPC rupees on the clientside.
|
so...
so how can i do this then? *bows down* please help me
|
Well, you can offline, however. The "==" is only used in checks. Use a single "=" when setting a variable.
|
k thanks
|
Server Options?
Could it not be working because of a server option that i have or don't have? I just got this server up yesterday...and this is the first time i've ever been in charge like this...is there anyway that the server options could be a problem?
|
It is not working because you cannot alter those variables on the clientside!
|
You need to triggeraction.
|
| All times are GMT +2. The time now is 02:37 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.