Showing ...
#1

Hello,
Why does it work and why the second one doesn't work? (Freeze and Showing HUD Center Info that You are not authorized to use this vehicle) Also, these codes coded in OnPlayerEnterVehicle section.
First one :
Код HTML:
else if(IsTruckerCar(vehicleid) && !ispassenger)
	{
	    if(PlayerInfo[playerid][pJob] != 18)
	    {
			displayCenterHUDInfo(playerid,  "You are not a~n~~b~Trucker Driver~w~.", 8); //display for 8 seconds
			PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			ClearAnimations(playerid);
		}
	    else
	    {
			CP[playerid] = CHECKPOINT_TRUCKERLOAD;
			SetPlayerCheckpoint(playerid,1037.4570,-1105.8281,23.9771,4);
		}
	}
Second one :
Код HTML:
else if(IsACopCar(vehicleid) && !ispassenger)
	{
	    if(!IsACop(playerid))
	    {
			displayCenterHUDInfo(playerid, "You are not a member of the LSPD/FBI/SAST.", 8);
			PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			ClearAnimations(playerid);
		}
	}
+Rep for Helper.
Reply
#2

Show your code related to IsACop
Reply
#3

Код:
stock IsACopCar(vehicleid)
{
    for(new i=0; i<50; i++)
	{
	    if(vehicleid == FacInfo[1][fCars][i]) return 1;
	}
    return 0;
}
Reply
#4

Who deleted this?
Код:
stock IsACop(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    new leader = PlayerInfo[playerid][pLeader];
	    new member = PlayerInfo[playerid][pMember];
	    if(member==1 || member==2 || member==3)
		{
		    return 1;
		}
		else if(leader==1 || leader==2 || leader==3)
		{
		    return 1;
		}
		else if(IsAnAgent(playerid))
		{
			return 1;
		}
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)