[CAMPANIE STAFF]Cautam moderatori si designeri activi!
Welcome to WTFCS Community Forums!
Servere gaming la super-preturi! [HOSTING SERVICE]
-->






[Tutorial] Anti Joypad
Author : SaTaNa99, Category : Tutoriale, 0 Replyes, 1330 Views
EVALUATE THIS TOPIC
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 Guest(s)
fondator rsp.wtfcs.com
 
421
POSTS
150
THREADS
0
REPUTATION
Male
Sex

WtfCs Coins: -0.01[w]
01-09-2014, 11:34 AM
#1
Sall all!
Cu toti cred ca am auzit de joypad sau AIM. Ei... bine este destul de folosit si aduce un avantaj ridicat fata de playerii care nu il folosesc!
In acest tutorial o sa va spun cum sa creati un FileScript Anti-Joypad!

Ce aveti de facut? pai nu mare lucru:

Deschidem pawno new project si scriem:


#define MAX_AIM_TICKS 3
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {
if(damagedid == INVALID_PLAYER_ID || !CheckFireArm(GetPlayerWeapon(playerid)) || GetPlayerTargetPlayer(playerid) != INVALID_PLAYER_ID) return 1;
new count = GetPVarInt(playerid, "aimcount"), ticks = GetPVarInt(playerid, "aimtick"), currtick = GetTickCount();
if(currtick - ticks <= 10000 && count + 1 >= MAX_AIM_TICKS) {
new msg[144], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(msg, 144, "%s[%i] a primit kick pentru suspectarea in folosirea Aim / Joypad.", name, playerid);
// In loc de : a primit kick pentru suspectarea in folosirea Aim / Joypad
// puteti pune ori ce mesaj doriti! Acest mesaj va fi afisat tuturor dupa ce este depistat si scos cheaterul!
SendClientMessageToAll(-1, msg);
Kick(playerid); // Daca doriti ca playerul sa fie banat in loc de kick scrieti ban!
}
else if(currtick - ticks > 10000) {
DeletePVar(playerid, "aimcount");
DeletePVar(playerid, "aimtick");
count = 0;
currtick = GetTickCount();
}
SetPVarInt(playerid, "aimcount", count + 1);
SetPVarInt(playerid, "aimtick", currtick);
return 1;
}

CheckFireArm(weaponid) {
switch(weaponid) {
case 16..39, 41..43: return 1;
default: return 0;
}
return 0;
}

PENTRU PLAYERI INCEPATORI O SA PUN CEEA CE TREBUIE SCRIS IN PAWNO MAI JOS PENTRU A PUTEA FI LUAT CU COPY PASTE SI CUM AM ZIS MAI SUS PUTETI MODIFICA KICK CU BAN! EU AM FACUT SCRIPTUL CU INTENTIA DE KICK!

Pawno code:

#define MAX_AIM_TICKS 3
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {
if(damagedid == INVALID_PLAYER_ID || !CheckFireArm(GetPlayerWeapon(playerid)) || GetPlayerTargetPlayer(playerid) != INVALID_PLAYER_ID) return 1;
new count = GetPVarInt(playerid, "aimcount"), ticks = GetPVarInt(playerid, "aimtick"), currtick = GetTickCount();
if(currtick - ticks <= 10000 && count + 1 >= MAX_AIM_TICKS) {
new msg[144], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(msg, 144, "%s[%i] a primit kick pentru suspectarea in folosirea Aim / Joypad.", name, playerid);
SendClientMessageToAll(-1, msg);
Kick(playerid);
}
else if(currtick - ticks > 10000) {
DeletePVar(playerid, "aimcount");
DeletePVar(playerid, "aimtick");
count = 0;
currtick = GetTickCount();
}
SetPVarInt(playerid, "aimcount", count + 1);
SetPVarInt(playerid, "aimtick", currtick);
return 1;
}

CheckFireArm(weaponid) {
switch(weaponid) {
case 16..39, 41..43: return 1;
default: return 0;
}
return 0;
}
Regulament forum: You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.


Forum Jump: