Blockland Forums > Modification Help
If Image is unmounted/mounted Still need halp
<< < (2/4) > >>
Nexus:

--- Quote from: swollow on September 21, 2011, 11:15:26 PM ---K I'm trying to use
Function servercmdunusetool(%obj)
but I have no idea what the variables are for it

--- End quote ---

It is a servercmd...
The variable is %client
Swollow:

--- Quote from: Nexus on September 21, 2011, 11:48:57 PM ---It is a servercmd...
The variable is %client

--- End quote ---
<eye twitch> Sorry I'm not thinking clearly right now :|
Greek2me:

--- Quote from: swollow on September 21, 2011, 11:29:36 PM ---I'm not thinking clearly right now can someone show me how to do this:
Whenever a specific image is mounted it changes datablocks
Whenever a specific image is unmounted it changes datablocks

--- End quote ---
Don't use serverCmds. Package mountImage and unMountImage and check if the image is the one you want.
Swollow:

--- Quote from: Greek2me on September 22, 2011, 12:05:45 AM ---Don't use serverCmds. Package mountImage and unMountImage and check if the image is the one you want.

--- End quote ---
I'm so loving confused
Am I supposed to do this:
function ImageName::OnunmountImage(%this,%obj,%slot)
or
function Player::OnunmountImage(%this,%obj,%slot)
or
function Player::unmountImage(%this,%obj,%slot)

I don't know these functions :|
Greek2me:
This is what I use for Slayer CTF:


--- Code: (ctf.cs) ---package Slayer_Gamemode_CTF
{
function Player::mountImage(%this,%image,%slot,%a,%b)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage) && %curImage.className $= "SlyrCTF_FlagImage")
return;

parent::mountImage(%this,%image,%slot,%a,%b);
}

function Player::unMountImage(%this,%slot,%bypass)
{
%curImage = %this.getMountedImage(%slot);
if(!%bypass && isObject(%curImage) && %curImage.className $= "SlyrCTF_FlagImage")
return;

parent::unMountImage(%this,%slot);
}
};
activatePackage(Slayer_Gamemode_CTF);
--- End code ---

You could change that up for what you need. And you can get rid of the %bypass variable in unMountImage btw.
Navigation
Message Index
Next page
Previous page

Go to full version