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






[Tutorial]Anti C-Bug
Author : SaTaNa99, Category : Tutoriale, 1 Replyes, 1905 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:35 AM
#1
Sall All!
O mare parte dintre jucatorii de Sa-Mp stiu ce este acela C-Bug! Pentru playeri este un lucru foarte amuzant insa pentru fondatorii serverului nu este deloc amuzant ci enervant!
Cum combatem acest C-Bug?
-Simplu! Citim si facem ceea ce scrie la pasul 1 si pasul 2!
Pasul 1!- Cititi cu atentie !!
Pasul 2!- deschidem pawno, new project si adaugati ce este mai jos

Pawno Code:

#include <a_samp>

#define C_BUG_TIME 5
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTRED 0xFF6347AA
#undef MAX_PLAYERS
#define MAX_PLAYERS 200

new P_CBUG_TICKS[MAX_PLAYERS];


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
if(newkeys & KEY_FIRE && oldkeys & KEY_CROUCH && IsCbugWeapon(playerid))
{
P_CBUG_TICKS[playerid] ++;
if(P_CBUG_TICKS[playerid] > C_BUG_TIME)
{
new str2[128];
format(str2, sizeof(str2), "Jucatorul %s abuzeaza de C-Bug!", playername);
SendClientMessageToAll(COLOR_RED, str2);
SendClientMessage(playerid,COLOR_LIGHTRED,"Atentie! Va rugam sa nu abuzati de C-Bug pentru a nu fi sanctionat!");
P_CBUG_TICKS[playerid] = 0;
new Float:Health; GetPlayerHealth(playerid,Health); SetPlayerHealth(playerid,Health-25);
}
}
return 1;
}

stock IsCbugWeapon(playerid)
{
new weaponID = GetPlayerWeapon(playerid);
if(weaponID == 22 || weaponID == 24 || weaponID == 25 || weaponID == 27)
{
return 1;
}
return 0;
}


ATENTIE! Pentru cei care nu stiu: Acest viitor script nu te scapa de C-Bug in sensul ca nu mai poate fi folosit adica in sensul ca este scos! nu exista asemenea script! Acest script face ca atunci cand un player incearca sa foloseasca C-Bug , acestuia ii va scadea 25% din viata si ii va aparea pe ecran un mesaj in cazul de fata eu am ales sa pun mesajul "Atentie! Va rugam sa nu abuzati de C-Bug pentru a nu fi sanctionat!" insa puteti schimba mesajul, este foarte simplu :
SendClientMessage(playerid,COLOR_LIGHTRED,"Atentie! Va rugam sa nu abuzati de C-Bug pentru a nu fi sanctionat!"); Ca sa schimbati mesajul puneti in locul textului pe care l.am scris eu mesajul vostru,exemplu:
SendClientMessage(playerid,COLOR_LIGHTRED," Aici Scri mesajul dorit! atentie sa fie pus intre ghilimele ");
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.
Support Tehnic Team
           
146
POSTS
57
THREADS
1910
REPUTATION
Male
Sex

WtfCs Coins: 2.81[w]

Halloween EventHalloween EventX-Mas TreeFinnSuit MemberRich MemberDeveloperPot HeadClash of Clans PlayerCS:GO PlayerBlackhatGamerX-Mas Red SocksDrunk MemberLeague of Legends PlayerX-Mas Snowflake
01-15-2018, 09:42 PM
#2
Multumim pentru tutorial!
[Image: giphy.gif?cid=ecf05e47150f77975f50f56868...=giphy.gif]


Forum Jump: