What is wrong here?
#1

I have this codes, but they don't work.
I don't know what should i do to make them work. ?
pawn Код:
public IsARentBike(carid)
{
    /*for(new i = 1; i < sizeof(CarInfo); i++)
    {
        if(CarInfo[i][cFaction] == 20)  return 1;
    }*/

    for(new i = 0; i<MAX_PLAYERS; i++)
    {
        new vehid = GetPlayerVehicleID(i);
        if(vehid = 327)
        {
            return 1;
        }
    }
    return 0;
}
pawn Код:
public IsARentBike(carid)
{
    for(new i = 1; i < sizeof(CarInfo); i++)
    {
        if(CarInfo[i][cFaction] == 20)  return 1;
    }
    return 0;
}
Reply
#2

Maybe instead of public, they should be stock declarations.. do you need an example of how they work?
Reply
#3

The others functions like IsACopCar, IsAnOwnableCar etc. are working.
Reply
#4

pawn Код:
stock IsARentBike(carid)
{
    for(new i = 1; i < sizeof(CarInfo); i++)
    {
        if(CarInfo[i][cFaction] == 20)
        {
                return 1;
        }
    }
    return 0;
}
What's wrong with that code?

*EDIT*
Reply
#5

Ouh.. I just realized.. those codes are screwed up badly!

EDIT:
Diss me all you want, but I shrank your codes almost to total oblivion.. That code will work fine.
pawn Код:
stock IsARentBike(carid)
{
    if(carid = 327 || carid == 20 ) return 1;
    return 0;
}
Reply
#6

Shouldn't
pawn Код:
IsARentBike(carid)
Be
pawn Код:
IsARentBike(vehicleid)
?
Reply
#7

I have isacopcar(carid), isataxi(carid) etc.. and they work.
Reply
#8

@alpha500delta Nope, doesn't really matter in a stock declaration..

Mr pantelimonfl, look up my previous response
Reply
#9

iMonkey, your code will only work if the rentcar is vehicleid 20 whereas the faction in the enum vFaction should be 20, I think at least.
Reply
#10

Shouldn't it work as follows:
pawn Код:
if(IsARentBike(CarInfo[i][cFaction]))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)