public AntiCheatHack()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
new weap = GetPlayerWeapon(i);
if(weap == 18 || weap == 38 || weap == 36 || weap == 37 || weap == 35 || weap == 44)
{
ResetPlayerWeapons(i);
ResetPlayerWeapons(i);
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "%s estб usando armas proibidas !", pName);
MsgAdm(string, YELLOW, 1);
}
if(gTeam[i] == TEAM_ZOMBIE)
{
switch (GetPlayerWeapon(i))
{
case 1,2,3,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46:
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i, 0, 1);
}
}
}
}
return 1;
}
public AntiCheatHack()
{
new string[128];
new pName[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
new weap = GetPlayerWeapon(i);
if(weap == 18 || weap == 38 || weap == 36 || weap == 37 || weap == 35 || weap == 44)
{
GetPlayerName(i, pName, sizeof(pName));
ResetPlayerWeapons(i);
format(string, sizeof(string), "%s estб usando armas proibidas !", pName);
MsgAdm(string, YELLOW, 1);
}
if(gTeam[i] == TEAM_ZOMBIE)
{
switch (GetPlayerWeapon(i))
{
case 1,2,3,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46:
{
ResetPlayerWeapons(i);
SetPlayerHealth(i, 100.0);
SetPlayerArmour(i, 50.0);
GivePlayerWeapon(i, 1, 50);
GivePlayerWeapon(i, 4, 520);
GivePlayerWeapon(i, 9, 500);
}
}
if(gTeam[i] == TEAM_HUMAN)
{
SetPlayerHealth(i, 100.0);
SetPlayerArmour(i, 50.0);
GivePlayerWeapon(i,24,100);
GivePlayerWeapon(i,29,250);
GivePlayerWeapon(i,25,56);
GivePlayerWeapon(i, 46, 50);
return 1;
}
}
}
return 1;
}
Cara deve ser problema de return
pois a Knife e a moto-serra estгo habilitados para os zumbis case 1,2,3,5,6,7,8,10, faca й o id 4, motoserra id 9 |
[...] e tipo os humanos nгo podem pegar moto-serra sу os zombies alguem pode me ajudar ? |
switch (GetPlayerWeapon(i))
{
case 1,2,3,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46:
{
ResetPlayerWeapons(i);
SetPlayerHealth(i, 100.0);
SetPlayerArmour(i, 50.0);
GivePlayerWeapon(i, 1, 50);
GivePlayerWeapon(i, 4, 520);
GivePlayerWeapon(i, 9, 500);
}
}
#malz o double mais preciso de ajuda ;/
a arma fica setando toda hora na mгo dos humanos e dos zombies ;s mesma coisa assim eu tiro life dos humanos e depois volta ao normal :@ seria isso ?Resetplayerweapons pawn Код:
|
public AntiCheatHack()
{
new string[128];
new pName[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
new weap = GetPlayerWeapon(i);
if(weap == 18 || weap == 38 || weap == 36 || weap == 37 || weap == 35 || weap == 44)
{
GetPlayerName(i, pName, sizeof(pName));
ResetPlayerWeapons(i);
format(string, sizeof(string), "%s estб usando armas proibidas !", pName);
MsgAdm(string, YELLOW, 1);
}
if(gTeam[i] == TEAM_ZOMBIE)
{
if(weap != 1 || weap != 4 || weap != 9) return ResetPlayerWeapons(i);
GivePlayerWeapon(i, 1, 1);
GivePlayerWeapon(i, 4, 1);
GivePlayerWeapon(i, 9, 1);
}
if(gTeam[i] == TEAM_HUMAN)
{
SetPlayerHealth(i, 100.0);
SetPlayerArmour(i, 50.0);
GivePlayerWeapon(i, 24,100);
GivePlayerWeapon(i, 29,250);
GivePlayerWeapon(i, 25,56);
GivePlayerWeapon(i, 46, 50);
}
}
return 1;
}
SetTimer("AntiCheatHack",500,true);
if(gTeam[i] == TEAM_ZOMBIE)
{
if(weap != 1 || weap != 4 || weap != 9) return ResetPlayerWeapons(i);
GivePlayerWeapon(i, 1, 1);
GivePlayerWeapon(i, 4, 1);
GivePlayerWeapon(i, 9, 1);
}
if(gTeam[i] == TEAM_HUMAN)
{
SetPlayerHealth(i, 100.0);
SetPlayerArmour(i, 50.0);
GivePlayerWeapon(i, 24,100);
GivePlayerWeapon(i, 29,250);
GivePlayerWeapon(i, 25,56);
GivePlayerWeapon(i, 46, 50);
}