View Single Post
  #2  
Old 07-26-2012, 12:02 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
If it's a weapon, than you can use this for your light:
PHP Code:
function onCreated() {
  
findPlayer("yourAccountHere").addWeapon(name); //add the weapon to yourself
}
//#CLIENTSIDE
function onCreated() {
  
this.usingLight false//set the flag to false; not required but I gues its better
  
this.image "crystalflash.png"//I think it will change the inventorys icon, not sure
  
onTimeOut(); //would use it with a onWeaonFired() toggle in a weapon if it shouldnt stay there all the time; made an example below
}
/*
function onWeaponFired() {
  this.usingLight = !this.usingLight; //toggles the flag (true/false)
  if (this.usingLight) onTimeOut(); //if true -> use the timeOut() function
  else { //else stop the timer and hide the image
    setTimer(0);
    hideImg(200);
  }
}
*/
function onTimeOut() {
  
with (findImg(200)) {
    
image "crystalflash.png";
    
mouseScreenX-0.5;
    
mouseScreenY-0.5;
    
alpha 0.75;
  }
  
setTimer(0.05);

And this for your bomb:
PHP Code:
function onCreated() {
  
findPlayer("yourAccountHere").addWeapon(name); //add the weapon to yourself
}
//#CLIENTSIDE
function onCreated() {
  
this.usingBomb false//set the flag to false; not required but I gues its better
  
onTimeOut(); //would use it with a onWeaonFired() toggle in a weapon if it shouldnt stay there all the time; made an example below
}
/*
function onWeaponFired() {
  this.usingBomb = !this.usingBomb; //toggles the flag (true/false)
  if (this.usingBomb) onTimeOut(); //if true -> use the timeOut() function
  else setTimer(0); //else stop the timer and hide the image
}
*/
function onTimeOut() {
  
putexplosion2(41mousex-1mousey-1); 
  
setTimer(0.05);

__________________
MEEP!
Reply With Quote