Author Topic: I want some simple coding. (At least I think it is simple..  (Read 4324 times)

Code: [Select]
function ServerCmdcrimetag(%client, %name, %crime, %reward)
{
 %cl = findClientByName(%name);
 messageall( %cl.name, " is wanted for " @ %crime  @ " for a reward of" @ %reward);
}

now all it does is:

is wanted for  for a reward of

:(

I dunno about any other variable, but maybe you should change this:

function ServerCmdcrimetag(%client, %name, %crime, %reward)

to this:

function ServerCmdcrimetag(%cl, %name, %crime, %reward)

I dunno about any other variable, but maybe you should change this:

function ServerCmdcrimetag(%client, %name, %crime, %reward)

to this:

function ServerCmdcrimetag(%cl, %name, %crime, %reward)

still doing it.. heres the full code, something might be colliding:

Code: [Select]
function ServerCmdhostage(%client)
{
messageall("is holding " @ %client.name @ " hostage!!");
}

function ServerCmdkillhostage(%client)
{
messageall("killed his hostage " @ %client.name @ "!!");
}

function ServerCmdfreehostage(%client)
{
messageall("let his hostage " @ %client.name @ " go");
}

function ServerCmdcrimetag(%cl, %name, %crime, %reward)
{
%cl = findClientByName(%name);
messageall( %cl.name, " is wanted for " @ %crime  @ " for a reward of" @ %reward);
}

function ServerCmdsteal(%object)
{
messageall("is in ur base stealing ur" @ %object.name );
}

All I know is that in

function ServerCmdsteal(%object)
{
messageall("is in ur base stealing ur" @ %object.name );
}

You need to define "object" as an independent variable (not just one made on the fly) and for how to do that, sorry I dunno.

Btw way to rip off my hostage script. :cookieMonster:

Btw way to rip off my hostage script. :cookieMonster:

yeah well i was borid and felt like scripting some missage cmd things so i tried the hostage
thing :P

Code: [Select]
function ServerCmdcrimetag(%client, %name, %crime, %reward)
{
 %cl = findClientByName(%name);
 messageall( %cl.name, " is wanted for " @ %crime  @ " for a reward of" @ %reward);
}

now all it does is:

is wanted for  for a reward of

:(

Are you typing /crimetag MrPickle Murder 1000

Code: [Select]
function ServerCmdcrimetag(%client, %name, %crime, %reward)
{
 %cl = findClientByName(%name);
 messageall( %cl.name, " is wanted for " @ %crime  @ " for a reward of" @ %reward);
}

now all it does is:

is wanted for  for a reward of

:(

Are you typing /crimetag MrPickle Murder 1000

yah

I see your problem, you're missing "", from the start of messageall.

I'd write it out but I'm on my psp.

Code: [Select]
function ServerCmdhostage(%client, %t1)
{
messageall("", "is holding " @ %client.name @ " hostage!!");
}

function ServerCmdkillhostage(%client, %t1)
{
messageall("", "killed his hostage " @ %client.name @ "!!");
}

function ServerCmdfreehostage(%client, %t1)
{
messageall("", "let his hostage " @ %client.name @ " go");
}

function ServerCmdcrimetag(%cl, %name, %crime, %reward)
{
%cl = findClientByName(%name);
messageall("", %cl.name, " is wanted for " @ %crime  @ " for a reward of" @ %reward);
}

function ServerCmdsteal(%object)
{
messageall("","is in ur base stealing ur" @ %object );
}


i got the hostage script working... sorta... when i say /hostage barney it goes and says:
"is holding zackin5 hostage!!" <_< i want it to say: "zackin5 is holding barney hostage!!"
/crimetag doest work a darn, same thing with /steal
:/

Code: [Select]
function ServerCmdhostage(%client,%name)
{
messageall("",%client.name @ " is holding " @ %name @ " hostage!!");
}

I'm sure you can use that one which I fixed to fix the others...

Code: [Select]
function ServerCmdcrimetag(%client, %name, %crime, %reward)
{
 %cl = findClientByName(%name);
 messageall("", %cl.name @ " is wanted for " @ %crime  @ " for a reward of" @ %reward);
}

function ServerCmdhostage(%client, %t1)
{
messageall("", "is holding " @ %t1 @ " hostage!!");
}

function ServerCmdkillhostage(%client, %t1)
{
messageall("", "killed his hostage " @ %t1 @ "!!");
}

function ServerCmdfreehostage(%client, %t1)
{
messageall("", "let his hostage " @ %t1 @ " go");
}

function ServerCmdsteal(%client, %object)
{
messageall("","is in ur base stealing ur" @ %object );
}

Space beat me to the first one D=

Pickle, those won't work -

(with me saying /hostage MrPickle)
Before:
is holding Space Guy hostage!
Yours:
is holding MrPickle hostage!
Mine:
Space Guy is holding MrPickle hostage!

I forgot to put %client.name in D=

my hostage stuff is working but the /crimetag all it does is:
zackin5

Code: [Select]
function ServerCmdcrimetag(%client, %name, %t1)
{
%cl = findClientByName(%name);
messageall("", %client.name, " is wanted for " @ %name  @ " for a reward of" @ %t1);
}

Replace the , after %client.name with @