Taxis (+ picture)
#1

Hey.. I'm using GF script.. and I got a problem that I couldnt figure out how to fix it..
I craeted a taxis and took their IDs used them under public IsATaxi and the problem is.. when I enter them its telling me: You've commited a crime and then You're not a taxi driver..

Here's a picture


and btw.. here's the you've commited a crime area:

Код:
public SetPlayerCriminal(playerid,declare,reason[])
{//example: SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
	if(IsPlayerConnected(playerid))
	{
	    PlayerInfo[playerid][pCrimes] += 1;
	    new points = WantedPoints[playerid];
		new turned[MAX_PLAYER_NAME];
		new turner[MAX_PLAYER_NAME];
		new turnmes[128];
		new wantedmes[128];
		new wlevel;
		strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
		GetPlayerName(playerid, turned, sizeof(turned));
		if (declare == 255)
		{
			format(turner, sizeof(turner), "Unknown");
			strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
		}
		else
		{
		    if(IsPlayerConnected(declare))
		    {
				GetPlayerName(declare, turner, sizeof(turner));
				strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
				strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
				strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
			}
		}
		format(turnmes, sizeof(turnmes), "You've commited a Crime ( %s ). Reporter: %s.",reason,turner);
		SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
		if(points > 0)
		{
		    new yesno;
			if(points == 3) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1; } }
			else if(points >= 4 && points <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1; } }
			else if(points >= 6 && points <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1; } }
			else if(points >= 8 && points <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1; } }
			else if(points >= 10 && points <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1; } }
			else if(points >= 12 && points <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1; } }
			else if(points >= 14) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; wlevel = 10; yesno = 1; } }
			if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } }
			if(yesno)
			{
				format(wantedmes, sizeof(wantedmes), "Current Wanted Level: %d", wlevel);
				SendClientMessage(playerid, COLOR_YELLOW, wantedmes);
				for(new i = 0; i < MAX_PLAYERS; i++)
				{
					if(IsPlayerConnected(i))
					{
					    if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
					    {
							format(cbjstore, sizeof(turnmes), "HQ: All Units APB: Reporter: %s",turner);
							SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
							format(cbjstore, sizeof(turnmes), "HQ: Crime: %s, Suspect: %s",reason,turned);
							SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
						}
					}
				}
			}
		}
	}//not connected
}
Reply
#2

The ID's from your Taxis are not correct and from the Cop cars I think. check it out...
Reply
#3

I already checked them..
here you go:

Код:
public IsACopCar(carid)
{
	if((carid >= 35) && (carid <= 60) || carid == 66 || carid == 67 || carid == 91 || carid == 92 || carid == 93 || carid == 36)
	{
	    if(carid == 45 || carid == 46 || carid == 57 || carid == 59) { return 0; }
		return 1;
	}
	return 0;
}
/\ which i dont care about right now..

EDIT : THE BOLD PART I THINK ITS THE PROBLEM

Код:
public IsATaxi(carid)
{
	if(carid >= 49 && carid <= 56)
	{
		return 1;
	}
	return 0;
}
which i found by enter the taxis in game and: /oldcar
Reply
#4

IsACopCar is from 35 - 60 and Taxi from 49 - 56 ?

Thats not correct... use /dl and check your Taxi ID's

pawn Код:
public IsATaxi(carid)
{

    new v = GetVehicleModel(carid);
    if(v==420) return 1;
    return 0;
}
Reply
#5

Lol.. I already fixed that..and lol??........... its not CAR ID!
its the car ID in the server... you know..........
Reply
#6

no 420 is the ModellID of Taxi ^^
if you use this you don't need any CarID

but if Car ID 35 - 60 is a CopCar then the CarID of a Taxi cant be 49 - 56...

Thats a CopCar... You understand?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)