Blockland Forums > Modification Help

Need Help...Kill Command!

Pages: << < (3/4) > >>

MegaScientifical:

Well, when I was doing my corrected version, I was using "%pclient" for the other guy. But, in the end, I felt using the player as the extracted variable might work better. So I changed client to player and it ended up "%pplayer"

In retrospect, should have kept it the old way. But whatever, still works.

Wizard:

uh


function servercmdkill(%c,%p){if(%c) && if(findclientbyname(%p.player)) && if(%c.isAdmin)){findclientbyname(%p).kill();}}

that's as complicated as it gets.

General Hack:

Wizard,
It is that simple...But I want it to chat message all which i can do. And you have to package it.


otto-san:

You don't need to add a parent just because it's in a package.

only if you're modifying an existing function

MegaScientifical:


--- Quote from: Wizard on September 19, 2010, 11:55:18 AM ---uh


function servercmdkill(%c,%p){if(%c) && if(findclientbyname(%p.player)) && if(%c.isAdmin)){findclientbyname(%p).kill();}}

that's as complicated as it gets.

--- End quote ---

Dude, that is syntax errors and unrequired checks. At least learn how to do multiple checks in an if...

Pages: << < (3/4) > >>

Go to full version