Warnings to save vehicle positions
#3

Код:
stock IsAPizzaCar(carid)
{
	for (new v = 0; v < sizeof(PizzaVehicles); v++) {
	    if(carid == PizzaVehicles[v]) return 1;
	}
	return 0;
}
Код:
new PizzaVehicles[12];
Код:
    if(GetPVarType(playerid, "Pizza") && !(IsAPizzaCar(vehicleid)))
	{
	    new Float:slx, Float:sly, Float:slz;
		GetPlayerPos(playerid, slx, sly, slz);
		SetPlayerPos(playerid, slx, sly, slz+1.3);
		PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
		RemovePlayerFromVehicle(playerid);
		defer NOPCheck(playerid);
		SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be in a Pizzaboy when delivering pizzas!");
		return 1;
	}
Код:
		else if(IsAPizzaCar(vehicleid))
		{
		    if(PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21)
		    {
			    new Float:slx, Float:sly, Float:slz;
				GetPlayerPos(playerid, slx, sly, slz);
				SetPlayerPos(playerid, slx, sly, slz+1.3);
				PlayerPlaySound(playerid, 1130, slx, sly, slz+1.3);
			    RemovePlayerFromVehicle(playerid);
			    defer NOPCheck(playerid);
			    SendClientMessageEx(playerid, COLOR_GRAD2, "You are not a Pizza Boy!");
			}
		}
Reply


Messages In This Thread
Warnings to save vehicle positions - by kevin_1991 - 20.06.2014, 12:40
Re : Warnings to save vehicle positions - by MCZOFT - 20.06.2014, 12:45
Re: Warnings to save vehicle positions - by kevin_1991 - 20.06.2014, 13:01
Re : Warnings to save vehicle positions - by MCZOFT - 20.06.2014, 13:07
Re: Warnings to save vehicle positions - by kevin_1991 - 20.06.2014, 14:02
Re: Warnings to save vehicle positions - by kevin_1991 - 20.06.2014, 14:14
Re: Warnings to save vehicle positions - by kevin_1991 - 20.06.2014, 15:10
Re : Re: Warnings to save vehicle positions - by MCZOFT - 20.06.2014, 15:17
Re: Warnings to save vehicle positions - by kevin_1991 - 20.06.2014, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)