Jump to content

[Anti-Sobeit] NOP RemovePlayerFromVehicle simplu


Recommended Posts

Posted

Poate ati observat pe b-zone e posibil sa mergi cu un vehicul chiar daca nu esti in factiunea respectiva daca nulifici functia "RemovePlayerFromVehicle" prin intermediul la sobeit.

 

Pai astazi am gasit o solutie.


new ScoateID[MAX_PLAYERS]; 
public OnPlayerConnect(playerid)
{

    ScoateID[playerid] = 0; // Thanks Awesome
}
stock RemovePlayerFromVehicleEx(playerid)
{
	ScoateID[playerid] = GetPlayerVehicleID(playerid);
	RemovePlayerFromVehicle(playerid);
	return SetTimerEx("VerificaRemove", 1500, false, "i", playerid); //vom verifica peste 1,5 secunde deoarece dureaza 1,3 secunde ca personajul sa iasa din masina (animatia)
}
stock VerificaRemove(playerid)
{
	if(ScoateID[playerid] == GetPlayerVehicleID(playerid)) //daca el este inca in masina asta insemnand ca functia nu are efect pe el (sob)
	{
            Kick(playerid);
	}
	return 0;
}

Modificati pe oriunde aveati  RemovePlayerFromVehicle(playerid); in  RemovePlayerFromVehicleEx(playerid);

Y!M: menyx.official

Skype: menyx.official

 

 

Inainte de a critica o persoana indiferent de etnie/varsta/inteligenta ei uita-te la tine si nu uita ca toti suntem Oameni si ca nu are sens sa incerci sa pari diferit!Daca esti mai prost/destept decat cel scos/aflat in discutie incearca sa nu faci pe "MR. Inteligent" TACI si FACI!

Respecta membrii acestei comunitati daca ai pretentia sa fi respectat si tratat(a) ca pe o fiinta umana!

 

Nu fac nimic remarcabil, dar ceea ce fac este esenţial.•

 

Posted (edited)

O medoda mai simpla:

new vehicleid = GetPlayerVehicleID(playerid);
   if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(vehicleid) == 596)
   {
      if(GetPlayerSkin(playerid) != 280)
      {
         SendClientMessage(playerid, COLOR_WHITE, "Ai primit kick pentru ca ai s0beit.");
         Kick(playerid);
      }
   }
Edited by Adrian_Petre

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.