Showing ... - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Showing ... (
/showthread.php?tid=563991)
Showing ... -
Alpay0098 - 18.02.2015
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.
Re: Showing ... -
$$inSane - 19.02.2015
Show your code related to IsACop
Re: Showing ... -
Alpay0098 - 19.02.2015
Код:
stock IsACopCar(vehicleid)
{
for(new i=0; i<50; i++)
{
if(vehicleid == FacInfo[1][fCars][i]) return 1;
}
return 0;
}
Re: Showing ... -
Alpay0098 - 20.02.2015
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;
}