Array Problem
#1

Hey!

I got a problem with anti-fall on bike problem..

I got all the ID's of bikes in new array

PHP код:
new Bikes[12] = //Bikes ID's
{
    
448461462463468481509510,
    
521522581586
}; 
Then I got

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
    {
        if(
GetVehicleModel(pVeh[playerid]) == sizeof(Bikes)) return PutPlayerInVehicle(playeridpVeh[playerid], 0);
return 
1;

But for some reason if I put for example "522" which is NRG model id instead of "sizeof(Bikes)" it works.
Reply


Messages In This Thread
Array Problem - by NoteND - 02.03.2019, 19:26
Re: Array Problem - by TheToretto - 02.03.2019, 19:46
Re: Array Problem - by NoteND - 02.03.2019, 19:55
Re: Array Problem - by TheToretto - 02.03.2019, 20:03
Re: Array Problem - by Private200 - 02.03.2019, 21:14
Re: Array Problem - by TheToretto - 02.03.2019, 21:38
Re: Array Problem - by Private200 - 02.03.2019, 21:44
Re: Array Problem - by TheToretto - 02.03.2019, 22:20
Re: Array Problem - by Private200 - 03.03.2019, 11:59
Re: Array Problem - by TheToretto - 03.03.2019, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)