[FS?]Weapon+FakeKill AntiCheat Something... (UNTESTED)
#1

Hello All
...
I once was a victim of a fake kill and a ban ... ;(
...
Since I know many of you guys are victims too of that...
I wanna help myself and y'all out
...
Its Called "Weapon+FakeKill AntCheat"
...
What it does? :
In some servers, a guy pulls out a MINIGUN and gets kicked or banned (DUH!)
But In same server, the reason is "Minigun" ...
... So wait.... How can a guy kill other guy... If the weapon... ehh.... WTF ?!?!? (this is the part where many ppl get confused) xD
...
So here u go

pawn Code:
//goes in top
new NoobWeps[] = {36, 38, 37}; // 1st make ur self a list of weapons that are not allowed (add more/less if you want)

public OnPlayerUpdate(playerid)
{
for(new i=0; i<sizeof(NoobWeps); i++)  // dont know how to explain this
if(GetPlayerWeapon(playerid) == NoobWeps[i]) // the "if" part now... (detects the "noob weps")
Kick(playerid); // kicks him ... or change it how u want it
}

public OnPlayerDeath(playerid, killerid, reason) // now here
{
for(new i=0; i<sizeof(NoobWeps); i++)  // same thingy again
if(reason == NoobWeps[i])        // since reason is same like weapon id ... so just add it here lol
SendClientMessage(playerid, 0xF97804FF, "Fake-Kill Detected! Fuck you !"); // you should get this part ... do you ? :pp
Kick(playerid); // and the guy gets kicked .. or change how u want
}
...
Code:
GUYS I NEVER HAD A CHANCE TO TEST IT... cause I got no one to do it with .. and no host to
I hope it works ...
Please tell me if it works


That's it I think ... Cya'll

Comments ? :P

Code:
Notice!!!
Players will be able to do fake-kills with weapons that are not in the "noob weapons" list
... 
Im not that advanced to make scripts that detect did killer did any real damage or not to a player..
..
So this only a uber-simple-short thingy ...
..
When I learn something new ... I will use it
Cya :P
Reply
#2

Nive :P
Reply
#3

Quote:
Originally Posted by Divine
public OnPlayerUpdate(playerid)
{
for(new i=0; i<sizeof(NoobWeps); i++) // dont know how to explain this
if(GetPlayerWeapon(playerid) == NoobWeps[i]) // the "if" part now... (detects the "noob weps")
Kick(playerid); // kicks him ... or change it how u want it
}

public OnPlayerDeath(playerid, killerid, reason) // now here
{
for(new i=0; i<sizeof(NoobWeps); i++) // same thingy again
if(reason == NoobWeps[i]) // since reason is same like weapon id ... so just add it here lol
SendClientMessage(playerid, 0xF97804FF, "Fake-Kill Detected! Fuck you !"); // you should get this part ... do you ? p
Kick(playerid); // and the guy gets kicked .. or change how u want
}
ok this will kick everyone!!!
Reply
#4

Quote:
Originally Posted by RemulisLTU
Nive :P
Thnx


Quote:
Originally Posted by [RD
Chez ]

ok this will kick everyone!!!
Did you even test it
Reply
#5

i've seen a code... in pawno you mut use {} for big operations, so operations on sever lines will make as different operations(bad english)
for example
1. if(playerid==0)Kick(playerid); will kick only 0 playerid
2. if(playerid==0)
Kick(playerid); will kick everyone player, who was searched in public
3. if(playerid==0){more than 1 operations}
will work well =)

so this is not fake kill... there is no check for distance, playerstate, current weapon, z pos, player team.
for good anti fake kill you must check all params...
i guess you will try...
good luck
Reply
#6

Quote:
Originally Posted by [RD
Chez ]
i've seen a code... in pawno you mut use {} for big operations, so operations on sever lines will make as different operations(bad english)
for example
1. if(playerid==0)Kick(playerid); will kick only 0 playerid
2. if(playerid==0)
Kick(playerid); will kick everyone player, who was searched in public
3. if(playerid==0){more than 1 operations}
will work well =)

so this is not fake kill... there is no check for distance, playerstate, current weapon, z pos, player team.
for good anti fake kill you must check all params...
i guess you will try...
good luck
How long do you script? You are not very clear
You MUST have bracket in every operation! You can`t have
pawn Code:
if(playerid==0)Kick(playerid); // It will kick every player,no matter if player is another id,you don`t have ANY OPERATIONS for if(playerid==0)!!!
It must be
pawn Code:
if(playerid==0){Kick(playerid);} // It will kick playerid 0
Quote:
Originally Posted by [RD
Chez ]
Quote:
Originally Posted by Divine
public OnPlayerUpdate(playerid)
{
for(new i=0; i<sizeof(NoobWeps); i++) // dont know how to explain this
if(GetPlayerWeapon(playerid) == NoobWeps[i]) // the "if" part now... (detects the "noob weps")
Kick(playerid); // kicks him ... or change it how u want it
}

public OnPlayerDeath(playerid, killerid, reason) // now here
{
for(new i=0; i<sizeof(NoobWeps); i++) // same thingy again
if(reason == NoobWeps[i]) // since reason is same like weapon id ... so just add it here lol
SendClientMessage(playerid, 0xF97804FF, "Fake-Kill Detected! Fuck you !"); // you should get this part ... do you ? p
Kick(playerid); // and the guy gets kicked .. or change how u want
}
ok this will kick everyone!!!
He is not make a players loop (NoobWeps loop) so it will not kick everyone!
Reply
#7

Quote:
Originally Posted by [RD
Chez ]
i've seen a code... in pawno you mut use {} for big operations, so operations on sever lines will make as different operations(bad english)
for example
1. if(playerid==0)Kick(playerid); will kick only 0 playerid
2. if(playerid==0)
Kick(playerid); will kick everyone player, who was searched in public
3. if(playerid==0){more than 1 operations}
will work well =)

so this is not fake kill... there is no check for distance, playerstate, current weapon, z pos, player team.
for good anti fake kill you must check all params...
i guess you will try...
good luck
hmmm ... well i tested weapon anticheat myself and it worked ...
I told you .. i never got a chance to test it with others (the anti-fake kill)
.. so lest just wait for smb to tell the results
Reply
#8

Quote:
Originally Posted by Luka[balkan-samp.com
]

He is not make a players loop (NoobWeps loop) so it will not kick everyone!
Thnx man ... I knew it ! :P
Reply
#9

Quote:
Originally Posted by Divine
Quote:
Originally Posted by Luka[balkan-samp.com
]

He is not make a players loop (NoobWeps loop) so it will not kick everyone!
Thnx man ... I knew it ! :P
Why thanks to me? I just say the truth,he didn`t test the script
Reply
#10

how long YOU script? for one operations like
if(param)do something {} nod't needed -_-
for large operations its required...
normal scripter can also use return func
example:
OnPlayerUpdate(playerid)
{
some for cycle
{
if(some param) return SendClientMessage(params);
}
return 1;
}

this will return public with SendCLient Mesasge

so when operation like this
if(param)do smthn; this will ended on this line and do other check next....
fuk my english -_-
I'm good scripter.. i coded in C#, C++, pascal so i guess me betterknow how to optimise the code ^_^
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)