Thread: Item Spawn
View Single Post
  #5  
Old 09-05-2011, 06:07 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
When you touch it, it destroys on your screen, but not on other players. X_X

Class
PHP Code:
function onCreated() {
  
setimg("block.png");
  
this.chat text;
  
setshape(1,32,32);
}
//#CLIENTSIDE
function onPlayerTouchsMe() {
  
addweapon(this.chat);
  
destroy();

Weapon
PHP Code:
function onActionServerSide() {
  if (
params[0] == "spawn") {
    
temp.npc putnpc2(params[1],params[2], "join(\"emera_spawn\");");
    
text params[3];
  }
}
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat.starts("/spawn ")) {
    
triggerserver("gui",this.name,"spawn",mousex,mousey,player.chat.substring(7));
  }

__________________
Reply With Quote