[HELP] Bug with organisation vehicles
#1

Hello guys,i have some problems with making gangs/organisations vehicles..
I have some bugs with vehicles..

BUG 1#
I tried to put this under OnPlayerEnterVehicle and under OnPlayerStateChange,but it still allow civilians or other players to drive GSF vehicles.
BUG 2#
And if I press F or Enter button,it show's me the message : ERROR : You'r not a part of GSF...

This is under OnPlayerEnterVehicle
Код:
 * *if(IsAGSFAuto(vid))
 	{
 	if(PlayerInfo[playerid][pLider] != 5 || PlayerInfo[playerid][pMember] != 5) return RemovePlayerFromVehicle(playerid),SendClientMessage(playerid, -1,""CRVENA"ERROR: "ZELENA"You'r not a part of Grove Street Family-a.");
 	}
and this is callback

Код:
public IsAGSFAuto(carid)
{
	for(new i = 0; i < sizeof(GSF); i++)
	{
		if(carid == GSF[i])	return 1;
	}
	return 0;
}
I defined car like this

new GSF[4];

And under ongamemodeinit

Код:
GSF[0] = AddStaticVehicleEx(475,2502.4143,-1657.6534,13.2104,54.6811,252,252); // GSF1
	GSF[1] = AddStaticVehicleEx(475,2508.4717,-1665.9340,13.2073,12.0113,252,252); // GSF2
	GSF[2] = AddStaticVehicleEx(536,2492.1211,-1682.7830,13.0747,89.9715,252,252); // GSF3
	GSF[3] = AddStaticVehicleEx(536,2482.4983,-1691.1825,13.2554,354.9940,252,252); // GSF4
So,can you help me to solve this bug?
Reply
#2

PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)    
{
    if(
IsAGSFAuto(vid))
    {
        if(
PlayerInfo[playerid][pLider] != || PlayerInfo[playerid][pMember] != 5)
        {       
            
ClearAnimations(playerid);
            
SendClientMessage(playerid, -1,""CRVENA"ERROR: "ZELENA"You'r not a part of Grove Street Family-a.");
            return 
1;
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)