I’m working on a basic jail script and something just occurred to me. I’m using a string “client.jailTime” to keep track of how much “time” a player should remain in jail (in case they try unstick me or something, they can’t outrun a saved string var).
Now in my jail I have an npc with the following:
if (playerchats && strequals(#c,time left)) {
message you have #v(client.jailTime) time left;
}
Now let’s say there are two guys in jail, one (bob) has 5 time left, the other (frank) has 10. If bob says “time left” will both players see “5”, bob see 5 while frank sees 10, or bob sees 5 and frank sees nothing?
And would this behavior change if the name of the string was “server.jailTime”. I’m still not sure if prefixing strings with magic words like “client” and “server” are just conventions or if it really does change the behavior of anything.
if (created || playerenters){
timereverywhere;
}
if (playerchats && strequals(#c,time left)) {
message you have #v(client.jailTime) time left;
}
Should work. Also, no you do not want server variables as they apply to the whole entire server. That would mean, if the server variable server.jailtime wasn’t 0, everybody would be in jail. Hahaha.
[QUOTE=VariousWeapon;65506]I bet new server projects would be improved vastly if we simply packaged a jail and staff levels with the gserver.[/QUOTE]
The virtual concept of jail is retarded. Who is going to play a game were you spend all day in jail waiting on a time counter… if they break the rules, ban them for a week or so. If they repeatedly break the rules, ban them permanently. Problem solved.
I agree they’re pointless, but most idiots simply insist on having a jail and staff tools before making a single level. Essentially the exact same mentality as a dictator of a third world country.
[QUOTE=Beholder;65511]Anyone even notice the script says #v(client.jailTime) when he called it a string?[/QUOTE]
My bad. I typed it out from memory instead of copy/paste.
I’m mostly playing with the jail idea because it seems like a good exercise in scripting.
And actually it’s not based on a timer but on dragging a set number of stones from one side of the room to the other (to keep people from just leaving the computer for an hour).
Not even sure if the jail levels will make it into the final server. Mostly just playing around at this point.
returning to the main point of the original question:
does {client.SomeVariable} differ depending on who the “client” is? Does the server keep potentially numberOfPlayers amount of “client.varName” saved (one for each player)?
i think it would be fun to actually try and catch the cheaters instead of using warp/ban with rc. i remember in oldschool days when a gp was given a “net” npc that they could fire and trap cheating players.
[QUOTE=hosler;65609]
i think it would be fun to actually try and catch the cheaters instead of using warp/ban with rc. i remember in oldschool days when a gp was given a “net” npc that they could fire and trap cheating players.
[/QUOTE]
This was actually an idea that I had!
My hope is that in the end, the AP system will be used to keep track of repeat PKers, cheaters, etc… and then somewhere in my police station there will be like a top 10 most wanted list (or maybe top 3 given the average number of users) and it’s up to the players to catch 'em and collect the reward
But regardless of where/how “bad guys” get caught, something more than “you die” has got to happen for them to get back into “good guy” status (either moving rocks or making a donation or something).
Merged doublepost_______________
[QUOTE=urza;65612]
Yes
Potentially, yea, assuming the string has been set for every account.
[/QUOTE]
Thank you! Thank you! Thank you!
It’s refreshing to ask a yes or no question and get a “yes” instead of a “well, if you do it like this then when you do this…” ~I’m looking at you kondie
It’s refreshing to ask a yes or no question and get a “yes” instead of a “well, if you do it like this then when you do this…” ~I’m looking at you kondie
[/QUOTE]
I answered you pretty straight forward… I said to use the script I had. Then I said why you would not want server variables… God, nobody pays attention to anything anymore.
[QUOTE=Kondie;65688]
I answered you pretty straight forward… I said to use the script I had. Then I said why you would not want server variables… God, nobody pays attention to anything anymore.
[/QUOTE]
Maybe I’m just being a… comprehensible-communication nazi, but you just said it yourself
.
Had you read my post, you’d realize that an “answer” would be one of “both players see 5”, “bob sees 5 and frank sees 10”, “bob sees 5 and frank sees nothing”, OR “none of the above dumb-ass, ”.
Though, I don’t blame you. I guess the saturation of these hallowed boards with script kiddies has corrupted people into thinking that “here’s a script” is an “answer” to a question. I honestly am just trying to learn how the system works and not just “howz to make c00l w34p0n script”
</being_a_dick>