Jump to content

Recommended Posts

Posted

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!

Posted

    

    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

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

 

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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

....

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

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;
	}
}

 

Posted

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. 

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

iti pot da pe prv gamemode ul?Ca nu ma descurc imi da erori...sau daca vrei sa il iei singur uite:

pe asta il am, ii destul de bun

Posted (edited)
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>

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
×
×
  • 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.