Does anyone know the problem with this ?
#1

Hey , so I have made this.

pawn Код:
public OnPlayerEnterVehicle(playerid,vehicleid, ispassenger)
{   if(GetVehicleModel(vehicleid) == 449)
    {
       AntiFalloff[playerid] = false;
       SendClientMessage(playerid,COLOR_YELLOW,"Anti fall of bike was disabled to avoid the tram exciting bug.");
       SendClientMessage(playerid,COLOR_YELLOW,"Use /afon to re-enable it.");
       SendClientMessage(playerid,COLOR_RED,"NOTE: It is recommended to only turn it on again after you have excited the tram.");
       SetCameraBehindPlayer(playerid);

    }
    return 1;

}
It isn't doing anything....
If you want more code like the antifalofbike just ask.

Thanks
Reply
#2

i think you may need parenthesis so instead of:
Код:
AntiFalloff[playerid] = false;
it will be
Код:
AntiFalloff(playerid) = false;
Reply
#3

I don't know what doesn't work.. Is it the Anti Fall or the whole thing?

Well, try this: (Yeah, i used state change here.)

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 449)
    {
       AntiFalloff[playerid] = false;
       SendClientMessage(playerid,COLOR_YELLOW,"Anti fall of bike was disabled to avoid the tram exciting bug.");
       SendClientMessage(playerid,COLOR_YELLOW,"Use /afon to re-enable it.");
       SendClientMessage(playerid,COLOR_RED,"NOTE: It is recommended to only turn it on again after you have excited the tram.");
       SetCameraBehindPlayer(playerid);
    }
    return 1;
}
And you can re-enable it automatically by on foot state > antifall true
Reply
#4

Quote:
Originally Posted by dowster
Посмотреть сообщение
i think you may need parenthesis so instead of:
Код:
AntiFalloff[playerid] = false;
it will be
Код:
AntiFalloff(playerid) = false;
Thats giving me a whole load of errors.

Thanks anyway


Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
I don't know what doesn't work.. Is it the Anti Fall or the whole thing?

Well, try this: (Yeah, i used state change here.)

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 449)
    {
       AntiFalloff[playerid] = false;
       SendClientMessage(playerid,COLOR_YELLOW,"Anti fall of bike was disabled to avoid the tram exciting bug.");
       SendClientMessage(playerid,COLOR_YELLOW,"Use /afon to re-enable it.");
       SendClientMessage(playerid,COLOR_RED,"NOTE: It is recommended to only turn it on again after you have excited the tram.");
       SetCameraBehindPlayer(playerid);
    }
    return 1;
}
And you can re-enable it automatically by on foot state > antifall true
Yup , thats working. Thanks alot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)