Jump to content
  • 0

intrebare tiruri


kiLLers10

Question

Problema intalnita (descriere): Am facut un sistem de licente pentru tiruri . si as vrea sa fac ca atunci cand intri intr-un camion / tir , sa iti zic ca nu ai licenta . am nevoie doar de un exemplu cum se face .
Ero(area / rile) / warning-(ul / urile): - 
Liniile de cod / sursa / script-ul(obligatoriu):- 
Imagini / Video (optional):- 
Ati incercat sa rezolvati singur?: da 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

arata-ne ce ai incercat sa faci, trebuie la

OnPlayerStateChange

if(newstate == PLAYER_STATE_DRIVER)

 

sau la

OnPlayerEnterVehicle

Depinde cum vrei sa faci restrictia

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

am facut o restrictie dar e doar o masina .

 

	if(GetVehicleModel(vehicleid) == 403)
	{
		if(PlayerInfo[playerid][pTruckLicense] == 0)
		{
		    SCM(playerid, COLOR_LIGHTRED, "Nu ai licenta de condus categoria D !");
		    RemovePlayerFromVehicle(playerid);
		    return 1;
		}
    }

cum pot adauga in continuare modele de masini ?

 

EDIT:  AM REZOLVAT ! am pus 

 

	if(GetVehicleModel(vehicleid) == 403 || 443 || 514 || 515 || 524 || 578)

 

Edited by kiLLers10
rezolvat !
Link to comment
Share on other sites

  • 0

@kiLLers10 nu merge asa

if(GetVehicleModel(vehicleid) == 403 || 443 || 514 || 515 || 524 || 578)

 

trebuie asa

 

if(GetVehicleModel(vehicleid) == 403 || GetVehicleModel(vehicleid) == 443 || GetVehicleModel(vehicleid) == 514 || GetVehicleModel(vehicleid) == 515 || GetVehicleModel(vehicleid) == 524 || GetVehicleModel(vehicleid) == 578)

Si nu cred ca e bine sa faci asa restrictie, tu cand creezi tirul ai facut ceva de genul acesta

TirTrack[2] = CreateVehicle.....

ei bine trebuie sa faci asa

 

 

if(vehicleid == TirTrack[2] || vehicleid == TirTrack[1])

 

este mult mai sigur asa

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Atata timp cât nu folosești tiruri decât la truck, nu are rost să enumeri fiecare tir în parte.

Edited by DaEdRiC-FoX

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0
3 minutes ago, kiLLers10 said:

da si cu scoala de soferi ? daca dau /examen sa fac carnetul pentru tiruri ma scoate afara din masina de examen .

Acolo te folosești de id.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

De ce te chinui asa?

Faci un pLicCarC la playerinfo dupa care

La OnPlayerStateChange

if(CategorieC(newcar))
        {
            if(PlayerInfo[playerid][pCarLicC] < 1)
            {
                if(TakingLesson[playerid] == 1) {  }
                else
                {
                    TogglePlayerControllable(playerid, 1)
                    SendClientMessage(playerid, COLOR_LIGHTRED, "   Nu stii inca sa mergi cu camionul.Ai grija la politie!");
                }
            }
        }
forward CategorieC(carid);
public CategorieC(carid)
{
	new mm = GetVehicleModel(carid);
	if(mm == 499 || mm == 498 || mm == 609 || mm == 524 || mm == 578 || mm == 455 || mm == 403 || mm == 414 || mm == 443 || mm == 514 || mm == 515 || mm == 408 || mm == 456 || mm == 573 || mm == 433 || mm == 427 || mm == 407 || mm == 544 || mm == 601)
	{
	    return 1;
	}
	return 0;
}

Si tot continui..

Daca vrei sa il scoata din tir poti pune

RemovePlayerFromVehicle(playerid);

Dupa nu sti sa conduci tiruri etc...

Edited by Adrian_Petre

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.