Here’s the current script although I’m experiencing one problem with it and that is…
The player can see his own level appear over his head but other people don’t see it.
Help please?
CODE:
//#CLIENTSIDE
if (playerenters){
player.level=player.level;
timereverywhere;
timeout = 0.05;
}
if (timeout) {
x=playerx+1.5;
y=playery-1;
message Level: #v(player.level);
timeout=0.05;
}
I know this is quite old, but for future reference if anyone is looking at this…
server string would definitely not work for this, he wants to use setstring (setting a server variable will have everyone on the server sharing the same level lol)
[CODE]
// NPC made by Uncle Remus
if (created) {
}
if (playerenters &&! isweapon){
toweapons LevelControl;
setstring player.level,1;
}
if (weaponfired){
if (this.active=1){
this.active=0;
} else {
this.active=1;
}
timeout = 0.05;
}
this will set a variable in your flags holding your current level and firing the weapon toggles displaying your level under your character or hiding it (local only, if you want it public would need to use a lower image number but leave it local!!!)
This is one way to do it, but I wouldn’t recommend for the reason of lag where you to use a global showtext. Instead the method I prefer to use is hijack one of the player’s attributes (eg. #P5) and use it as an array to store information I want to share with other people.
Then I render all the showtext stuff via something like this:
for (this.pl = 0; this.pl < playerscount; this.pl++)
showtext 300+this.pl,players[this.pl].x+1.5,players[this.pl].y-1,arial,c,Level:#P5(this.pl);