02.04.2009, 17:07
haha xD
return can be used here if
for(new i=0; i<MAX_PLAYERS; i++)
{
if(banid==i) return something
}
but it's stupid, and needs to TimerEx
try... just this
forward BanPlayer(playerid);
public WeaponCheating() {
for(new i=0;i<MAX_PLAYERS;i++) {
if(GetPlayerWeapon(i)==35||36||37||38||43||44||45) {
SendClientMessage(i, 0xE60000FF, "No cheating in server! BANNED!");
//return SetTimerEx("BanPlayer",1000,false,"i","i"); do not use it when not if expression
SetTimerEx("BanPlayer",1000,false,"i","i");
return 1;
}
}
return 1;
}
public BanPlayer(playerid)
{
BanEx(playerid,"WEAPON CHEATING");//Reason to samp.ban file
return 1;
}
somthn like this
return can be used here if
for(new i=0; i<MAX_PLAYERS; i++)
{
if(banid==i) return something
}
but it's stupid, and needs to TimerEx
try... just this
forward BanPlayer(playerid);
public WeaponCheating() {
for(new i=0;i<MAX_PLAYERS;i++) {
if(GetPlayerWeapon(i)==35||36||37||38||43||44||45) {
SendClientMessage(i, 0xE60000FF, "No cheating in server! BANNED!");
//return SetTimerEx("BanPlayer",1000,false,"i","i"); do not use it when not if expression
SetTimerEx("BanPlayer",1000,false,"i","i");
return 1;
}
}
return 1;
}
public BanPlayer(playerid)
{
BanEx(playerid,"WEAPON CHEATING");//Reason to samp.ban file
return 1;
}
somthn like this