![]() |
String question...
ok im trying to make a sign that displays the server string, like says the score in the event.. and i can't figure out what im doing wrong.. heres the script:
NPC Code:message #s(server.ppb); i mean it does show it.. but when i change the server.ppb, it doesnt update itself... like i made the script where you go /setscore # , and that works.. it changes the string in the server flag, but when you do that the NPC Code:doesnt update itself.. it stays what the old one was, and you have to update the level.. i know a script where u have to do if playerchats blah blah blah and then message #s(server.ppb);, but i dont want people to have to say that, i just want them to be able to see it.. kind of like the score on UN's CTFmessage #s(server.ppb); |
User serverr.string and change it serverside.
|
umm thats what im using
NPC Code:message #s(server.ppb); server.pbb or server.string |
serverr.string
the double r is NOT a typo. it means it is readable clientside, and read-writable serverside. |
God. Serverr strings are annoying and a waste of space.
Avoid using them when possible, theirs other ways to do things. |
They are probably the fastest option for having a persistant global string.
|
hmm i did both
NPC Code://#SERVERSIDE and NPC Code:but neither of them would show anything.. am i missing some part of the script here?message #s(serverr.ppb); |
Are you saying the count isn't being updated after it's modified via RC or another script? You need to have it in a timeout for it to update itself.
|
Quote:
|
You can use a serverr.string and display the message in a timeout loop
example: NPC Code: |
I LOVE YOU GUYS!!! Thanks for all the help! I figured out what i was doing wrong! :D Thanks again!
|
Strings rock :P
I like them to boot people off servers: NPC Code: Smeh it's been some time.. |
There is no such thing as //#SERVERSIDE.
Scripts are like this /* Serverside script here */ //#CLIENTSIDE /* Clientside script here */ Capish? Quote:
Please shut up about things you have no clue about. |
ok, i get that part, but in graalscript, is there any way to add to server strings? like
#s(server.string)+=1.. that doesnt work or server.string+=1.. that doesnt work either lol.. or even setstring server.string+=1. or something like that? i should really learn more graalscript... :o |
Yes you should.
setstring string,#v(strtofloat(#s(string))+1); |
Quote:
|
::Loves Robin::
Thanks man! I seriously gotta stop scripting BASIC on my TI and learn graalscript more XD... now to figure out putnpc... |
Putnpc isn't bad... It's like a regular statement..
|
what can you use to check server strings? like i want it to be
if (server.string = server.string2){<command>} but that doesnt work, cause even if they dont equal it still does the <command>.. ive tried many different ways and i still cant get it.... oh and Quote:
|
Quote:
do something here; } (I think ^^)!... Well for the other part post the script so I know what your doing.. |
aight i know what im doing.. u have to upload the scrit.txt into the scripts folders im guessing for putnpc... am i right?
|
yep:}
Edit by Loriel: Hell no. |
wan, please dont help.
To check two strings for equality you can do if (strequals(#s(string),#s(string2)) { } |
ok wan check what i did wrong..
first i tried this: NPC Code: and the txt file was the same.... then I tried NPC Code: and then i tried it with actionclientside.. i dont know why im using triggeraction, just thought it might work.. so can u help me out? |
I don't want to mess up again, best r0bin help you out :p
|
ok, if u can just warp the npc i wouldnt need putnpc.. so is there any way to like warp the npc? like setlevel or something?
|
putnpc is disgusting
|
yep i know.. but is there any other way to put an npc somewhere? like im working an an event... and its kinda like football... where u carry the ball and throw it into the goal area... well after u throw it in.. how can it warp back to the place? like UN's CTF... if u die with the flag or score, it goes back to where it was in the beginning.. thats what im trying to do.. :(
|
putnpc has been deprecated for long, and not ever been supported on the NPC Server.
Use putnpc2 x, y, { script }; |
that wouldnt work because the script is
NPC Code: and if i would put in putnpc2.. the script would have to keep going on and on and on.... maybe it could be triggeractioned.. but im not sure how do that... and maybe that wont work either... |
if(actionserverside){
playerkills+=100; } //#CLIENTSIDE if(weaponfired){ putnpc2 x, y, { if(hasweapon(soandso)){ //do stuff like triggeraction 0,0,serverside,weaponname; }; } That's off my head, I gues it's wrong.. :p |
ok heres the script again:
NPC Code: so under the if wasthrown, after the destroy, i would put putnpc2, it wouldnt work because of this NPC Code: I pointed out with an arrow what the problem is.. so my question is that is there any other way to make this work? |
STOP.
Stop even attempting to script, stop asking questions as you get further in the script, stop doing whatever the hell you're doing. Actually make an effort to learn by using your OWN mind instead of asking a countless ammount of questions. Read documents as you obviously haven't done. putnpc2 is serverside only you fool |
Do not stop trying to script, but stick to things that will help you more learn more. Things that you can do with little help, things that will not just get something done but make it obvious to you how scripting works :|
|
You globalls don't really act like them, he's new give him credit. God you both was like it at one point calm down:\
|
Nope.
I used to suck at scriping of course, and relatively still do, but I do not ask about things I have no clue of but rather try to work with things I can do, and learn that way. |
OK!!! THANK YOU PYTHON!!!
Quote:
|
Quote:
|
thanks kristi, but no.. he made me realise a lot of stuff, and i take that as help not an insult...
|
Quote:
|
| All times are GMT +2. The time now is 05:11 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.