Car Ids
#1

Okay in a role play G/M how would you set up cars for differnt factions like when i add cars it messes up saying that this car is for news and not the cops what would i do to fix this?

(I Swear To Gosh If Someone Says ****** It Or Search It Cause I Have )
Reply
#2

if i got it right: search the vehicle ID (f.ex: 596=Cop Car LS), search that ID in your GM. you will find some variables/arrays with the information concerning the teams you need for your car, maybe something like
Код:
	gVehicleTeamAllowed[596][TEAM_COP]=1;//Cop Car LS
	gVehicleTeamAllowed[597][TEAM_COP]=1;//Cop Car SF
	gVehicleTeamAllowed[598][TEAM_COP]=1;//Cop Car LV
if that fails, try to subtract 400 from the ID, coz the first 400 IDs are not used at all - idk why. that trick is used often to reduce memory usage in arrays (why store 400 empty slots for not-existing vehicles?)..
you could search "news" or some other part of your printed text when u get ejected off the car, and maybe post some lines, maybe the OnPlayerStateChange(), iam sure the "bug" is inside there.
Reply
#3

Код:
	if(newcar >= 83 && newcar <= 87)
		{
			if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){ }
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "  You are not a News Reporter !");
			  RemovePlayerFromVehicle(playerid);
			}
			if(PlayerInfo[playerid][pNewsSkill] < 200 && newcar == 0)
			{
			  SendClientMessage(playerid, COLOR_GREY, "  Your News Reporter Skill is to low, cant fly the Chopper yet !");
			  RemovePlayerFromVehicle(playerid);
			}
		}
So would i belooking at the New Car Correct?
Reply
#4

yep. thats the 1st clue i needed. it says that you need a certain skillscore (as reporter) to get into newcar 83 to 87 (thats not a car-ID, its more like an array where the vehicles are stored in, i guess its the 83th vehicle created in the gamemode).
so, the news-chopper is THE hint: its vehicleID is 488, so search for that. the lines for creating all vehicles should be at least 87 lines in size, so its not difficult to find.
team 9 is the reporter-faction which is stored in Playerinfo[][pMember], you could search for both: "488" (creating the chopper) and "pMember" / "PLeader". this will lead you to the lines you need/want to modify your teams.
if you only want to get rid of the ejection part and leave the messages intact (for testing), only the
Код:
RemovePlayerFromVehicle(playerid);
needs to be remarked,
Код:
// RemovePlayerFromVehicle(playerid);
two times, of course.
Reply
#5

Could i use a filter script and just keep the vehicels unlocked?
Reply
#6

sure, have a look at the snipped here:
http://forum.sa-mp.com/index.php?topic=162767.0
you can add as much cars as you want there. erm... up to 2000 i guess
due to the fact that each created car in your GM gets an id (for teams), and the new IDs in a FS are not assigned to a team, all cars in the filterscript should be accesable to all players.
Reply
#7

Thanks mate yu are great help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)