Whats wrong with it?
#1

Код:
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	new veh2 = GetPlayerVehicleID(playerid);// get the vehicle id
	new veh1 = GetVehicleModel(veh2);// get the vehicle model
	if(veh1 != 460 || veh1 != 520 ||veh1 != 519 ||veh1 != 553 ||veh1 != 577 ||veh1 != 592 ||veh1 != 593 ||veh1 != 513 ||veh1 !=512 ||veh1 !=511 ||veh1 != 476 )
	{
	if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) > 250){
	SendClientMessage(playerid, COLOR_YELLOW, "You have been banned from the server. Reason: Sobiet Speed Hack");
	format(Jstring, 128, "Bot : %s has been Banned from the server. Reason: Speed Hack", GetName(playerid));
	SendClientMessageToAll(COLOR_KRED, Jstring);
    SetTimerEx("BP",10,false,"d", playerid);
	return 1;
	}}
}


stock GetVehicleSpeed(vehicleid)
{ new Float:xPos[3]; GetVehicleVelocity(vehicleid, xPos[0], xPos[1], xPos[2]);
return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00); }
I see some players got Banned using Rustlers...and some other vehicles..
Reply
#2

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
    new veh2 = GetPlayerVehicleID(playerid);// get the vehicle id
    new veh1 = GetVehicleModel(veh2);// get the vehicle model
    if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) > 250)
    {
        if(veh1 != 460 || veh1 != 520 ||veh1 != 519 ||veh1 != 553 ||veh1 != 577 ||veh1 != 592 ||veh1 != 593 ||veh1 != 513 ||veh1 !=512 ||veh1 !=511 ||veh1 != 476 )
        {
            SendClientMessage(playerid, COLOR_YELLOW, "You have been banned from the server. Reason: Sobiet Speed Hack");
            format(Jstring, 128, "Bot : %s has been Banned from the server. Reason: Speed Hack", GetName(playerid));
            SendClientMessageToAll(COLOR_KRED, Jstring);
            SetTimerEx("BP",10,false,"d", playerid);
        }
    }
   
}
Reply
#3

I tried that code ..I used Rustler and i got banned..
Reply
#4

Your if-statement is logically wrong. You need to use AND, not OR. However, my personal preference is the NOR construct, e.g.

pawn Код:
if(!(veh1 == 460 || veh1 == 519 || veh1 == 520 /*etc*/))
Reply
#5

Код:
I changed the code a bit.
new FLYVehicles[] = {
469, 447,  463 ,488 , 487 , 417, 425 ,497 , 460 ,  520 , 519 , 553 , 577 ,592  ,593 , 513 ,512 ,511  ,476 , 548
};

stock IsVehicleFLYVehicle(vehicleid)
{
	for(new v; v < 20; v++)
	{
	    if(GetVehicleModel(vehicleid) == FLYVehicles[v]) return 1;
	}
	return 0;
}





	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	if(GetVehicleSpeed(GetPlayerVehicleID(playerid)) > 250 && !IsVehicleFLYVehicle(GetPlayerVehicleID(playerid))){
	SendClientMessage(playerid, COLOR_YELLOW, "You have been banned from the server. Reason: Sobiet Speed Hack");
	format(Jstring, 128, "Bot : %s has been Banned from the server. Reason: Speed Hack", GetName(playerid));
	SendClientMessageToAll(COLOR_KRED, Jstring);
    SetTimerEx("BP",10,false,"d", playerid);
	return 1;
	}}
I tried now this with rustler not get banned and high speed is it .! and i tried other vehicles like patriot they got banned with speed hack and this Work Fine! thanks For Repy Rep++
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)