Auto armor ban when < default score -
Face9000 - 28.11.2010
Hi all,i need little help.
In my server i've ranks,and only who have 1500 score,he can get full armor.
Well,cuz i see everyday cheaters with 0 score and full armor,i need to do a thing:
I need to autoban who have full armor between 0 and 1499 score.
Ex: Who have 10 score and full armor,get's auto ban.
From 0 to 1499.
Thanks,i really appreciate who will help me.
Re: Auto armor ban when < default score -
knackworst - 28.11.2010
mhh, maybe something like this:
pawn Код:
if(GetPlayerScore == < 1500)
{
if(GetPlayerArmour == >1)
{
//Ban command
I'm not sure if this will work...
but you can give it a try ; )
Re: Auto armor ban when < default score -
iggy1 - 28.11.2010
pawn Код:
forward ArmourTimer();
public OnGameModeInit()
{
SetTimer("ArmourTimer", 5000, true);
return 1;
}
public ArmourTimer()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new
Float:armour;
GetPlayerArmour(playerid, armour);
if(GetPlayerScore(playerid) < 1500 && armour > 25.0)//don't know how much armour you allow below the score 1500
{
ban(playerid);
}
}
}
Re: Auto armor ban when < default score -
Face9000 - 28.11.2010
Thanks i will try.
Re: Auto armor ban when < default score -
iggy1 - 28.11.2010
My bad i should have compiled it one sec ill fix.
pawn Код:
forward ArmourTimer();
public OnGameModeInit()
{
SetTimer("ArmourTimer", 5000, true);
return 1;
}
public ArmourTimer()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new
Float:armour;
GetPlayerArmour(playerid, armour);
if(GetPlayerScore(playerid) < 1500 && armour > 25.0)//don't know how much armour you allow 1500
{
Ban(playerid);
}
}
}
Re: Auto armor ban when < default score -
Mauzen - 28.11.2010
Remember that some police vehicles (the swat van?) gives you armour. Maybe you have them in your script, so you would ban players for entering it.
Re: Auto armor ban when < default score -
iggy1 - 28.11.2010
Quote:
Originally Posted by Mauzen
Remember that some police vehicles (the swat van?) gives you armour. Maybe you have them in your script, so you would ban players for entering it.
|
Good point.
pawn Код:
forward ArmourTimer();
public OnGameModeInit()
{
SetTimer("ArmourTimer", 5000, true);
return 1;
}
public ArmourTimer()
{
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new
Float:armour;
GetPlayerArmour(playerid, armour);
if(GetPlayerScore(playerid) < 1500 && armour > 25.0 && GetVehicleModel(GetPlayerVehicleID(playerid)) != 427)//don't know how much armour you allow 1500
{
Ban(playerid);
}
}
}
Re: Auto armor ban when < default score -
Face9000 - 28.11.2010
Nope Mauzen,there are no swat vehicles in my gm =)
Iggy1,thanks!
I tried but i got this:
Код:
C:\Documents and Settings\k\Desktop\kkkk,pwn(116) : error 001: expected token: ";", but found "forward"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: Auto armor ban when < default score -
iggy1 - 28.11.2010
I don't think my code is causing that, there seems to be a semicolon missing before the forward. Have a look. The script i posted compiles without error.
EDIT: Also you might want to just delete the timer, and put the rest of the code in an existing timer (with a player loop) if you have one, it will save resources.
Auto armor ban when < default score -
[NoV]LaZ - 28.11.2010
Quote:
Originally Posted by Mauzen
Remember that some police vehicles (the swat van?) gives you armour. Maybe you have them in your script, so you would ban players for entering it.
|
SWAT vans and Ambulances don't give armour and health respectively since 0.3b.