Jump to content
  • 0

ZCMD Warning 213


Pinki950

Question

Nick: Pinki950

Problema: Imi da Warning 213 si nu stiu cum sa o rezolv la linia:      if (doors == true)

Erori / warnings: Warning 213

Lini/script: [pawn]CMD:lock(playerid, params[])

{

new engine, lights, alarm, doors, bonnet, boot, objective;

new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.

SendAdminText(playerid, "/lock", params);

if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.

{

if (AVehicleData[GetPlayerVehicleID(playerid)][Owned] == true)

{

if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)

{

GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.

if (doors == true)

{

SetVehicleParamsEx(vehicleid, engine, lights, alarm, false, bonnet, boot, objective);

GameTextForPlayer(playerid,"~r~Masina descuiata!",3000,4);

}

else

{

SetVehicleParamsEx(vehicleid, engine, lights, alarm, true, bonnet, boot, objective);

GameTextForPlayer(playerid,"~b~Masina incuiata!",3000,4);

}

}

else

SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu esti soferul masinii");

}

else

SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu este masina ta");

}

else

SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}Trebuie sa te aflii intr-o masina");//the error message.

return 1;

}[/pawn]

Ai incercat sa rezolvi singur ?: Da, dar nici o reusita!

?q=192&s=s&bg1=5eeb06&bg2=3a7bfc&t=000&gl=fff&b=000000&gbg=000
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

CMD:lock(playerid, params[])
    {
        new engine, lights, alarm, doors, bonnet, boot, objective;
        new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
        SendAdminText(playerid, "/lock", params);
        if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.
            {
              if (AVehicleData[GetPlayerVehicleID(playerid)][Owned] == true)
              {
               if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
                {
                GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.
                if (doors == true)
					{
						SetVehicleParamsEx(vehicleid, engine, lights, alarm, false, bonnet, boot, objective);
						GameTextForPlayer(playerid,"~r~Masina descuiata!",3000,4);
					}
					else
					{
						SetVehicleParamsEx(vehicleid, engine, lights, alarm, true, bonnet, boot, objective);
						GameTextForPlayer(playerid,"~b~Masina incuiata!",3000,4);
					}
				}
				else
				SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu esti soferul masinii");
				}
				else
				SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu este masina ta");
				}
				else
				SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}Trebuie sa te aflii intr-o masina");//the error message.
	return 0;
}

Sper ca te-am ajutat :D

                                                                                     w70x64b.png

 

Recomand:
Serverul de San Andreas MultiPlayer - Romania Trucking Office
IP -> 93.119.26.9:7777
                                                  
                                            Da-ne like pe Facebook-ul RTO -> https://www.facebook.com/RomaniaTruckingOffice?fref=ts <- pentru a fi la curent cu toate noutatile.
Fondator ArGoN/Fredel => Pentru orice problema/nelamurire/asistenta/donatii va stau la dispozitie pe forum -> http://www.romania-trucking.fzn.ro/forum/

Link to comment
Share on other sites

Tag mismatch:

Acest avertizment apare cand ati asigurat o eticheta gresita ariei.Ex.:

[pawn]new Logo0 ;[/pawn]

Ca sa il rezolvati, trebuie sa rescrieti aria corect:

[pawn]new Text:Logo0 ;[/pawn]

Loose indentation:

Acest avertizment apare cand o linie nu este pozitionata bine.Ex:

[pawn]public OnGameModeInit ( )

{

      print ( "BLABLA" ) ;

     

    return ( 1 ) ;

}[/pawn]

Ca sa il rezolvati, trebuie sa pozitionati linia corect:

[pawn]public OnGameModeInit ( )

{

    print ( "BLABLA" ) ;

     

    return ( 1 ) ;

}[/pawn]

uite cum ar trebui sa arate comanda

: vHWTFQx.png

si uite cum arata comanda ta :

Mn6TQye.png

Deci care e diferenta ?

Link to comment
Share on other sites

CMD:lock(playerid, params[])
{
	new engine, lights, alarm, bool:doors, bonnet, boot, objective;
	new vehicleid = GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
	SendAdminText(playerid, "/lock", params);
	if(IsPlayerInAnyVehicle(playerid))//Thsi will check that is a player In a vehcile or not.
		{
		if (AVehicleData[GetPlayerVehicleID(playerid)][Owned] == true)
			{
			if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
			{
				GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the vehicle lock.
				if (doors == true)
					{
						SetVehicleParamsEx(vehicleid, engine, lights, alarm, false, bonnet, boot, objective);
						GameTextForPlayer(playerid,"~r~Masina descuiata!",3000,4);
					}
					else
					{
						SetVehicleParamsEx(vehicleid, engine, lights, alarm, true, bonnet, boot, objective);
						GameTextForPlayer(playerid,"~b~Masina incuiata!",3000,4);
					}
				}
				else
				SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu esti soferul masinii");
				}
				else
				SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nu este masina ta");
				}
				else
				SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}Trebuie sa te aflii intr-o masina");//the error message.
	return 1;
}

Acolo unde ai tu doors trebuie cu bool pentru ca tu il folosesti ca un bool. ( adica cu true/false )

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.