View Single Post
  #7  
Old 08-18-2009, 10:13 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Schetti View Post
I've made a simple CTF-game times ago, and to show the flag by the player, I used a weapon I added to the player.
You could do the same and add a weapon to the players.
The script could be like:
PHP Code:
function onGlow() {
if ( 
this.glowmod ) {
setImg("light.png");
setcoloreffect(0.4,0.4,0.4,0.5);
this.player.x;
this.player.y;
this.level player.level;
onGlow;
 }
}
//you need to try if it works with client or serverside


//#CLIENTSIDE

function onPlayerChats() {
if (
player.chat == "setglow") {
this.glowmode = !this.glowmode
onGlow
;
 }

Well, as I said, I didnt script for a while so this script will have some fails in it, but its a beginn.
There are quite a few things wrong with that, I recommend that anyone reading this not look at that code for pointers.

You should do something like this:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
onTimeOut();
}

function 
onTimeOut() {
  
hideimgs(200400); // lazy :[
  
  
for (temp.pl players) {
    
showimg(200 pl.id"light2.png"pl.1.5pl.1.5);
    
changeimgvis(200 pl.id0);
    
changeimgcolors(200 pl.id100.7);
  }
  
  
setTimer(0.05);

You can play around with the positions, and add a player.attr for the glow colors.
__________________
Reply With Quote