Jump to content
Sign in to follow this  
Sebi wepos

O mica problema

Recommended Posts

Salut, ma potuteti ajuta cu o problema?Daca esti taxi de ex si dai fare si te duci la un player sa dea g, el nu poate da g ca ii spune ca nu este in Taxi los santos, la fel si la lspd/fbi/lvpd.Scuzati deranjul!

Share this post


Link to post
Share on other sites

Deci te duci in publicul OnPlayerKeyStateChange si acolo o sa gasesti tot ce iti trebuie tie.

Share this post


Link to post
Share on other sites

    

    if(IsACopCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        if(newcar == Copcar[6] || newcar == Copcar[7] || newcar == Copcar[18])
        {
            if(IsACop(playerid))
            {
                if(PlayerInfo[playerid][pRank] < 3)
                {
                    ClearAnimations(playerid);
                    SendClientMessage(playerid,COLOR_WHITE,"You don't have rank 3.");
                }
            }
        }
        if(IsAFbiCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        if(IsALVPDCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        if(IsANgCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        else if(IsAnAmbulance(newcar))
        {
            if(PlayerInfo[playerid][pMember] == 14) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Paramedic.");}
        }

am scos          "   else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop.") " dar daca dai f la un cop in masina te lasa sa intri, la fel si la g , dar vreau sa nu mearga sa dai f, sper sa intelegi

Share this post


Link to post
Share on other sites
if(newstate == PLAYER_STATE_DRIVER)
{
	if(IsAFbiCar(newcar) && !IsACop(playerid))
		return ClearAnimations(playerid),SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop.");
}

 

Share this post


Link to post
Share on other sites
if(newstate == PLAYER_STATE_DRIVER)
{
	if(IsAFbiCar(newcar) && !IsACop(playerid))
	{
		ClearAnimations(playerid);SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop.");
		return 1;
	}
}

....

Share this post


Link to post
Share on other sites

gen daca am asa:

      if(IsAFbiCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }

pun asa?

 

if(newstate == PLAYER_STATE_DRIVER)
{
	if(IsAFbiCar(newcar) && !IsACop(playerid))
	{
		ClearAnimations(playerid);SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop.");
		return 1;
	}
}

 

Share this post


Link to post
Share on other sites

Da , dar nu stiu sigur daca merge cu newstate pentru ca o sa fie deja in masina ... deci sa fi mai sigur pune la OnPlayerEnterVehicle si sigur o sa functioneze bine.

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(IsAFbiCar(vehicleid) && ispassenger && !IsACop(playerid)) {ClearAnimations(playerid);SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop.");}
	return 1;
}

Jucatorul o sa poata intra in masina doar ca pasager , poti sa faci pentru restu dupa acest model. :)

Succes. 

Share this post


Link to post
Share on other sites
La 13.05.2019 la 10:48, Sebi wepos a spus:

    

    if(IsACopCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        if(newcar == Copcar[6] || newcar == Copcar[7] || newcar == Copcar[18])
        {
            if(IsACop(playerid))
            {
                if(PlayerInfo[playerid][pRank] < 3)
                {
                    ClearAnimations(playerid);
                    SendClientMessage(playerid,COLOR_WHITE,"You don't have rank 3.");
                }
            }
        }
        if(IsAFbiCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        if(IsALVPDCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        if(IsANgCar(newcar))
        {
            if(IsACop(playerid)) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop."); }
        }
        else if(IsAnAmbulance(newcar))
        {
            if(PlayerInfo[playerid][pMember] == 14) { }
            else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Paramedic.");}
        }

am scos          "   else { ClearAnimations(playerid); SendClientMessage(playerid,COLOR_WHITE,"You are not a Cop.") " dar daca dai f la un cop in masina te lasa sa intri, la fel si la g , dar vreau sa nu mearga sa dai f, sper sa intelegi

Vorbind de tot ce ai trimis tu aici,nimic nu raspunde de apasarea butonului F ca exemplu pentru un anumit scop.

- Deschide bara de cautare si introdu acest cod if(newkeys == 
- Dupa ce ai introdus o sa te trimita in locul unde sunt toate aceste combinatii ce au la baza de a indeplini o functie, si cauta codul literei care iti trebuie, codurile acestor litere le poti gasi aici Click
- Ca exemplu litera Y are acest cod if(newkeys ==  1024)

Edited by </Khain>

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.