Salut, alors s'est codé sur le forum, excusez moi
new oldveh[MAX_PLAYERS];
forward EstUneMoto(carid);
public EstUneMoto(carid)
{
new veh = GetVehicleModel(carid);
if(veh == 448 || veh == 461 || veh == 462 || veh == 463 || veh == 468 || veh == 471 || veh == 521 || veh == 522 || veh == 523 || veh == 581 || veh == 586) { return 1; }
return 0;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER)
{
oldveh[playerid]=GetPlayerVehicleID(playerid);
}
else if(newstate == PLAYER_STATE_ONFOOT)
{
if(EstUneMoto(oldveh[playerid])
{
tu met ce que tu veux la
}
}
return 1;
}
++ Max ++