how to save different bans on files
#1

Hello all. Today im here to ask how can i save a ban log like the one im gonna show u after player gets banned..

#--------------------------------------------------------
# Player:* * * MiGu3X [197.0.209.54] with level: 5
# Banned by:* *Admim
# Reason:* reason
# Time/Date:* *01/09/2012 19:45:16 (d/m/y h:m)
# Ban Lenght:* PERMANENT
#--------------------------------------------------------
# Ban Info

+ Team Security.

Not jailed. | Not muted. |
Kills: 3764. Deaths: 1469.


100.00 Health and 50.00 Armour.
0 Score. Skin 294. Holding $6969. Ping 88.

On foot at X=1490.292, Y=60.007, Z=29.583 while facing 203.296 in Interior 0.
Not surfing any vehicle.

miGuex was holding M4 with 8000 ammo.
Full armoury:
- Knife, 1 ammo.
- Sawnoff Shotgun, 7998 ammo.
- MP5, 8000 ammo.
- M4, 8000 ammo.
Reply
#2

Jump / Bump
Reply
#3

Hi & Why don't you get your own ideas, PAL! Instead of stealing mines word-for-word, that's a little pathetic.

... Anyways, since you copied what my stuff is, I'll guess and entertain you here.

I made it into a stock, when a player is banned, its a simple write system (or 'file functions') *according to "wiki sa-mp"

stuff i used (simple file system):
* https://sampwiki.blast.hk/wiki/File_Functions [ general stuff ]
(ects') * https://sampwiki.blast.hk/wiki/Fopen

stuff like dates and times, duh, cuz you need it for both banner and staff or records/logs:

* https://sampwiki.blast.hk/wiki/Getdate , and,
* https://sampwiki.blast.hk/wiki/Gettime

I kept it old school and did a basic stock with strings, fopen (as stated above),

also when u jail, have the user set as "set jailed to true"
when someone is jailed and then later banned for what ever reason;
the ban stock will check if the user has been in jail? or muted or both, if player was in a car (by getting car information), these are very basic file write system and "getting information"
examples like (basic setting): gPlayerJail[playerid] = 1 ; (EXAMPLES of custom stock/function)
the rest i use a custom PHP/HTML system for staff to read and use against the banner, if a ban appeal is created.


the entire thing about this is to create logs and cases for ban appeal or to prevent admin abuse.

P/S: Wiki is your friend.

tips:
make sure you have your logs you want to be set to the player, either a system with set options or pvars as some people call it [and recent 0.3 usage].

blah blah blah I hope that helped, mister copy cat .
AND for the record, i dont mind if people use the idea to make their own systems (logs)
but next time you can try harder NOT to steal someone's layout.

Thanks for visiting sa-mp forums.
Reply
#4

@Tenshi thnx for the info + i just wanted to get the idea of how to do it. Thnx. Btw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)