A /Kill FS or Command for Server.
#1

Okay... Newbie here, I know just a little but and I know a simple /kill is Easy. However, What I want is to Detect wether or not that Player has Wanted Levels and/or if that player is in Jail but I can't figure out those two parts =_=

So far I only have this in LAdmin which i Modified a little.

pawn Код:
dcmd_kill(playerid,params[]) {
    #pragma unused params
    if(GetPlayerWantedLevel > 1)
    return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You cannot do that while Wanted!");
    new string[100];
    GetPlayerName(playerid, string, 24);
    format(string, 100, "%s(%d) Has commited suicide using /kill", string,playerid);
    SendClientMessageToAll(0xEE82EEAA, string);
    return SetPlayerHealth(playerid,0.0);
}
Yes, It's messed up and doesn't work. But I'm hoping by time the Jail one is found/Fixed i can get it to work.

Thanks if you can help me on this.

P.S IsPlayerJailed doesn't work. and Yes, I've searched the Forums and Even searched the Filterscripts.
Reply
#2

Or you could just put
pawn Код:
dcmd_kill(playerid,params[]) {
    #pragma unused params
    new string[100];
    return SetPlayerHealth(playerid,0);
}
Why would others see that u suicided?
But overall good work
Reply
#3

first get an admin script like Ladmin indeed....
then variables will tell if the person is jailed look:
this is in LuxAdmin not Ladmin
pawn Код:
AccInfo[player1][Jailed] = 1;
this line is on dcmd_jail
then on dcmd_kill
check if the person is jailed yes or no by
pawn Код:
if(AccInfo[player1][Jailed] == 1) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You cannot do that while Jailed!");
see...... btw Mean,
Quote:

Why would others see that u suicided?

its their choice not yours.....
if he wants it that way... help him that way
Reply
#4

Quote:
Originally Posted by Mean
Посмотреть сообщение
Or you could just put
pawn Код:
dcmd_kill(playerid,params[]) {
    #pragma unused params
    new string[100];
    return SetPlayerHealth(playerid,0);
}
Why would others see that u suicided?
But overall good work
Well, Basically That is too simple for what i need =/ and The Message is basically to tell new player's there able to /kill instead of asking for someone to kill them.

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
first get an admin script like Ladmin indeed....
then variables will tell if the person is jailed look:
this is in LuxAdmin not Ladmin
pawn Код:
AccInfo[player1][Jailed] = 1;
this line is on dcmd_jail
then on dcmd_kill
check if the person is jailed yes or no by
pawn Код:
if(AccInfo[player1][Jailed] == 1) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You cannot do that while Jailed!");
see...... btw Mean,
its their choice not yours.....
if he wants it that way... help him that way
Well, I have Ladmin I like the Menus and stuff, But I can't get Playerjailed into it =S or the Wanted Levels. There kinda big Bugs that prevent them from getting Caught by the Police.

I didn't really want to switch Admin Script's Unless that's about the only way, I can't seem to get it right every time I try in Ladmin =_=


Edit: I tried Luxadmin and I'm getting an Error with player1, "error 017: undefined symbol "player1" As a newbie... I ended up trying "playerid" instead of "player1" but that won't work either.
Reply
#5

Okay, I managed to get this far, http://pawn.pastebin.com/WUGKfcBJ It's a Temp fix, I also made it in my GM that when sent to Jail you stay with 10 Wanted levels instead of Reduced to 0. Also made it so Exiting Jail Reduces it to 0 there for While in Jail they cannot /kill. But I still need to fix it to where it auto detects jail for a complete fix and not a Temp fix. (Don't need Cops going to Jail and Rearresting someone when there Time is almost up making them start over)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)