PDA

View Full Version : kicking?


Knightmare1
11-11-2007, 12:32 AM
ive tried a bunch of times, and failed, but is there even a way to CLICK on a player to kick them? like if im saying, ":kick" and click?

Twinny
11-11-2007, 01:12 AM
Yes


function onMouseDown(mode)
{
if (player.chat == ":kick")
{
if (mode == "left")
{
for (pl : players)
{
if (mousex in |pl.x, pl.x+1.5|)
{
if (mousey in |pl.y, pl.y+2|)
{
triggerserver("gui", this.name, "kickthatfool", pl.account);
break;
}
}
}
}
}
}


Change the 1.5 and 2 to whatever range you want to have.

Rapidwolve24
11-11-2007, 01:12 AM
It has to be scripted.


function onPlayerChats()
{
if (player.chat.starts(":kick"))
{
temp.kickplayer = findPlayer(player.chat.substring(5).trim());

if (temp.kickplayer.level == player.level)
{
temp.kickplayer.setlevel2(level, x, y);
}
}
}


For ":kick account"

Twinny
11-11-2007, 01:33 AM
For ":kick account"

even a way to CLICK on a player to kick them?

:rolleyes:

Knightmare1
11-11-2007, 05:27 AM
would this work?

function onActionServerSide() {
if (params[0] == "StaffTag1") {
setLevel2("utopiaow_e4.nw", 35.5, 26);
}


//#CLIENTSIDE
function onMouseDown(mode)
{
if (player.chat == ":kick")
{
if (mode == "left")
{
for (pl : players)
{
if (mousex in |pl.x, pl.x+1.5|)
{
if (mousey in |pl.y, pl.y+2|)
{
triggerserver("gui", this.name, "kicked", pl.account);
break;
}
}
}
}
}
}

napo_p2p
11-11-2007, 05:32 AM
would this work?

Close, just that you would need to change the actionserverside...
function onActionServerSide() {
if (params[0] == "kicked") {
findplayer(params[1]).setlevel2("utopiaow_e4.nw", 35.5, 26);
}
}

Knightmare1
11-11-2007, 10:43 PM
ty i used the params for my stafftag