0 Members and 4 Guests are viewing this topic.
procedure AppOnIdle(Ticks: integer);var i: integer;beginfor i := 1 to 12 do if prisontime[i] > 0 then begin prisontime[i] := prisontime[i] - 1; end else if prisontime[i] = 0 then begin if prisonerbool[i] = true then begin prisonerbool[i] := false; Command('/ungmute ' + inttostr(prisonerint[i])); WriteConsole(prisonerint[i],'You are now free!',Color);WriteConsole(0, GetPlayerStat(prisoner, 'Name') + ' has been freed!',Color); end; end;end;function OnCommand(ID: Byte; Text: string): boolean;beginif (GetPiece(Text, ' ', 0)) = '/imprison' then begin if (GetPiece(Text, ' ', 1)) <> '' then begin if strtoint((GetPiece(Text, ' ',1))) < maxedplayers then begin prisoner := StrToInt(GetPiece(Text, ' ', 1)); prisonerint[prisoner] := StrToInt(GetPiece(Text, ' ', 1)); prisonerbool[prisoner] := true; Command('/setteam5 ' + (GetPiece(Text, ' ', 1))); Command('/gmute ' + (GetPiece(Text, ' ', 1))); if (GetPiece(Text, ' ', 2)) <> '' then begin prisontime[prisoner] := StrToInt((GetPiece(Text, ' ', 2))); end else prisontime[prisoner] := defaulttime; WriteConsole(0,' ' + GetPlayerStat(prisoner, 'Name') + ' has been sent to jail for ' + inttostr(prisontime[prisoner]) + ' seconds.',Color); WriteConsole(prisonerint[prisoner],'You are now a prisoner for the next ' + inttostr(prisontime[prisoner]) + ' seconds.',Color); end else WriteConsole(ID, 'Invalid Integer put one in below ' + inttostr(maxedplayers) + '.',Color); end else WriteConsole(ID, 'You forgot to put in the target person',Color);end;if (GetPiece(Text, ' ',0)) = '/free' then begin if (GetPiece(Text, ' ',1)) <> '' then begin prisoner := StrToInt(GetPiece(Text, ' ', 1)); if prisonerbool[prisoner] = true then begin prisontime[prisoner] := 0; Command('/ungmute ' + (GetPiece(Text, ' ', 1))); end else WriteConsole(ID, 'Target player is not a prisoner',Color); end else WriteConsole(ID, 'You forgot to put in the target person',Color);end;end;procedure OnJoinTeam(ID, Team: byte);beginteamswap[ID] := teamswap[ID] + 1; if prisonerbool[ID] = true then begin if (GetPlayerStat(ID,'Team')) <> 5 then begin Command('/setteam5 ' +inttostr(ID)); end; end; if teamswap[ID] > 10 then begin Command('/ban ' + inttostr(ID)); end;end;procedure OnLeaveGame(ID, Team: byte;Kicked: boolean);begin teamswap[ID] := 0; if prisonerbool[ID] = true then begin Command('/banip ' + GetPlayerStat(ID, 'IP')); end;end;
Suggestion: instead of banning the player when they leave.. make it so when their ip rejoins, they are auto reimprisoned
Wouldn't work well for Dynamic IP or players who share computers. :p
Quote from: DorkeyDear on June 14, 2008, 01:05:20 pmSuggestion: instead of banning the player when they leave.. make it so when their ip rejoins, they are auto reimprisonedWouldn't work well for Dynamic IP or players who share computers. :p
Quote from: UnknownSniper on June 14, 2008, 01:38:03 pmQuote from: DorkeyDear on June 14, 2008, 01:05:20 pmSuggestion: instead of banning the player when they leave.. make it so when their ip rejoins, they are auto reimprisoned'dnt ban not work too then? Wouldn't work well for Dynamic IP or players who share computers. :pQuoteQuote from: Caphriel on June 14, 2008, 01:43:30 pmQuote from: UnknownSniper on June 14, 2008, 01:38:03 pmWouldn't work well for Dynamic IP or players who share computers. :pIt would work exactly as well as an IP ban.
Quote from: DorkeyDear on June 14, 2008, 01:05:20 pmSuggestion: instead of banning the player when they leave.. make it so when their ip rejoins, they are auto reimprisoned'dnt ban not work too then?
Quote from: UnknownSniper on June 14, 2008, 01:38:03 pmWouldn't work well for Dynamic IP or players who share computers. :pIt would work exactly as well as an IP ban.
Quote from: SniperTheKiller on June 16, 2008, 06:01:05 pmQuote from: UnknownSniper on June 14, 2008, 01:38:03 pmQuote from: DorkeyDear on June 14, 2008, 01:05:20 pmSuggestion: instead of banning the player when they leave.. make it so when their ip rejoins, they are auto reimprisoned'dnt ban not work too then? Wouldn't work well for Dynamic IP or players who share computers. :pQuoteQuote from: Caphriel on June 14, 2008, 01:43:30 pmQuote from: UnknownSniper on June 14, 2008, 01:38:03 pmWouldn't work well for Dynamic IP or players who share computers. :pIt would work exactly as well as an IP ban.Do you two even know what a Dynamic IP is? Of course it won't work on dynamic IPers unless I had it subnet ban them, which wouldn't be very nice to the other people with that same subnet.